[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Column-number-mode ordinality question
From: |
Smith_RS |
Subject: |
Re: Column-number-mode ordinality question |
Date: |
Tue, 04 May 2010 15:44:40 -0000 |
User-agent: |
G2/1.0 |
I got a little further. Instead of hacking directly on bindings.el I
located bindings+.el, put it in site-lisp, and that overrode things
the right way.
The problem is that the "eval" construct doesn't get eval'd every time
the cursor moves.
Also, you can't mix %l and $d in a format that way. I tried this and
it didn't work:
(10 (:eval
(propertize
(format " (%d,%d)" (current-line) (1+ (current-column)))
'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
This works better but does not update frequently enough:
(5 (:eval
(propertize
(format " C%d" (1+ (current-column)))
'local-map mode-line-column-line-number-mode-map
'mouse-face 'mode-line-highlight
It's close, but not quite.
On Apr 15, 6:22 pm, Smith_RS <rsmit...@gmail.com> wrote:
> Andreas,
>
> Thanks, but I tried directly hacking bindings.el, re-compiling
> the .elc, and it didn't change anything.
>
> Is there something special about 23.1 for Windows? Is there some sort
> of weird caching going on?
>
> On Apr 15, 5:06 pm, Andreas Politz <poli...@fh-trier.de> wrote:
>
> > Smith_RS <rsmit...@gmail.com> writes:
> > > I know that historically RMS was against this, but is there any way in
> > > 23.1 to change the behavior of column-number-mode so that it begins
> > > with 1 and not 0?
>
> > > Under Linux I can just change the code in xdisp.c, but I'm doing more
> > > work with Windows these days.
>
> > > Thanks.
>
> > I suppose, you could change the
>
> > (propertize ... "(%l,%c)" parts in
>
> > `mode-line-position' to something like
>
> > ...
> > (column-number-mode
> > (10 (:eval
> > (propertize
> > (format " (%l,%d)" (1+ (current-column)))
> > 'local-map mode-line-column-line-number-mode-map
> > 'mouse-face 'mode-line-highlight
> > 'help-echo "Line number and Column number\n\
> > mouse-1: Display Line and Column Mode Menu")))
> > ...
>
> > -ap