diff options
| author | Richard M. Stallman | 1995-03-11 22:42:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-03-11 22:42:29 +0000 |
| commit | e31897edd8d83da385acec5fc6d971d1395c11f9 (patch) | |
| tree | a1a0b089442740598ddbbd3d2eab76b5894b2421 | |
| parent | 3cb719bd3bb90d9b1c15517919d463d24bf174ce (diff) | |
| download | emacs-e31897edd8d83da385acec5fc6d971d1395c11f9.tar.gz emacs-e31897edd8d83da385acec5fc6d971d1395c11f9.zip | |
(eval-defun): Convert defvar to defconst.
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 7d9fbf108dd..99b1d49f32f 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -244,11 +244,14 @@ With argument, print output into current buffer." | |||
| 244 | Print value in minibuffer. | 244 | Print value in minibuffer. |
| 245 | With argument, insert value in current buffer after the defun." | 245 | With argument, insert value in current buffer after the defun." |
| 246 | (interactive "P") | 246 | (interactive "P") |
| 247 | (let ((standard-output (if eval-defun-arg-internal (current-buffer) t))) | 247 | (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) |
| 248 | (prin1 (eval (save-excursion | 248 | (form (save-excursion |
| 249 | (end-of-defun) | 249 | (end-of-defun) |
| 250 | (beginning-of-defun) | 250 | (beginning-of-defun) |
| 251 | (read (current-buffer))))))) | 251 | (read (current-buffer))))) |
| 252 | (if (eq (car form) 'defvar) | ||
| 253 | (setq form (cons 'defconst (cdr form)))) | ||
| 254 | (prin1 (eval form)))) | ||
| 252 | 255 | ||
| 253 | (defun lisp-comment-indent () | 256 | (defun lisp-comment-indent () |
| 254 | (if (looking-at "\\s<\\s<\\s<") | 257 | (if (looking-at "\\s<\\s<\\s<") |