changeset 63639:da180163f2f6

(edebug-eval-defun): Set `saved-face' temporarily to nil before calling form. Set `customized-face' to the new spec after that.
author Juri Linkov <juri@jurta.org>
date Tue, 21 Jun 2005 15:59:51 +0000
parents 83144542b6da
children 2b9aa367d2f8
files lisp/emacs-lisp/edebug.el
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/edebug.el	Tue Jun 21 15:59:33 2005 +0000
+++ b/lisp/emacs-lisp/edebug.el	Tue Jun 21 15:59:51 2005 +0000
@@ -511,9 +511,16 @@
 	   (set-default (nth 1 form) (eval (nth 2 form))))
           ((eq (car form) 'defface)
            ;; Reset the face.
+           (setq face-new-frame-defaults
+                 (assq-delete-all (nth 1 form) face-new-frame-defaults))
            (put (nth 1 form) 'face-defface-spec nil)
-           (setq face-new-frame-defaults
-                 (assq-delete-all (nth 1 form) face-new-frame-defaults))))
+	   ;; See comments in `eval-defun-1' for purpose of code below
+	   (setq form (prog1 `(prog1 ,form
+				(put ',(nth 1 form) 'saved-face
+				     ',(get (nth 1 form) 'saved-face))
+				(put ',(nth 1 form) 'customized-face
+				     ',(nth 2 form)))
+			(put (nth 1 form) 'saved-face nil)))))
     (setq edebug-result (eval form))
     (if (not edebugging)
 	(princ edebug-result)