1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-08 23:40:24 -08:00

(eval-defun): Don't change defvar to defconst

if it has just one argument.
This commit is contained in:
Richard M. Stallman 1995-06-21 23:03:59 +00:00
parent dc61cb9dd8
commit 90fec20ab6

View file

@ -277,7 +277,8 @@ With argument, insert value in current buffer after the defun."
(end-of-defun)
(beginning-of-defun)
(read (current-buffer)))))
(if (eq (car form) 'defvar)
(if (and (eq (car form) 'defvar)
(cdr-safe (cdr-safe form)))
(setq form (cons 'defconst (cdr form))))
(prin1 (eval form))))