summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/edebug.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-06-21 15:59:51 +0000
committerJuri Linkov <juri@jurta.org>2005-06-21 15:59:51 +0000
commit7cbb6dad76b843f48f0f1edcc848bc9207ad8994 (patch)
tree2b88a135da4e72e855faef00a97950c1828c254b /lisp/emacs-lisp/edebug.el
parenta416b8923fb063c3a04bac2a84842cee29516ec6 (diff)
downloademacs-7cbb6dad76b843f48f0f1edcc848bc9207ad8994.tar.gz
emacs-7cbb6dad76b843f48f0f1edcc848bc9207ad8994.tar.bz2
emacs-7cbb6dad76b843f48f0f1edcc848bc9207ad8994.zip
(edebug-eval-defun):
Set `saved-face' temporarily to nil before calling form. Set `customized-face' to the new spec after that.
Diffstat (limited to 'lisp/emacs-lisp/edebug.el')
-rw-r--r--lisp/emacs-lisp/edebug.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index e9c767961cd..ebe375088a3 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -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)