[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: face-alias issues
From: |
Luc Teirlinck |
Subject: |
Re: face-alias issues |
Date: |
Wed, 22 Jun 2005 22:24:56 -0500 (CDT) |
Miles Bader wrote:
Miles Bader <address@hidden> writes:
> What does it do when loading the user's existing customizations (with
> `custom-set-face' or whatever)? I expect it should do the same thing
there.
^^^^^^^^^^^^^^^
`custom-set-faces'
I believe that requires the patch below to `custom-theme-set-faces'.
Note that after this patch, if you save any face whatsoever to .emacs,
the reference to the obsolete face in your .emacs will automatically
be replaced with the new name. That is very nice in some sense, but
it also means that the customization may no longer work correctly on
older Emacs versions that still use the old name. I installed a similar
change for variable aliases (with the same drawback) a while ago.
Richard said that the drawback was not serious enough not to install
the variable change. I only adapted `custom-theme-set-variables',
however. Whatever we do, we should make the situation between
variables and faces consistent.
Have all faces that were renamed been given suitable aliases?
Otherwise, the feature may not work too well in practice.
===File ~/cus-face.el-diff==================================
*** cus-face.el 05 Jan 2005 08:30:11 -0600 1.36
--- cus-face.el 22 Jun 2005 21:33:21 -0500
***************
*** 319,324 ****
--- 319,328 ----
(spec (nth 1 entry))
(now (nth 2 entry))
(comment (nth 3 entry)))
+ ;; If FACE is actually an alias, customize the face it
+ ;; is aliased to.
+ (if (get face 'face-alias)
+ (setq face (get face 'face-alias)))
(put face 'saved-face spec)
(put face 'saved-face-comment comment)
(custom-push-theme 'theme-face face theme 'set spec)
***************
*** 333,338 ****
--- 337,344 ----
;; Old format, a plist of FACE SPEC pairs.
(let ((face (nth 0 args))
(spec (nth 1 args)))
+ (if (get face 'face-alias)
+ (setq face (get face 'face-alias)))
(put face 'saved-face spec)
(custom-push-theme 'theme-face face theme 'set spec))
(setq args (cdr (cdr args))))))))
============================================================
- face-alias issues, Glenn Morris, 2005/06/21
- Re: face-alias issues, Richard M. Stallman, 2005/06/22
- Re: face-alias issues, Glenn Morris, 2005/06/22
- Re: face-alias issues, Miles Bader, 2005/06/22
- Re: face-alias issues, Miles Bader, 2005/06/22
- Re: face-alias issues,
Luc Teirlinck <=
- Re: face-alias issues, Miles Bader, 2005/06/22
- Re: face-alias issues, Luc Teirlinck, 2005/06/22
- Re: face-alias issues, Kim F. Storm, 2005/06/23
- Re: face-alias issues, Luc Teirlinck, 2005/06/23
- Re: face-alias issues, Miles Bader, 2005/06/24
- Re: face-alias issues, Miles Bader, 2005/06/24
- Re: face-alias issues, Luc Teirlinck, 2005/06/24
- Re: face-alias issues, Miles Bader, 2005/06/24
- Re: face-alias issues, Luc Teirlinck, 2005/06/24
- Re: face-alias issues, Luc Teirlinck, 2005/06/23