* defcustom-c-stylevar rewrite: 2nd rfc
@ 2007-10-30 11:06 Thien-Thi Nguyen
2007-10-31 7:47 ` Richard Stallman
0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2007-10-30 11:06 UTC (permalink / raw)
To: emacs-devel
clearing the plate...
i posted for comment a few weeks (~month?) back the appended
rewrite of `defcustom-c-stylevar'. no response. this is a
second call for comment after which time (in a week) if there
are no objections i will commit it on the trunk.
thi
____________________________________________________________
(defmacro defcustom-c-stylevar (name val doc &rest args)
"Define a style variable NAME with VAL and DOC.
More precisely, convert the given `:type FOO', mined out of ARGS,
to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append some
some boilerplate documentation to DOC, arrange for the fallback
value of NAME to be VAL, and call `custom-declare-variable' to
do the rest of the work.
STYLE stands for the choice where the value is taken from some
style setting. PREAMBLE is optionally prepended to FOO; that is,
if FOO contains :tag or :value, the respective two-element list
component is ignored."
(declare (debug (symbolp form stringp &rest)))
(let* ((expanded-doc (concat doc "
This is a style variable. Apart from the valid values described
above, it can be set to the symbol `set-from-style'. In that case,
it takes its value from the style system (see `c-default-style' and
`c-style-alist') when a CC Mode buffer is initialized. Otherwise,
the value set here overrides the style system (there is a variable
`c-old-style-variable-behavior' that changes this, though)."))
(typ (eval (plist-get args :type)))
(type (if (consp typ) typ (list typ)))
(head (car type))
(tail (cdr type))
(newt (append (unless (plist-get tail :tag)
'(:tag "Override style settings"))
(unless (plist-get tail :value)
`(:value ,val))
tail))
(aggregate `'(radio
(const :tag "Use style settings" set-from-style)
,(cons head newt))))
`(progn
(c-set-stylevar-fallback ',name ,val)
(custom-declare-variable
',name ''set-from-style
,expanded-doc
,@(plist-put args :type aggregate)))))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: defcustom-c-stylevar rewrite: 2nd rfc
2007-10-30 11:06 defcustom-c-stylevar rewrite: 2nd rfc Thien-Thi Nguyen
@ 2007-10-31 7:47 ` Richard Stallman
2007-10-31 12:18 ` Thien-Thi Nguyen
0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-10-31 7:47 UTC (permalink / raw)
To: Thien-Thi Nguyen; +Cc: emacs-devel
Please don't install this until we hear from acm@muc.de.
I am sure he will respond.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: defcustom-c-stylevar rewrite: 2nd rfc
2007-10-31 7:47 ` Richard Stallman
@ 2007-10-31 12:18 ` Thien-Thi Nguyen
2007-11-27 8:09 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2007-10-31 12:18 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
() Richard Stallman <rms@gnu.org>
() Wed, 31 Oct 2007 03:47:34 -0400
Please don't install this until we hear from acm@muc.de.
ok.
I am sure he will respond.
i was not sure before but now i am (more) sure.
thi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: defcustom-c-stylevar rewrite: 2nd rfc
2007-10-31 12:18 ` Thien-Thi Nguyen
@ 2007-11-27 8:09 ` Glenn Morris
0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2007-11-27 8:09 UTC (permalink / raw)
To: Thien-Thi Nguyen; +Cc: rms, emacs-devel
Thien-Thi Nguyen wrote:
> () Richard Stallman <rms@gnu.org>
> () Wed, 31 Oct 2007 03:47:34 -0400
>
> Please don't install this until we hear from acm@muc.de.
>
> ok.
In the meantime, added to FOR-RELEASE...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-27 8:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-30 11:06 defcustom-c-stylevar rewrite: 2nd rfc Thien-Thi Nguyen
2007-10-31 7:47 ` Richard Stallman
2007-10-31 12:18 ` Thien-Thi Nguyen
2007-11-27 8:09 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).