emacs/doc/misc
Alan Mackenzie 555ec43a32 C++ Mode: Fix some indentation bugs. FIxes bug#19867
1. Fix closing paren aligning with trailing comment on line
with matching open paren.
2. Fix indentation of first identifier inside a comma separated
list aligning with the type rather than the subsequent
identifiers.
3. Fix lambda expressions inside a brace list aligning like a
single statement.

* lisp/progmodes/cc-align.el (c-lineup-arglist): Take into
account any preceding comments when lining up the arguments in
the arglist.
(c-lineup-arglist-intro-after-paren): Handle comments properly,
and don't line up the closing parenthesis with a trailing
comment on the first line.
(c-lineup-item-after-paren-at-boi): Also allow a paren to count
as being at BOI when it is preceded only by open parens on that
line.
(c-lineup-runin-statements, c-lineup-ObjC-method-call): Hanle
comments better.

* lisp/progmodes/cc-engine.el (c-forward-comments) Introduce an
optional limit parameter.  Use this limit in calls from
cc-align.el and cc-mode.el.
(c-just-after-func-arglist-p): Handle the presence of a
protection keyword such as "public".
(c-at-bracelist-p): Renamed from c-inside-bracelist-p, after
dropping the accept-in-paren parameter, having removed its
functionality.
(c-looking-at-statement-block-1): New function, based on the
old c-looking-at-statement-block.  Enhanced to handle C++
lambda expressions, and to return the symbol `maybe' when the
contents of a brace delimited block fail to determine whether
it is a statement block.
(c-looking-at-statement-block): Enhanced to examine the context
of a brace delimited block when the contents are ambiguous.
(c-looking-at-c++-lambda-expression): Check the character after
point is a < before calling c-forward-<>-arglist.
(c-add-stmt-syntax): Make the context more accurate by calling
c-looking-at-statement-block.
(c-guess-basic-syntax, CASE 5D.5): Replace the syntactic symbol
topmost-intro-cont with the new symbol class-field-cont,
additionally determining the position of the enclosing brace as
an extra anchor point.
(c-guess-basic-syntax, CASE 5V): New case for an identifier
following a type inside class braces.
(c-guess-basic-syntax, CASE 9): Use
c-looking-at-statement-block to detect a brace list more
accurately.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Rename the call to c-inside-bracelist-p to c-at-bracelist-p.

* lisp/progmodes/cc-langs.el (c-protection-kwds): Add an entry
for java-mode.
(c-stmt-block-only-keywords-regexp): Prevent this regexp also
matching a character preceding the keyword.

* /lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): Use the new limit argument to
c-forward-comments.

* lisp/progmodes/cc-styles.el (c-style-alist, "gnu" and "java"
styles): Change the offset for arglist-close to
c-lineup-arglist-close-under-paren.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Introduce the
new syntactic symbol class-field-cont, giving it default
offset +.

* doc/misc/cc-mode.texi (Syntactic Symbols, Class Symbols):
Document the new syntactic symbol class-field-cont.
2025-03-27 10:24:48 +00:00
..
auth.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
autotype.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bovine.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
calc.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
cc-mode.texi C++ Mode: Fix some indentation bugs. FIxes bug#19867 2025-03-27 10:24:48 +00:00
ChangeLog.1 ; Delete troff markers from ChangeLog files 2025-02-20 02:46:43 +01:00
cl.texi Improve documentation of cl-defstruct 2025-03-23 12:28:26 +01:00
dbus.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
dired-x.texi ;* doc/misc/dired-x.texi: Remove unnecessary paren (Bug#76148) 2025-02-08 22:40:25 +01:00
doclicense.texi
ebrowse.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ede.texi ; * doc/misc/ede.texi (Top): Improve introduction. 2025-03-15 19:41:02 +01:00
ediff.texi Adapt ediff to nonstandard layouts 2025-03-21 20:56:12 -04:00
edt.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
efaq-w32.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
efaq.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
eglot.texi Eglot: the margin code action indicator is interactive 2025-03-08 05:36:48 +00:00
eieio.texi ; Change some instances of cl to cl-lib in docs 2025-03-20 02:05:55 +01:00
emacs-gnutls.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
emacs-mime.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
epa.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
erc.texi Use .pem extension for client certs in ERC docs 2025-02-21 18:40:06 -08:00
ert.texi Merge from origin/emacs-30 2025-03-12 10:09:09 +08:00
eshell.texi Merge from origin/emacs-30 2025-01-25 10:06:19 -05:00
eudc.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
eww.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
flymake.texi Avoid double spaces around abbrevations in Texinfo 2025-01-24 23:10:23 +01:00
forms.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
gnus-faq.texi Avoid double spaces around abbrevations in Texinfo 2025-01-24 23:10:23 +01:00
gnus.texi ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places 2025-03-12 10:24:22 +08:00
gpl.texi
htmlfontify.texi ; Fix cross-references in Texinfo manuals 2025-01-19 08:23:23 +02:00
idlwave.texi Merge from origin/emacs-30 2025-01-25 10:06:19 -05:00
ido.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
info.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
mairix-el.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
Makefile.in Update copyright year to 2025 2025-01-02 18:39:42 +01:00
message.texi Drop hashcash support from Gnus and Message mode 2025-02-24 22:45:58 +01:00
mh-e.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
modus-themes.org Merge from savannah/emacs-30 2025-02-19 15:36:08 +08:00
newsticker.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
nxml-mode.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
octave-mode.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
org-setup.org ; Whitespace fixes to silence git hooks 2025-02-26 18:11:22 +01:00
org.org ; Don't use HTTPS in HTTP-specific example 2025-02-03 14:03:43 +01:00
pcl-cvs.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pgg.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rcirc.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
reftex.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
remember.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
sasl.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sc.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sem-user.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
semantic.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ses.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
sieve.texi Bind sieve-refresh-scriptlist to 'g' in sieve-mode 2025-02-13 10:31:01 +01:00
smtpmail.texi Add smtpmail cross-reference to 'auth-sources'. 2025-01-14 10:25:18 +01:00
speedbar.texi ; Fix last change (bug#76789) 2025-03-15 10:52:45 +02:00
srecode.texi ; Fix cross-references in Texinfo manuals 2025-01-19 08:23:23 +02:00
texinfo.tex Update from Gnulib by running admin/merge-gnulib 2025-02-07 16:52:07 -08:00
todo-mode.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tramp.texi Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2025-03-15 12:52:37 +01:00
trampver.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
transient.texi Update to Transient v0.8.6-7-g64cb8404 2025-03-15 20:21:20 +01:00
url.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
use-package.texi Merge from origin/emacs-30 2025-03-22 21:09:37 +08:00
vhdl-mode.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
viper.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
vtable.texi Update copyright year to 2025 2025-01-02 18:39:42 +01:00
widget.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00
wisent.texi Merge from origin/emacs-30 2025-01-25 10:06:19 -05:00
woman.texi Don't recommend legacy keymap functions in documentation 2025-03-11 21:19:13 +01:00