emacs/lisp/progmodes
Alan Mackenzie a718e1593a Fix some errors in c-display-defun-name when the type is "struct {..}", etc.
Also fix some errors with c-display-defun-name when there are nested classes.

* lisp/progmodes/cc-cmds.el (c-in-function-trailer-p): Deal with a struct {..}
being merely the type of a function.
(c-where-wrt-brace-construct): Deal with a struct {..} being merely the type
of a function.  Rearrange the order of some Lisp forms.  Insert a check for
c-protection-key ("private", etc.) alongside the checking for a label.
(c-defun-name-1): New function extracted form c-defun-name, which works within
the existing restriction.  Don't regard 'at-function-end as being within the
defun any more.  Recognize "struct", etc., with the new
c-defun-type-name-decl-key rather than c-type-prefix-key.  Make the
recognition of a normal function more accurate.
(c-defun-name): Part left after extracting the above function.  It now just
widens and calls c-defun-name-1.
(c-declaration-limits-1): New function extracted from c-declaration-limits,
which works within the existing restriction.  Move LIM back one block to
account for the possibility of struct {..} as a function type.  Check we're
not inside a declaration without braces.
(c-declaration-limits): Part left after extracting the above function.  It now
just narrows to an enclosing decl block and calls c-declaration-limits-1.
(c-defun-name-and-limits): New function which identifies the name and limits
of the most nested enclosing declaration or macro.
(c-display-defun-name): Use c-defun-name-and-limits rather than two separate
functions (which didn't always agree on which function).

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): If we have struct
{..} as the type of a function, go back over this, too.

* lisp/progmodes/cc-langs.el (c-defun-type-name-decl-kwds)
(c-defun-type-name-decl-key): New lang const/var.
2018-01-28 17:53:07 +00:00
..
ada-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ada-prj.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ada-stmt.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ada-xref.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
antlr-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
asm-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
autoconf.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
bat-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
bug-reference.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-align.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-awk.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-bytecomp.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-cmds.el Fix some errors in c-display-defun-name when the type is "struct {..}", etc. 2018-01-28 17:53:07 +00:00
cc-defs.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-engine.el Fix some errors in c-display-defun-name when the type is "struct {..}", etc. 2018-01-28 17:53:07 +00:00
cc-fonts.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-guess.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-langs.el Fix some errors in c-display-defun-name when the type is "struct {..}", etc. 2018-01-28 17:53:07 +00:00
cc-menus.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-styles.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cc-vars.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cfengine.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cmacexp.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
compile.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
cperl-mode.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
cpp.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
cwarn.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
dcl-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ebnf-abn.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-bnf.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-dtd.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-ebx.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-iso.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-otz.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf-yac.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebnf2ps.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ebrowse.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
elisp-mode.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
etags.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
executable.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
f90.el Remove some obsolete compat code in f90.el 2018-01-09 22:56:31 -08:00
flymake-proc.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
flymake.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
fortran.el Remove some obsolete compat code in fortran.el 2018-01-09 22:54:46 -08:00
gdb-mi.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
glasses.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
grep.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
gud.el Minor fix for "M-x pdb" 2018-01-26 12:18:25 +02:00
hideif.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
hideshow.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
icon.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
idlw-complete-structtag.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
idlw-help.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
idlw-shell.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
idlw-toolbar.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
idlwave.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
inf-lisp.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
js.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
ld-script.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
m4-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
make-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
mantemp.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
meta-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
mixal-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
modula2.el
octave.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
opascal.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
pascal.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
perl-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
prog-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
project.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
prolog.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
ps-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
python.el New customization variable for python-mode indentation (Bug#28475) 2018-01-01 11:16:00 -05:00
ruby-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
scheme.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
sh-script.el Merge from origin/emacs-26 2018-01-01 01:13:04 -08:00
simula.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
sql.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
subword.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
tcl.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
vera-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
verilog-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
vhdl-mode.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
which-func.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
xref.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00
xscheme.el Update copyright year to 2018 2018-01-01 00:57:59 -08:00