Mercurial > emacs
diff lisp/emacs-lisp/lisp-mode.el @ 90197:b7da78284d4c
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-65
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 425-445)
- Remove "-face" suffix from gnus faces
- Update from CVS
- Remove "-face" suffix from MH-E faces
- Remove "-face" suffix from cc-mode faces
- Remove "-face" suffix from eshell faces
- Remove "-face" suffix from ediff faces
- Implement tty vertical-divider face
- Rename vertical-divider face to vertical-border
- Change escape-glyph color on dark backgrounds back to cyan
- Update reference to renamed Buffer-menu-buffer face
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 24 Jun 2005 01:59:52 +0000 |
parents | 173dee4e2611 83144542b6da |
children | bb71c6cf2009 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el Wed Jun 15 23:37:29 2005 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Fri Jun 24 01:59:52 2005 +0000 @@ -617,10 +617,23 @@ ;; `defface' is macroexpanded to `custom-declare-face'. ((eq (car form) 'custom-declare-face) ;; Reset the face. - (put (eval (nth 1 form)) 'face-defface-spec nil) (setq face-new-frame-defaults (assq-delete-all (eval (nth 1 form)) face-new-frame-defaults)) - form) + (put (eval (nth 1 form)) 'face-defface-spec nil) + ;; Setting `customized-face' to the new spec after calling + ;; the form, but preserving the old saved spec in `saved-face', + ;; imitates the situation when the new face spec is set + ;; temporarily for the current session in the customize + ;; buffer, thus allowing `face-user-default-spec' to use the + ;; new customized spec instead of the saved spec. + ;; Resetting `saved-face' temporarily to nil is needed to let + ;; `defface' change the spec, regardless of a saved spec. + (prog1 `(prog1 ,form + (put ',(eval (nth 1 form)) 'saved-face + ',(get (eval (nth 1 form)) 'saved-face)) + (put ',(eval (nth 1 form)) 'customized-face + ',(eval (nth 2 form)))) + (put (eval (nth 1 form)) 'saved-face nil))) ((eq (car form) 'progn) (cons 'progn (mapcar 'eval-defun-1 (cdr form)))) (t form)))