1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-05 05:41:40 -07:00
emacs/doc/misc
Alan Mackenzie c2d6f191d4 CC Mode: Separate indentation of enums from that of brace lists
This will allow enums to be indented as in the GNU coding
standards without affecting brace lists.

* lisp/progmodes/cc-align.el
(c-lineup-arglist-intro-after-paren)
(c-lineup-arglist-close-under-paren)
(c-lineup-whitesmith-in-block)
(c-lineup-after-whitesmith-blocks): Amend doc strings to
indicate they can be used for enum-* syntactic symbols too.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block)
(c-backward-typed-enum-colon, c-backward-over-enum-header):
Rename c-after-brace-list-key to c-after-enum-list-key and
c-brace-list-key to c-enum-list-key.
(c-at-enum-brace): New function.
(c-inside-bracelist-p): Don't check for enums any more.
(c-add-stmt-syntax): New cond arm for enums.
(c-guess-continued-construct CASE B.6) New code for enum-open.
(c-guess-basic-syntax CASE 5A.3, CASE 7B, CASE 9, CASE 9B)
(CASE 9C, CASE 9D): Use the new function c-at-enum-brace, and
use enum-* syntactic symbols rather than brace-list-* ones
where appropriate.
(c-used-syntactic-symbols): New dynamic variable.
(c-evaluate-offset): Add handling for a different syntactic
symbol as the cdr of a c-offsets-alist element.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Add a call to c-at-enum-brace since c-inside-bracelist-p no
longer handles enums.
(c-font-lock-enum-body, c-font-lock-enum-tail): Condense calls
to c-backward-over-enum-header to c-at-enum-brace.
(c-basic-matchers-after): Replace a c-brace-list-decl-kwds with
c-enum-list-kwds.

* lisp/progmodes/cc-langs.el (c-enum-list-kwds)
(c-enum-list-key): New names for c-brace-list-decl-kwds and
c-brace-list-key.
(c-after-enum-list-kwds, c-after-enum-list-key): New names for
c-after-brace-list-decl-kwds and c-after-brace-list-key.
(c-enum-list-key, c-after-enum-list-key): Add code to
use a value of an old name, should a derived mode still use
that.
(c-defun-type-name-decl-kwds, c-typedef-decl-kwds)
(c-typeless-decl-kwds, c-prefix-spec-kwds)
(c-brace-id-list-kwds, c-enum-clause-introduction-re): Use
c-enum-list-kwds rather than c-brace-list-decl-kwds.

* lisp/progmodes/cc-styles.el (c-read-offset): Add "a
syntactic symbol" into an error message text.

* lisp/progmodes/cc-vars.el (c-valid-offset): Allow for a
syntactic symbol as the parameter.
(c-offsets-alist): Add new syntactic symbols enum-open,
enum-close, enum-intro, and enum-entry.

* doc/misc/cc-mode.texi (Syntactic Symbols): Add a note that
anchor points are briefly documented in cc-vars.el.  Correct
the suffix "-block-intro" to "-intro".  Remove "an enum or"
from the descriptions of the brace-list-* syntactic symbols.
Add in new descriptions for the enum-* syntactic symbols.
(Brace List Symbols): Remove references to enums.  Add a note
that enums are no longer brace-lists.
(Enum Symbols): A new subsection documenting the new enum-*
syntactic symbols.
(c-offsets-alist): Document the new possibility, syntactic
symbol, for the cdr of an alist entry.
(Brace/Paren Line-Up, List Line-Up): Note that the new enum
syntactic symbols can be handled by these lineup functions.
2024-09-24 20:45:29 +00:00
..
auth.texi
autotype.texi
bovine.texi
calc.texi
cc-mode.texi CC Mode: Separate indentation of enums from that of brace lists 2024-09-24 20:45:29 +00:00
ChangeLog.1
cl.texi
dbus.texi
dired-x.texi
doclicense.texi
ebrowse.texi
ede.texi
ediff.texi
edt.texi
efaq-w32.texi
efaq.texi
eglot.texi
eieio.texi
emacs-gnutls.texi
emacs-mime.texi
epa.texi
erc.texi
ert.texi
eshell.texi
eudc.texi
eww.texi
flymake.texi
forms.texi
gnus-faq.texi
gnus.texi
gpl.texi
htmlfontify.texi
idlwave.texi
ido.texi
info.texi
mairix-el.texi
Makefile.in
message.texi
mh-e.texi
modus-themes.org
newsticker.texi
nxml-mode.texi
octave-mode.texi
org-setup.org
org.org
pcl-cvs.texi
pgg.texi
rcirc.texi
reftex.texi
remember.texi
sasl.texi
sc.texi
sem-user.texi
semantic.texi
ses.texi
sieve.texi
smtpmail.texi
speedbar.texi
srecode.texi
texinfo.tex
todo-mode.texi
tramp.texi
trampver.texi
transient.texi
url.texi
use-package.texi
vhdl-mode.texi
vip.texi
viper.texi
vtable.texi
widget.texi
wisent.texi
woman.texi