help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Column-number-mode ordinality question


From: Johan Bockgård
Subject: Re: Column-number-mode ordinality question
Date: Tue, 04 May 2010 15:44:53 -0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Smith_RS <rsmithpv@gmail.com> writes:

> The problem is that the "eval" construct doesn't get eval'd every time
> the cursor moves.

The mode line is caused to be updated more often by the %c construct. If
you remove it you have to trigger an update some other way.

> Also, you can't mix %l and $d in a format that way.

You can add another % to protect the %-sequence.

(setq mode-line-format
      `((-1 (:propertize "%c" face (:height 0)))
        (10 (:propertize
             (:eval (format " (%%l,%d)" (1+ (current-column))))
             local-map ,mode-line-column-line-number-mode-map
             mouse-face mode-line-highlight))))


reply via email to

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