emacs/doc
Phil Sainty 6a4477d057 Support mode line constructs for 'mode-name' in c-mode (bug#2034)
Also make the inclusion of minor mode flags in 'mode-name' optional.

* lisp/progmodes/cc-vars.el (c-modeline-display-flags): New user
option.
* lisp/progmodes/cc-cmds.el (c-modeline-flags): New variable.
(c--modeline-major-mode): New internal buffer-local variable.
(c-update-modeline): Use mode line constructs, rather than string
concatenation, to optionally include minor mode flags in 'mode-name'.

* lisp/progmodes/cc-cmds.el (c-toggle-auto-newline)
(c-toggle-hungry-state, c-toggle-auto-hungry-state)
(c-toggle-electric-state, c-toggle-comment-style):
* lisp/progmodes/cc-mode.el (c-electric-indent-mode-hook)
(c-electric-indent-local-mode-hook): Remove redundant calls to
'c-update-modeline'.  It is no longer necessary to call this function
every time one of the minor mode states changes.  The remaining calls
are in 'c-basic-common-init' (which is called via 'c-common-init' by
all the major modes defined in cc-mode.el), and in the :after-hook of
those modes (which ensures that 'mode-name' is still processed for a
derived mode that doesn't call 'c-common-init' itself).

* lisp/progmodes/cc-mode.el (c-submit-bug-report):
* lisp/progmodes/cc-styles.el (c-set-style): Format 'mode-name'.

* doc/misc/cc-mode.texi: Document 'c-modeline-display-flags'.

* etc/NEWS: Mention new user option and behaviors.

* lisp/progmodes/cc-engine.el:
* lisp/progmodes/cc-mode.el: Remove commented remnants of
'c-submode-indicators'.  This code was commented out in commit
cb694ab730 in which the indicators were
moved directly into 'mode-name' (to prevent lighter text for other
minor modes from appearing inbetween).  These indicators are now
replaced by 'c-modeline-flags'.
2018-07-08 01:20:10 +12:00
..
emacs Speed up reading sub-process output on MS-Windows 2018-06-30 11:43:42 +03:00
lispintro Merge from origin/emacs-26 2018-07-02 19:19:26 -07:00
lispref Fix last change 2018-07-01 19:19:51 +03:00
man Merge from origin/emacs-26 2018-05-15 09:09:48 -07:00
misc Support mode line constructs for 'mode-name' in c-mode (bug#2034) 2018-07-08 01:20:10 +12:00