477 |
If the current defun is actually a call to `defvar', then reset the |
If the current defun is actually a call to `defvar', then reset the |
478 |
variable using its initial value expression even if the variable |
variable using its initial value expression even if the variable |
479 |
already has some other value. (Normally `defvar' does not change the |
already has some other value. (Normally `defvar' does not change the |
480 |
variable's value if it already has a value.) |
variable's value if it already has a value.) Treat `defcustom' |
481 |
|
similarly. Reinitialize the face according to `defface' specification. |
482 |
|
|
483 |
With a prefix argument, instrument the code for Edebug. |
With a prefix argument, instrument the code for Edebug. |
484 |
|
|
508 |
((and (eq (car form) 'defcustom) |
((and (eq (car form) 'defcustom) |
509 |
(default-boundp (nth 1 form))) |
(default-boundp (nth 1 form))) |
510 |
;; Force variable to be bound. |
;; Force variable to be bound. |
511 |
(set-default (nth 1 form) (eval (nth 2 form))))) |
(set-default (nth 1 form) (eval (nth 2 form)))) |
512 |
|
((eq (car form) 'defface) |
513 |
|
;; Reset the face. |
514 |
|
(put (nth 1 form) 'face-defface-spec nil) |
515 |
|
(setq face-new-frame-defaults |
516 |
|
(assq-delete-all (nth 1 form) face-new-frame-defaults)))) |
517 |
(setq edebug-result (eval form)) |
(setq edebug-result (eval form)) |
518 |
(if (not edebugging) |
(if (not edebugging) |
519 |
(princ edebug-result) |
(princ edebug-result) |
3698 |
(setq edebug-previous-result |
(setq edebug-previous-result |
3699 |
(concat "Result: " |
(concat "Result: " |
3700 |
(edebug-safe-prin1-to-string edebug-previous-value) |
(edebug-safe-prin1-to-string edebug-previous-value) |
3701 |
(let ((name (prin1-char edebug-previous-value))) |
(eval-expression-print-format edebug-previous-value)))) |
|
(if name (concat " = " name)))))) |
|
3702 |
|
|
3703 |
(defun edebug-previous-result () |
(defun edebug-previous-result () |
3704 |
"Print the previous result." |
"Print the previous result." |
3717 |
(princ |
(princ |
3718 |
(edebug-outside-excursion |
(edebug-outside-excursion |
3719 |
(setq values (cons (edebug-eval edebug-expr) values)) |
(setq values (cons (edebug-eval edebug-expr) values)) |
3720 |
(edebug-safe-prin1-to-string (car values))))) |
(concat (edebug-safe-prin1-to-string (car values)) |
3721 |
|
(eval-expression-print-format (car values)))))) |
3722 |
|
|
3723 |
(defun edebug-eval-last-sexp () |
(defun edebug-eval-last-sexp () |
3724 |
"Evaluate sexp before point in the outside environment; value in minibuffer." |
"Evaluate sexp before point in the outside environment; value in minibuffer." |