aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-03-11 22:42:29 +0000
committerRichard M. Stallman1995-03-11 22:42:29 +0000
commite31897edd8d83da385acec5fc6d971d1395c11f9 (patch)
treea1a0b089442740598ddbbd3d2eab76b5894b2421
parent3cb719bd3bb90d9b1c15517919d463d24bf174ce (diff)
downloademacs-e31897edd8d83da385acec5fc6d971d1395c11f9.tar.gz
emacs-e31897edd8d83da385acec5fc6d971d1395c11f9.zip
(eval-defun): Convert defvar to defconst.
-rw-r--r--lisp/emacs-lisp/lisp-mode.el13
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."
244Print value in minibuffer. 244Print value in minibuffer.
245With argument, insert value in current buffer after the defun." 245With 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<")