diff options
| author | Richard M. Stallman | 1995-06-21 23:03:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-21 23:03:59 +0000 |
| commit | 90fec20ab652d5e7311322bdd2aa8916e03edeef (patch) | |
| tree | be8778fcb7119e080af728b650fbfeba14f97672 | |
| parent | dc61cb9dd8c79d95f5020908b171c8482a17908a (diff) | |
| download | emacs-90fec20ab652d5e7311322bdd2aa8916e03edeef.tar.gz emacs-90fec20ab652d5e7311322bdd2aa8916e03edeef.zip | |
(eval-defun): Don't change defvar to defconst
if it has just one argument.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 2a2c88a9a17..9b59c672ead 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -277,7 +277,8 @@ With argument, insert value in current buffer after the defun." | |||
| 277 | (end-of-defun) | 277 | (end-of-defun) |
| 278 | (beginning-of-defun) | 278 | (beginning-of-defun) |
| 279 | (read (current-buffer))))) | 279 | (read (current-buffer))))) |
| 280 | (if (eq (car form) 'defvar) | 280 | (if (and (eq (car form) 'defvar) |
| 281 | (cdr-safe (cdr-safe form))) | ||
| 281 | (setq form (cons 'defconst (cdr form)))) | 282 | (setq form (cons 'defconst (cdr form)))) |
| 282 | (prin1 (eval form)))) | 283 | (prin1 (eval form)))) |
| 283 | 284 | ||