GNU bug report logs - #12215
CSET is unnecessarily confusing

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Fri, 17 Aug 2012 00:14:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Chong Yidong <cyd <at> gnu.org>
Cc: 12215 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>, Dmitry Antipov <dmantipov <at> yandex.ru>
Subject: bug#12215: CSET is unnecessarily confusing
Date: Fri, 24 Aug 2012 11:10:02 -0400
Paul Eggert said:
> If that flag has a standard name, one doesn't need separate macros
> BSET/CSET/etc; one can have just one macro that works for all types.

Indeed.  Tho, since we haven't managed yet to do that for gcmarkbit, I'm
not holding my breath.

Chong Yidong said:
>   BVAR (b->directory) = current_buffer ? BVAR
>    (current_buffer->directory) : Qnil;

The BVAR accessor macro is not for the GC but for the concurrency code.
And yes, I think that BVAR(foo->bar) can be sufficient for the
concurrency code (it can be macro-expanded to buffer_var(foo->bar,
current_thread)), assuming we change all buffer slots to be of a new
type, which is a table from thread_ids to Lisp_Object.

And even if it can't be done with a macro (because we want to use
another implementation technique that needs to look up some other data
in the buffer or to know the offset of the field), having those BVAR
will make it easy to replace those accessors with something else.

For the setters, I think we'll be better off with either
BSET (b->directory, val), or BSET (b, ->directory, val), which restricts
the form that can be used.


        Stefan




This bug report was last modified 12 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.