Subject: Re: bug#2034: [PATCH] 27.0.50; Support mode line constructs for `mode-name' in c-mode

From: Phil Sainty <[email-masked]>
Date: Wed, 4 Jul 2018 01:37:20 +1200

On 03/07/18 10:53, Phil Sainty wrote:
> I'll write a revised patch to address these points.

An updated version is on branch origin/fix/bug-2034 with the
following change log.

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-cmds.el (c-modeline-flags): New variable.
(c-modeline-flags-major-modes-processed): New variable.
(c-modeline-display-flags): New user option.
(c-update-modeline): Use them.  Use mode line constructs, rather than
string concatenation, to optionally include minor mode flags in
'mode-name'.

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

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

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

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