From: Sean Sieger <sean.sieger@gmail.com>
Subject: Re: setnu.el / setnu+.el
Date: Wed, 21 Dec 2005 10:21:37 -0500 [thread overview]
Message-ID: <87wthyqxvi.fsf@gmail.com> (raw)
In-Reply-To: DNEMKBNJBGPAOPIJOOICCEJKDAAA.drew.adams@oracle.com
"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.
next prev parent reply other threads:[~2005-12-21 15:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 4:54 setnu.el / setnu+.el Sean Sieger
2005-12-21 5:12 ` Drew Adams
2005-12-21 5:22 ` Sean Sieger
2005-12-21 6:38 ` Drew Adams
2005-12-21 15:21 ` Sean Sieger [this message]
2005-12-21 17:11 ` Kevin Rodgers
2005-12-22 7:24 ` Drew Adams
2005-12-23 5:07 ` Sean Sieger
[not found] <mailman.20010.1135147162.20277.help-gnu-emacs@gnu.org>
2005-12-21 17:49 ` Stefan Monnier
2005-12-22 7:24 ` Drew Adams
2005-12-22 16:24 ` Kevin Rodgers
[not found] ` <mailman.20176.1135268751.20277.help-gnu-emacs@gnu.org>
2005-12-22 17:57 ` Stefan Monnier
2005-12-22 18:42 ` Drew Adams
2005-12-23 21:48 ` Kevin Rodgers
2005-12-23 21:57 ` Drew Adams
[not found] ` <mailman.20286.1135374622.20277.help-gnu-emacs@gnu.org>
2005-12-26 16:44 ` Stefan Monnier
2005-12-27 17:01 ` Kevin Rodgers
[not found] ` <mailman.20559.1135702971.20277.help-gnu-emacs@gnu.org>
2005-12-29 3:56 ` Stefan Monnier
[not found] <mailman.20287.1135375137.20277.help-gnu-emacs@gnu.org>
2005-12-26 16:47 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wthyqxvi.fsf@gmail.com \
--to=sean.sieger@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.