Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 12352:e6b42a6ea8e6
(eval-defun): Don't change defvar to defconst
if it has just one argument.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 21 Jun 1995 23:03:59 +0000 |
parents | a4f383dd5adb |
children | 66b3d052d4fe |
comparison
equal
deleted
inserted
replaced
12351:f2e9eb6a8939 | 12352:e6b42a6ea8e6 |
---|---|
275 (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) | 275 (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) |
276 (form (save-excursion | 276 (form (save-excursion |
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 |
284 (defun lisp-comment-indent () | 285 (defun lisp-comment-indent () |
285 (if (looking-at "\\s<\\s<\\s<") | 286 (if (looking-at "\\s<\\s<\\s<") |