aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-10 05:58:24 +0000
committerRichard M. Stallman1997-04-10 05:58:24 +0000
commit2c66f5d19633aaed36d7da8722dd06a2cc108132 (patch)
treefebba811a7e79eaf50c762894c20fa63c03197c3
parent328c069714ae705f93fc09607e47f5c19ddf2353 (diff)
downloademacs-2c66f5d19633aaed36d7da8722dd06a2cc108132.tar.gz
emacs-2c66f5d19633aaed36d7da8722dd06a2cc108132.zip
(eval-defun): For defcustom, always set the value.
-rw-r--r--lisp/emacs-lisp/lisp-mode.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index ebdee0673ee..be328b30329 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -329,9 +329,14 @@ With argument, insert value in current buffer after the defun."
329 (end-of-defun) 329 (end-of-defun)
330 (beginning-of-defun) 330 (beginning-of-defun)
331 (read (current-buffer))))) 331 (read (current-buffer)))))
332 (if (and (eq (car form) 'defvar) 332 (cond ((and (eq (car form) 'defvar)
333 (cdr-safe (cdr-safe form))) 333 (cdr-safe (cdr-safe form)))
334 (setq form (cons 'defconst (cdr form)))) 334 ;; Force variable to be bound.
335 (setq form (cons 'defconst (cdr form))))
336 ((and (eq (car form) 'defcustom)
337 (default-boundp (nth 1 form)))
338 ;; Force variable to be bound.
339 (set-default (nth 1 form) (eval (nth 2 form)))))
335 (prin1 (eval form)))) 340 (prin1 (eval form))))
336 341
337(defun lisp-comment-indent () 342(defun lisp-comment-indent ()