bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12215: CSET is unnecessarily confusing


From: Chong Yidong
Subject: bug#12215: CSET is unnecessarily confusing
Date: Fri, 24 Aug 2012 11:46:40 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> Yes, I didn't like it much when I first thought about it, but I'm
> beginning to think it's the least bad option (the next one is to use
> another preprocessor than cpp ;-).

Maybe we could use macros that are a no-op under CPP, and serve only as
guides for a non-CPP code transformation tool.  That is to say, instead
of the horrible

  bset_directory (b, current_buffer ? BVAR (current_buffer, directory) : Qnil);

we could have the slightly less horrible

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

with BVAR a no-op under CPP:

  #define BVAR(x) x

The GC branch wouldn't be able to use CPP to convert this to the desired
form, but I think there would be enough information for a non-CPP tool
or a script to automatically transform all snippets of the form

  BVAR (x->y) = z

to

  set_buffer_y (x, z)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]