From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: linum and AUCTeX: line number face Date: Tue, 18 Sep 2007 00:54:32 +0200 Message-ID: <87lkb4ykbb.fsf@escher.local.home> References: <46ea83d1$0$16117$9b4e6d93@newsspool1.arcor-online.net> <87zlzm9uy7.fsf@escher.local.home> <86tzpt5o8j.fsf@lola.quinscape.zz> <46EEBBA6.1020109@arcor.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190069714 18770 80.91.229.12 (17 Sep 2007 22:55:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2007 22:55:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 18 00:55:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IXPUl-0000xC-0O for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2007 00:55:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXPUj-00040w-QI for ged-emacs-devel@m.gmane.org; Mon, 17 Sep 2007 18:55:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IXPUf-0003zc-LT for emacs-devel@gnu.org; Mon, 17 Sep 2007 18:55:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IXPUf-0003zA-2k for emacs-devel@gnu.org; Mon, 17 Sep 2007 18:55:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXPUe-0003z5-Sb for emacs-devel@gnu.org; Mon, 17 Sep 2007 18:55:04 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IXPUe-0006KZ-8L for emacs-devel@gnu.org; Mon, 17 Sep 2007 18:55:04 -0400 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1IXPUc-0002to-Lf for emacs-devel@gnu.org; Tue, 18 Sep 2007 00:55:02 +0200 Original-Received: from i577bced7.versanet.de ([87.123.206.215]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Sep 2007 00:55:02 +0200 Original-Received: from Stephen.Berman by i577bced7.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Sep 2007 00:55:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: i577bced7.versanet.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79152 Archived-At: On Mon, 17 Sep 2007 19:38:46 +0200 Stephan Hennig wrote: > David Kastrup schrieb: >> Stephan Hennig writes: [...] >>> To reproduce the problem, put the following lines into file .emacs: >>> >>> (progn (cd "~/elisp") (normal-top-level-add-subdirs-to-load-path)) >>> (require 'linum) >>> (custom-set-faces >>> ;; custom-set-faces was added by Custom. >>> ;; If you edit it by hand, you could mess it up, so be careful. >>> ;; Your init file should contain only one such instance. >>> ;; If there is more than one, they won't work right. >>> '(default ((t (:stipple nil :background "SystemWindow" :foreground >>> "SystemWindowText" :inverse-video nil :box nil :strike-through nil >>> :overline nil :underline nil :slant normal :weight normal :height 108 >>> :width normal :family "Bitstream Vera Sans Mono")))) >>> '(linum ((t (:inherit default)))) >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> That is not the default face. >> >> Try (copy-face 'default 'linum) or (put 'linum 'face-alias 'default instead). > > Thanks for taking a look at that, David! Since I'm a bit lost could you > please give me step-by-step instructions where to put those line(s) and > what lines to remove? I've tried removing the line you've underlined > and added > > (copy-face 'default 'linum) > > after loading linum, but that results in even more font-locking related > properties, e.g., some italic line numbers. All you have to do is evaluate that sexp, e.g. type M-: and at the prompt enter (copy-face 'default 'linum) and then hit the return key. But as Stefan Monnier surmised and I confirmed in another reply, this doesn't do anything different than customizing the inherit attribute of the face. > >> Inheriting will, of course, be overridden by any new properties. >> That's the whole point of it. > > Well, I'd love to do without any inheritance at all. With the following > .emacs I've tried to set line numbers to be black, upright, medium > weight. The result are black and upright line numbers, but weight seems > still to be "inherited" (don't know if that's the correct term here) > from font-locking properties. Yes, black seems to behave like shadow. Perhaps this is generally the case, and inheriting from default (whatever that means precisely; I don't know) is the exception. > Note, if colour or slant aren't set, they are inherited from > font-locking properties, too. That is, setting them explicitly to > "black" and "normal" _does override_ font-locking properties. But an > explicit weight value is ignored. Is that intended behaviour? Again, not just weight, but also at least the highlighting done by matching parentheses. Steve Berman