]> git.eshelyaron.com Git - emacs.git/commitdiff
(edebug-eval-defun):
authorJuri Linkov <juri@jurta.org>
Tue, 21 Jun 2005 15:59:51 +0000 (15:59 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 21 Jun 2005 15:59:51 +0000 (15:59 +0000)
Set `saved-face' temporarily to nil before calling form.
Set `customized-face' to the new spec after that.

lisp/emacs-lisp/edebug.el

index e9c767961cd489ec7e5627159dbf82af7d2a28b3..ebe375088a300f5f77978e698cb53e2d85998f8b 100644 (file)
@@ -511,9 +511,16 @@ the minibuffer."
           (set-default (nth 1 form) (eval (nth 2 form))))
           ((eq (car form) 'defface)
            ;; Reset the face.
-           (put (nth 1 form) 'face-defface-spec nil)
            (setq face-new-frame-defaults
-                 (assq-delete-all (nth 1 form) face-new-frame-defaults))))
+                 (assq-delete-all (nth 1 form) face-new-frame-defaults))
+           (put (nth 1 form) 'face-defface-spec nil)
+          ;; 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)