auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: Fontifying of titles...


From: Reiner Steib
Subject: [AUCTeX-devel] Re: Fontifying of titles...
Date: Mon, 25 Apr 2005 12:37:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

On Thu, Apr 21 2005, Reiner Steib wrote:

> +      (setq face-exists (if (featurep 'xemacs)
> +                         (find-face face-name)
> +                       (facep face-name)))
> +      (eval
> +       `(defface ,face-name
[...]
> +      (if face-exists
> +       (message "face:%s already exists, skipping parent" face-name)
> +     ;; (message "face:%s, inherit/parent:%s" face-name f-inherit)
> +     (if (fboundp 'set-face-parent)
> +         (set-face-parent face-name f-inherit)
> +       (set-face-attribute face-name nil :inherit f-inherit))))))

Ralf, you changed this to:

  (unless (get face-name 'saved-face) ; Do not touch customized faces.
    [...])

This test is okay for customized faces, but my original test also
covered existing faces which might not been created by customize
(e.g. using `copy-face'):

ELISP> (featurep 'font-latex)
nil
ELISP> (facep 'font-latex-title-0-face)
nil
ELISP> (copy-face 'bold 'font-latex-title-0-face)
font-latex-title-0-face
ELISP> (and (facep 'font-latex-title-0-face) t)
t
ELISP> (get 'font-latex-title-0-face 'saved-face)
nil

,----[ (describe-face 'font-latex-title-0-face) ]
| Face: font-latex-title-0-face (customize this face)
| Documentation: Not documented as a face.
| 
|          Family: unspecified
|           Width: unspecified
|          Height: unspecified
|          Weight: bold
| [...]
| Font or fontset: nil
|         Inherit: unspecified
`----

After (require 'font-latex), I get:

,----[ After (require 'font-latex) ]
| Face: font-latex-title-0-face (customize this face)
| Documentation: Face for sectioning commands at level 0.
| 
| Probably you don't want to customize this face directly.  Better
| change the base face `font-latex-title-5-face' or customize the
| variable `font-latex-title-fontify'.
| 
|          Family: unspecified
|           Width: unspecified
|          Height: 1.1
|          Weight: bold
| [...]
| Font or fontset: nil
|         Inherit: font-latex-title-1-face
`----

Using my original test in `font-latex-make-title-faces' should cover
this case, but I'm not sure what we can do in
`font-latex-update-title-faces'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





reply via email to

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