comparison lisp/emacs-lisp/edebug.el @ 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 96c3254c37c5
children a1d03660a223 b7da78284d4c
comparison
equal deleted inserted replaced
63638:83144542b6da 63639:da180163f2f6
509 (default-boundp (nth 1 form))) 509 (default-boundp (nth 1 form)))
510 ;; Force variable to be bound. 510 ;; Force variable to be bound.
511 (set-default (nth 1 form) (eval (nth 2 form)))) 511 (set-default (nth 1 form) (eval (nth 2 form))))
512 ((eq (car form) 'defface) 512 ((eq (car form) 'defface)
513 ;; Reset the face. 513 ;; Reset the face.
514 (setq face-new-frame-defaults
515 (assq-delete-all (nth 1 form) face-new-frame-defaults))
514 (put (nth 1 form) 'face-defface-spec nil) 516 (put (nth 1 form) 'face-defface-spec nil)
515 (setq face-new-frame-defaults 517 ;; See comments in `eval-defun-1' for purpose of code below
516 (assq-delete-all (nth 1 form) face-new-frame-defaults)))) 518 (setq form (prog1 `(prog1 ,form
519 (put ',(nth 1 form) 'saved-face
520 ',(get (nth 1 form) 'saved-face))
521 (put ',(nth 1 form) 'customized-face
522 ',(nth 2 form)))
523 (put (nth 1 form) 'saved-face nil)))))
517 (setq edebug-result (eval form)) 524 (setq edebug-result (eval form))
518 (if (not edebugging) 525 (if (not edebugging)
519 (princ edebug-result) 526 (princ edebug-result)
520 edebug-result))) 527 edebug-result)))
521 528