[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Changing Color Of Column # In Modeline
From: |
Drew Adams |
Subject: |
RE: Changing Color Of Column # In Modeline |
Date: |
Wed, 23 Nov 2005 13:08:30 -0800 |
> How about putting this in your init file:
>
> (setf mode-line-position '(:eval (if (>= (current-column) 80)
> '(:propertize "(%l,%c)"
> face bold)
> "(%l,%c)")))
Does that really work for you? mode-line-position is not
documented in Emacs 21 -- are you running 22.0 (CVS)?
It works fine in Emacs 22. Yes, `mode-line-position' is undefined in Emacs
21. I use this, BTW:
(setq mode-line-position
'(:eval (let ((help-echo "mouse-1: select (drag to resize), \
mouse-2: delete others, mouse-3: delete this"))
`((-3 ,(propertize "%p" 'help-echo help-echo))
(size-indication-mode
(8 ,(propertize " of %I" 'help-echo help-echo)))
(line-number-mode
((column-number-mode
(10 ,(propertize
" (%l,%c)"
'face (and (> (current-column)
1on1-mode-line-column-limit)
'font-lock-function-name-face)
'help-echo help-echo))
(6 ,(propertize " L%l" 'help-echo help-echo))))
((column-number-mode
(5 ,(propertize
" C%c"
'face (and (> (current-column)
1on1-mode-line-column-limit)
'font-lock-function-name-face)
'help-echo help-echo)))))))))
The key thing here is :eval, which makes sure the column-number face gets
updated - it is available in Emacs 21, as is `mode-line-format', which you
can manipulate in a way similar to the above to change the
`column-number-mode' face.
In Emacs 20, you could use `put' to add the text properties (there is no
`propertize'), but you cannot easily update the face, because there is no
:eval.
- Changing Color Of Column # In Modeline, gamename, 2005/11/21
- Re: Changing Color Of Column # In Modeline, M Jared Finder, 2005/11/22
- Re: Changing Color Of Column # In Modeline, rgb, 2005/11/22
- Re: Changing Color Of Column # In Modeline, gamename, 2005/11/22
- Re: Changing Color Of Column # In Modeline, M Jared Finder, 2005/11/22
- Re: Changing Color Of Column # In Modeline, Kevin Rodgers, 2005/11/23
- RE: Changing Color Of Column # In Modeline,
Drew Adams <=
- Message not available
- Re: Changing Color Of Column # In Modeline, gamename, 2005/11/23
- RE: Changing Color Of Column # In Modeline, Drew Adams, 2005/11/24
- Message not available
- Re: Changing Color Of Column # In Modeline, gamename, 2005/11/25
- RE: Changing Color Of Column # In Modeline, Drew Adams, 2005/11/26
- Message not available
- Re: Changing Color Of Column # In Modeline, gamename, 2005/11/26
- RE: Changing Color Of Column # In Modeline, Drew Adams, 2005/11/26
- Message not available
- Re: Changing Color Of Column # In Modeline, gamename, 2005/11/26
Re: Changing Color Of Column # In Modeline, Ilya Zakharevich, 2005/11/22