From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sean Sieger Newsgroups: gmane.emacs.help Subject: Re: setnu.el / setnu+.el Date: Wed, 21 Dec 2005 10:21:37 -0500 Message-ID: <87wthyqxvi.fsf@gmail.com> References: <87mzivyqgx.fsf@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135187721 7921 80.91.229.2 (21 Dec 2005 17:55:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2005 17:55:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 21 18:55:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ep8AF-0008Js-3u for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Dec 2005 18:54:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ep8BB-0006cc-V9 for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Dec 2005 12:55:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ep5tV-0000Zw-8r for help-gnu-emacs@gnu.org; Wed, 21 Dec 2005 10:28:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ep5tP-0000Rl-GV for help-gnu-emacs@gnu.org; Wed, 21 Dec 2005 10:28:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ep5sv-0000Be-It for help-gnu-emacs@gnu.org; Wed, 21 Dec 2005 10:28:09 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ep5wE-0003od-Up for help-gnu-emacs@gnu.org; Wed, 21 Dec 2005 10:31:35 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ep5o7-0006ed-Hl for help-gnu-emacs@gnu.org; Wed, 21 Dec 2005 16:23:11 +0100 Original-Received: from pool-70-18-220-168.ny325.east.verizon.net ([70.18.220.168]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Dec 2005 16:23:11 +0100 Original-Received: from sean.sieger by pool-70-18-220-168.ny325.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Dec 2005 16:23:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pool-70-18-220-168.ny325.east.verizon.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:6lKCAGDi4eYXBUiUuqo+16Z9lT8= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32135 Archived-At: "Drew Adams" 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.