* c-hanging-braces-alist customization shows no syntactic symbols
@ 2003-12-17 15:48 Stephanos Piperoglou
0 siblings, 0 replies; 3+ messages in thread
From: Stephanos Piperoglou @ 2003-12-17 15:48 UTC (permalink / raw)
GNU Emacs 21.3 / Windows 2000 + CygWin
I'm trying to customize my c-hanging-braces-alist and custom doesn't
show the list of syntactic symbols correctly. See below for a snippet of
what I get when I M-x customize-variable c-hanging-braces-alist. As you
can see custom has trouble getting these symbols, and I can find nowhere
where the entire list is mentioned and documented. I don't mind hacking
my .emacs file by hand for these (in fact I'd rather define my own
c-style, as this is meant for use with JDE), so my question really is
where can I get a list of syntactic symbols that apply to
c-hanging-braces-alist?
Is this a known issue in 21.3? Is it fixed in the devel branch?
==== SNIP ====
( ) Override style settings:
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
[ ] nil : Choice Newline [ ] before, [ ] after brace
State: this option has been set and saved.
==== SNIP ====
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c-hanging-braces-alist customization shows no syntactic symbols
[not found] <mailman.197.1071679884.868.help-gnu-emacs@gnu.org>
@ 2003-12-18 8:35 ` Alan Mackenzie
2003-12-18 11:03 ` Stephanos Piperoglou
0 siblings, 1 reply; 3+ messages in thread
From: Alan Mackenzie @ 2003-12-18 8:35 UTC (permalink / raw)
Stephanos Piperoglou <ta0001@piperoglou.com> wrote on Wed, 17 Dec 2003
17:48:43 +0200:
> GNU Emacs 21.3 / Windows 2000 + CygWin
> I'm trying to customize my c-hanging-braces-alist and custom doesn't
> show the list of syntactic symbols correctly. See below for a snippet
> of what I get when I M-x customize-variable c-hanging-braces-alist. As
> you can see custom has trouble getting these symbols, .....
The customize interface doesn't seem very helpful for this sort of
variable. To use it, you'd first have to click on the "Override Style
settings" button, then fill in each line, one by one. A typical such
line looks like this, after being filled in:
[X] substatement-open : [Choice] Newline [ ] before, [X] after brace
> .... and I can find nowhere where the entire list is mentioned and
> documented.
It's in the CC Mode manual, page "Hanging Braces". (I'm sure I don't
need to say this to you, but to get there, do C-h i m cc mode
i hanging .)
> .... I don't mind hacking my .emacs file by hand for these (in fact I'd
> rather define my own c-style, as this is meant for use with JDE), so my
> question really is where can I get a list of syntactic symbols that
> apply to c-hanging-braces-alist?
That's the "Hanging Braces" page. I agree with your suggestion that
you'd be better editing your .emacs directly, and defining your own style
would be better still.
> Is this a known issue in 21.3? Is it fixed in the devel branch?
Maybe, and almost certainly no.
I think what you're suggesting is that instead of this blank template:
> ==== SNIP ====
> ( ) Override style settings:
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> [ ] nil : Choice Newline [ ] before, [ ] after brace
> State: this option has been set and saved.
> ==== SNIP ====
, onto which you add the syntactic symbols you're interested in, you
should get a complete list of relevant syntactic symbols, something like:
[ ] brace-list-open : [Choice] Newline [ ] before, [ ] after brace
[ ] brace-entry-open : [Choice] Newline [ ] before, [ ] after brace
[ ] statement-cont : [Choice] Newline [ ] before, [ ] after brace
....
I'm sure this ought to be possible, and it would seem to be desirable.
Two suggestions: (1) send a request to the CC Mode mailing list at
bug-cc-mode@gnu.org asking for this; (2) (If you're at home with Emacs
macros and are feeling really brave :-) Make sure you've got a
sufficiently recent version of CC Mode (5.30.8 is currently current), get
into cc-vars.el (where c-hanging-braces-alist and defcustom-c-style-var
are defined) and fix it. CC Mode is available from
<http://www.sourceforge.net/release.php>.
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c-hanging-braces-alist customization shows no syntactic symbols
2003-12-18 8:35 ` c-hanging-braces-alist customization shows no syntactic symbols Alan Mackenzie
@ 2003-12-18 11:03 ` Stephanos Piperoglou
0 siblings, 0 replies; 3+ messages in thread
From: Stephanos Piperoglou @ 2003-12-18 11:03 UTC (permalink / raw)
Alan Mackenzie wrote:
>It's in the CC Mode manual, page "Hanging Braces". (I'm sure I don't
>need to say this to you, but to get there, do C-h i m cc mode
>i hanging .)
>
>
Thanks, that's exactly what I was looking for (OK, actually it was
c-offsets-alist that was the problem for me, but that was my bad :-),
and your answer applies equally to that...)
>Maybe, and almost certainly no.
>I think what you're suggesting is that instead of this blank template:
>
>> [ ] nil : Choice Newline [ ] before, [ ] after brace
>>
>>
>, onto which you add the syntactic symbols you're interested in, you
>should get a complete list of relevant syntactic symbols, something like:
>
>[ ] brace-list-open : [Choice] Newline [ ] before, [ ] after brace
>[ ] brace-entry-open : [Choice] Newline [ ] before, [ ] after brace
>[ ] statement-cont : [Choice] Newline [ ] before, [ ] after brace
>....
>
>
Actually you *can't* add the syntactic symbols you're interested in, the
'nil' bit isn't editable! So this is definitely a bug, not a feature...
Anyway, as you said this applies to cc-mode and not emacs itself so I'll
be off to their lists/CVS to see if I can find/request/hack a fix.
Thanks again.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-12-18 11:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.197.1071679884.868.help-gnu-emacs@gnu.org>
2003-12-18 8:35 ` c-hanging-braces-alist customization shows no syntactic symbols Alan Mackenzie
2003-12-18 11:03 ` Stephanos Piperoglou
2003-12-17 15:48 Stephanos Piperoglou
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).