Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 17353:71db8e3ee12f
(eval-defun): For defcustom, always set the value.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 10 Apr 1997 05:58:24 +0000 |
parents | e52fa60d97e8 |
children | b1251bcaaa0e |
comparison
equal
deleted
inserted
replaced
17352:058970c0f57f | 17353:71db8e3ee12f |
---|---|
327 (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) | 327 (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)) |
328 (form (save-excursion | 328 (form (save-excursion |
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 () |
338 (if (looking-at "\\s<\\s<\\s<") | 343 (if (looking-at "\\s<\\s<\\s<") |
339 (current-column) | 344 (current-column) |