[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`size-indication-mode' tweak
From: |
Drew Adams |
Subject: |
`size-indication-mode' tweak |
Date: |
Thu, 14 Sep 2006 10:09:35 -0700 |
After the release:
How about considering this minor tweak to `size-indication-mode'?
The doc string would also need to be updated accordingly.
The idea is this: Whenever the region is active in transient-mark mode, the
size indication shows the size of the region, not the size of the buffer.
The implementation change is trivial - just use this for the
`size-indication-mode' part of `mode-line-position':
(size-indication-mode
(8 ,(propertize
(if (and transient-mark-mode mark-active)
(format " %d chars" (abs (- (mark t) (point))))
" of %I")
'face (and transient-mark-mode mark-active 'region)
'help-echo help-echo)))
where help-echo is bound as usual.
FYI - This library does that, as well as highlighting the column number when
the current column is greater than a given limit (option):
(http://www.emacswiki.org/cgi-bin/wiki/modeline-posn.el)
- `size-indication-mode' tweak,
Drew Adams <=