From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: setnu.el / setnu+.el Date: Thu, 22 Dec 2005 09:24:28 -0700 Message-ID: References: <873bkml4xc.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135272617 1868 80.91.229.2 (22 Dec 2005 17:30:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Dec 2005 17:30:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 22 18:30:15 2005 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EpUGc-0002SC-Mx for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Dec 2005 18:30:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpUHc-0004tX-9J for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Dec 2005 12:31:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EpTGH-0003jA-O4 for help-gnu-emacs@gnu.org; Thu, 22 Dec 2005 11:25:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EpTGF-0003gz-4j for help-gnu-emacs@gnu.org; Thu, 22 Dec 2005 11:25:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpTGD-0003gA-RK for help-gnu-emacs@gnu.org; Thu, 22 Dec 2005 11:25:46 -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 1EpTFM-0005nU-Od for help-gnu-emacs@gnu.org; Thu, 22 Dec 2005 11:24:52 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EpTF9-00055z-Mq for help-gnu-emacs@gnu.org; Thu, 22 Dec 2005 17:24:39 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Dec 2005 17:24:39 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Dec 2005 17:24:39 +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: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: 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:32162 Archived-At: 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