[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CC Mode 5.31.3

From: Alan Mackenzie
Subject: Re: CC Mode 5.31.3
Date: Sun, 26 Feb 2006 17:19:48 +0000 (GMT)

Hi, Richard!

On Sun, 26 Feb 2006, Richard Stallman wrote:

>    The issues with the Mode Name, and minor mode flags in the mode line are
>    still unresolved.  On typing M-x smerge-mode, C Mode's flags (the "/la"
>    of "C/la") now stay with the major mode, but this is done by setting
>    mode-name to "C/la", a stop-gap solution at best.

>I do not understand "now stay with the major mode".
>What does that mean, concretely?

Sorry, that was a sloppy explanation.  In this mode line:

  --1-:---F3  test.c            (C/l H Abbrev)--L338--C0--Bot--P6714/6981---

, when M-x smerge-mode is started, it previously became this:

  --1-:---F3  test.c            (C SMerge/l H 
                                 ^       ^^

By "staying with the major mode", I meant that "C" and "/l" didn't get
separated by "SMerge".

>Anyway, can't you achieve what you want with a local
>binding for mode-line-modes?  Or mode-line-process?

The thing in the mode line I will use for the C submode flags (the "/l")
must be firmly clamped to the right of mode-name.

mode-line-process doesn't meet this requirement, since it's only
coincidentally to the right of mode-name in Emacs 22 and 21 (and, in
fact, is somewhere else in the XEmacs mode line).  Also, this variable
might get overwritten by some "process" (whatever that is, exactly) which
may become associated with the C Mode buffer.

mode-line-modes doesn't seem right either:

mode-line-modes's doc string seems very vague: "Mode-line control for
displaying major and minor modes".  Or, in unforced English, "Something
to do with displaying major and minor modes".  I don't know what "a
control" is, if there is an implicit indefinite article there.  I don't
know what "for" means in this context.  It isn't clear exactly how many
major and minor modes will get dispalayed - is that what is getting
controlled?  Anybody wanting to use this variable would be forced to read
the fine source code to find out what it actually is and does.

There is no entry for mode-line-modes in NEWS.

I think mode-line-modes was first introduced in Emacs 22, so it's not
(yet) a version-independent facility (which CC Mode obviously would

Analysing mode line formats is hard, ridiculously hard - the
mode-line-format of a Emacs power user can come in any shape or form
whatsoever, possibly not even including mode-name.  There seems to be
little or any support for maintainers of modes who need to tweak it.

Alan Mackenzie (Munich, Germany)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]