emacs-devel
[Top][All Lists]
Advanced

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

Re: linum and AUCTeX: line number face


From: Stephen Berman
Subject: Re: linum and AUCTeX: line number face
Date: Tue, 18 Sep 2007 00:54:32 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

On Mon, 17 Sep 2007 19:38:46 +0200 Stephan Hennig <address@hidden> wrote:

> David Kastrup schrieb:
>> Stephan Hennig <address@hidden> 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





reply via email to

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