unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org, bug-cc-mode@gnu.org,
	Martin Stjernholm <mast@lysator.liu.se>
Subject: Re: CC Mode 5.31.3
Date: Sun, 26 Feb 2006 17:19:48 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.3.96.1060226142758.278A-100000@acm.acm> (raw)
In-Reply-To: <E1FDKjU-0000X6-PY@fencepost.gnu.org>

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 Abbrev)--L338--C0--Bot--P6714/6981---
                                 ^       ^^

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:

COMPLAINT(1):
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.

COMPLAINT(2):
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
prefer).

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)




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642


  reply	other threads:[~2006-02-26 17:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 18:13 CC Mode 5.31.3 Alan Mackenzie
2006-02-24 18:51 ` Sean O'Rourke
2006-02-24 22:04   ` Alan Mackenzie
2006-02-26 12:10 ` Richard Stallman
2006-02-26 17:19   ` Alan Mackenzie [this message]
2006-02-27 19:01     ` Richard Stallman
2006-02-26 20:39   ` Alan Mackenzie
2006-02-27  9:07     ` Kim F. Storm
2006-02-27 15:10       ` Alan Mackenzie
2006-02-27 23:46       ` Richard Stallman
2006-02-27 14:31     ` Stefan Monnier
2006-02-27 23:47       ` Richard Stallman
2006-02-27 19:02     ` Richard Stallman
2006-02-26 12:46 ` Vivek Dasmohapatra
     [not found] <87slq8xyqv.fsf-monnier+gmane.emacs.devel@gnu.org>
2006-02-25 11:37 ` Alan Mackenzie
2006-02-26 15:36   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1060226142758.278A-100000@acm.acm \
    --to=acm@muc.de \
    --cc=bug-cc-mode@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mast@lysator.liu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).