unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alan Mackenzie<none@example.invalid>
Subject: Re: c-hanging-braces-alist customization shows no syntactic symbols
Date: Thu, 18 Dec 2003 08:35:53 +0000	[thread overview]
Message-ID: <9torrb.t8.ln@acm.acm> (raw)
In-Reply-To: mailman.197.1071679884.868.help-gnu-emacs@gnu.org

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").

       reply	other threads:[~2003-12-18  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.197.1071679884.868.help-gnu-emacs@gnu.org>
2003-12-18  8:35 ` Alan Mackenzie [this message]
2003-12-18 11:03   ` c-hanging-braces-alist customization shows no syntactic symbols Stephanos Piperoglou
2003-12-17 15:48 Stephanos Piperoglou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9torrb.t8.ln@acm.acm \
    --to=none@example.invalid \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).