[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setnu.el / setnu+.el
From: |
Kevin Rodgers |
Subject: |
Re: setnu.el / setnu+.el |
Date: |
Thu, 22 Dec 2005 09:24:28 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Drew Adams wrote:
> (defun setnu-set-glyph-face (g face)
> (put-text-property 0 (length g) 'face face g))
Most likely the problem is that the face property of your overlay's
after-string is merged with the face property of the buffer text.
I expect that the overlay string's face takes precedence, so if you make
the face inherit from the `default' face, none of the bufer text's face
attributes will "show through".
I'm not knowledgeable in this area. I tried what Kevin suggested, in
setnu-make-setnu-extent:
(setnu-set-extent-property e 'face 'default)
Is that what you meant also? It removed all fontification in the entire
buffer (when the line numbers were present). The line numbers were
(correctly) bold, but nothing else appeared fontified (colored).
Ah, because the overlay covers the entire line, so its face takes
precedence over the text as well as its before string.
I think what Stefan had in mind is something like:
(defface setnu-line-number-face
'((t (:inherit default) (:weight bold)))
"Face used to display the line numbers.")
BTW has anyone tried to re-implement setnu using the `margin'
rather than after-strings?
Not that I know of. Could you explain the relative advantages and
disadvantages> (Setnu uses before-strings, not after-strings, BTW.)
Is the Emacs 22 Lisp manual available from cvs.savannah.gnu.org? I
can't find it...
--
Kevin Rodgers
Re: setnu.el / setnu+.el, Sean Sieger, 2005/12/23
Re: setnu.el / setnu+.el, Stefan Monnier, 2005/12/26