578 |
value))) |
value))) |
579 |
|
|
580 |
(defun eval-defun-1 (form) |
(defun eval-defun-1 (form) |
581 |
"Change defvar into defconst within FORM. |
"Treat some expressions specially. |
582 |
Likewise for other constructs as necessary." |
Reset the `defvar' and `defcustom' variables to the initial value. |
583 |
|
Reinitialize the face according to the `defface' specification." |
584 |
;; The code in edebug-defun should be consistent with this, but not |
;; The code in edebug-defun should be consistent with this, but not |
585 |
;; the same, since this gets a macroexpended form. |
;; the same, since this gets a macroexpended form. |
586 |
(cond ((not (listp form)) |
(cond ((not (listp form)) |
598 |
;; Force variable to be bound. |
;; Force variable to be bound. |
599 |
(set-default (eval (nth 1 form)) (eval (nth 1 (nth 2 form)))) |
(set-default (eval (nth 1 form)) (eval (nth 1 (nth 2 form)))) |
600 |
form) |
form) |
601 |
|
;; `defface' is macroexpanded to `custom-declare-face'. |
602 |
|
((eq (car form) 'custom-declare-face) |
603 |
|
;; Reset the face. |
604 |
|
(put (eval (nth 1 form)) 'face-defface-spec nil) |
605 |
|
(setq face-new-frame-defaults |
606 |
|
(assq-delete-all (eval (nth 1 form)) face-new-frame-defaults)) |
607 |
|
form) |
608 |
((eq (car form) 'progn) |
((eq (car form) 'progn) |
609 |
(cons 'progn (mapcar 'eval-defun-1 (cdr form)))) |
(cons 'progn (mapcar 'eval-defun-1 (cdr form)))) |
610 |
(t form))) |
(t form))) |
640 |
(setq beg (point)) |
(setq beg (point)) |
641 |
(setq form (read (current-buffer))) |
(setq form (read (current-buffer))) |
642 |
(setq end (point))) |
(setq end (point))) |
643 |
;; Alter the form if necessary, changing defvar into defconst, etc. |
;; Alter the form if necessary. |
644 |
(setq form (eval-defun-1 (macroexpand form))) |
(setq form (eval-defun-1 (macroexpand form))) |
645 |
(list beg end standard-output |
(list beg end standard-output |
646 |
`(lambda (ignore) |
`(lambda (ignore) |