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: Stephan Hennig
Subject: Re: linum and AUCTeX: line number face
Date: Mon, 17 Sep 2007 19:38:46 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0 Hamster/2.1.0.1501

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

First, let me correct myself (too much testing).  Bold line numbers can
be seen with any of the fonts 'Bitstream Vera Sans Mono', 'Lucida Sans
Typewriter' or 'Outline-Consolas'.  Only for 'Courier' or 'Courier New'
there are uniform medium weight line numbers.


>> 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.


> 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.

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?

Best regards,
Stephan Hennig


(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 (:foreground "black" :slant normal :weight normal)))))
(custom-set-variables
  ;; custom-set-variables 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.
 )





reply via email to

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