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 15:57:02 +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

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

1. Start emacs by typing 'emacs'.
2. C-x C-f test.tex (or activate LaTeX-mode by other means).
3. Type '2 RET \section{test} RET 2 RET'.
4. M-x linum-mode
5. Compare the '2' printed by linum and the two '2's in the buffer.
Both are rendered differently.

I've additionally attached a small screen shot, where the problem can
also be seen for a number '8' (try zooming in).

System:
GNU Emacs 22.1.50.1 (i386-mingw-nt5.1.2600) of 2007-07-07 on NEUTRINO
AUCTeX 11.84
linum.el 0.9t


> I don't know just which other faces behave like default and which
> like shadow (though the face (not just the weight) bold seems to
> inherit even more attributes than shadow), nor do I know why there is
> this difference.

Hm, could it be that 'default' in general refers to a specific font
whereas 'shadow' doesn't (Font Family is *)?  I agree that 'shadow'
shouldn't be an explicit face definition, but modify "what's already
there", e.g., change a property of text set in default face.  But
inheriting font-locking related properties (and only for /some/ fonts)
is bad, IMHO.  Are there means to toggle that behaviour?


> But I do know that this has to do generally with display properties
> and display margins, not just with linum.el.

I guess, I've never met those 'display margins' before.  Could you
please give a hint about what you're speaking to somebody not so good at
managing Emacs (yet)?

Best regards,
Stephan Hennig

PNG image


reply via email to

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