/[emacs]/emacs/lisp/emacs-lisp/lisp-mode.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/lisp-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.134.4.8 by miles, Tue Jul 6 09:31:50 2004 UTC revision 1.134.4.9 by miles, Tue Jul 6 10:00:21 2004 UTC
# Line 578  Interactively, with prefix argument, pri Line 578  Interactively, with prefix argument, pri
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))
# Line 597  Likewise for other constructs as necessa Line 598  Likewise for other constructs as necessa
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)))
# Line 632  Return the result of evaluation." Line 640  Return the result of evaluation."
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)

Legend:
Removed from v.1.134.4.8  
changed lines
  Added in v.1.134.4.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26