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

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

Re: setnu.el / setnu+.el


From: Sean Sieger
Subject: Re: setnu.el / setnu+.el
Date: Wed, 21 Dec 2005 10:21:37 -0500
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

              Is there a way to have line numbers
              go unaffected by highlighting?

          Could you elaborate? Do you see highlighted line numbers?

       Yes, my line numbers have the same highlighting as
       the adjacent code.

   I just checked in Emacs 22, and you're right. However, in Emacs 20, the line
   numbers are not highlighted. I wrote setnu+.el, which is a only minor tweak
   of setnu.el, but I don't know enough to help you here. I believe that this
   is the code, in setnu.el, that is in question:

   (defun setnu-set-glyph-face (g face)
      (put-text-property 0 (length g) 'face face g))

   This code is intended to impose the given face (just bold, by default) on
   the line-number overlay text. It does that correctly, but I guess it does
   not also remove other text properties that might be on the same overlay
   (imposed by font-locking).

   It appears that if the newline at the end of a line is fontified (matches a
   regexp that imposes fontification), then the line-number overlay is
   fontified in the same way.

   At first I thought it might be the new `font-lock-face' property that is
   supplying the fontification, because that wouldn't be cancelled just by
   adding a `face' property. So I tried adding this to the code above:

   (put-text-property 0 (length g) 'font-lock-face nil g)

   But that had no visible effect. I think that someone who knows either the
   setnu.el code or the font-lock mechanisms or overlays better than I will
   have to help you. Sorry.

Thank you, Drew -- I sent mail to Kyle and I'll try to pursue the
ideas you've put forward.





reply via email to

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