changeset 56004:397f87132b70

(edebug-eval-defun): Add `defface'. Fix docstring.
author Juri Linkov <juri@jurta.org>
date Thu, 10 Jun 2004 04:18:04 +0000
parents 9650d55ad73d
children 54d79ab53dd3
files lisp/emacs-lisp/edebug.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/edebug.el	Thu Jun 10 04:16:05 2004 +0000
+++ b/lisp/emacs-lisp/edebug.el	Thu Jun 10 04:18:04 2004 +0000
@@ -477,7 +477,8 @@
 If the current defun is actually a call to `defvar', then reset the
 variable using its initial value expression even if the variable
 already has some other value.  (Normally `defvar' does not change the
-variable's value if it already has a value.)
+variable's value if it already has a value.)  Treat `defcustom'
+similarly.  Reinitialize the face according to `defface' specification.
 
 With a prefix argument, instrument the code for Edebug.
 
@@ -507,7 +508,12 @@
 	  ((and (eq (car form) 'defcustom)
 		(default-boundp (nth 1 form)))
 	   ;; Force variable to be bound.
-	   (set-default (nth 1 form) (eval (nth 2 form)))))
+	   (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))))
     (setq edebug-result (eval form))
     (if (not edebugging)
 	(princ edebug-result)