[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linum and AUCTeX: line number face
From: |
David Kastrup |
Subject: |
Re: linum and AUCTeX: line number face |
Date: |
Mon, 17 Sep 2007 17:02:36 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) |
Stephan Hennig <address@hidden> writes:
> Stephen Berman schrieb:
>
>> If you customize the linum face to default, then all line numbers
>> have the default face. It seems the default face does not "inherit"
>> the face properties of the string that the linum display property is
>> on, whereas, for example, the shadow face, used by default by
>> linum.el version 0.9n and later, does inherit at least some face
>> properties or attributes.
>
> Thanks! For \bfseries using default face works for all fonts I've
> tried. But for \section commands the behaviour is even more strange.
>
> As long as default face refers to, e.g., 'Courier New' or 'Bitstream
> Vera Sans Mono' all seems to be well. But when default refers to, e.g.,
> 'Outline-Consolas' or 'Lucida Sans Typewriter' weight is still inherited
> from line's face if there's a \section command in that line.
>
> 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).
Inheriting will, of course, be overridden by any new properties.
That's the whole point of it.
--
David Kastrup