comparison lisp/emacs-lisp/lisp-mode.el @ 42235:103ed59cfd30

(eval-defun-1): Cope with atoms as args.
author Richard M. Stallman <rms@gnu.org>
date Fri, 21 Dec 2001 14:07:45 +0000
parents fb0d648feaa6
children 1da0dfa86ab5
comparison
equal deleted inserted replaced
42234:64fa0eed5865 42235:103ed59cfd30
528 (defun eval-defun-1 (form) 528 (defun eval-defun-1 (form)
529 "Change defvar into defconst within FORM. 529 "Change defvar into defconst within FORM.
530 Likewise for other constructs as necessary." 530 Likewise for other constructs as necessary."
531 ;; The code in edebug-defun should be consistent with this, but not 531 ;; The code in edebug-defun should be consistent with this, but not
532 ;; the same, since this gets a macroexpended form. 532 ;; the same, since this gets a macroexpended form.
533 (cond ((and (eq (car form) 'defvar) 533 (cond ((not (listp form))
534 form)
535 ((and (eq (car form) 'defvar)
534 (cdr-safe (cdr-safe form))) 536 (cdr-safe (cdr-safe form)))
535 ;; Force variable to be bound. 537 ;; Force variable to be bound.
536 (cons 'defconst (cdr form))) 538 (cons 'defconst (cdr form)))
537 ;; `defcustom' is now macroexpanded to 539 ;; `defcustom' is now macroexpanded to
538 ;; `custom-declare-variable' with a quoted value arg. 540 ;; `custom-declare-variable' with a quoted value arg.