[Top][All Lists]

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

Re: Advice needed on modeline customization hack...

From: Perry E. Metzger
Subject: Re: Advice needed on modeline customization hack...
Date: Sat, 15 Apr 2017 21:55:29 -0400

On Sat, 15 Apr 2017 21:28:00 -0400 "Perry E. Metzger"
<address@hidden> wrote:
> The two line patch at the end of this adds a %C modeline construct
> that acts just like %c only it displays the modeline with characters
> starting at 1 instead of zero. Doing it that way gives you
> essentially no extra performance hit. That part turns out to be the
> easy bit.
> Harder is this: short of redefining the entirety of the really,
> really long mode-line-position variable from bindings.el, which
> isn't something one wants to tell people to casually do in
> their .emacs (it's long and complicated as heck), I'm not quite
> sure how to do a practical customization here. Then again, I only
> half understand how the modeline format stuff works at all, and it
> seems semantically rich enough that some reasonable way to do this
> should exist.
> Advice on how to do the elisp half of this so there can be an easy
> setting to let you pick one based or zero based?

So, partially answering my own question, it seems like the only
obvious way to do this is to add yet another foo-mode variable and a
bunch of lines to the definition of mode-line-position in bindings.el
that do exactly what the current ones do for when column-number-mode
is set, only selecting between using %c and %C in the constructs.

This seems a little gross, but I'm not really sure what else is
practical. Assuming this is the right thing, advice on what to call
this new (very) minor mode are solicited.

Perry E. Metzger                address@hidden

reply via email to

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