Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2c66f5d1
Commit
2c66f5d1
authored
Apr 10, 1997
by
Richard M. Stallman
Browse files
(eval-defun): For defcustom, always set the value.
parent
328c0697
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lisp/emacs-lisp/lisp-mode.el
lisp/emacs-lisp/lisp-mode.el
+8
-3
No files found.
lisp/emacs-lisp/lisp-mode.el
View file @
2c66f5d1
...
...
@@ -329,9 +329,14 @@ With argument, insert value in current buffer after the defun."
(
end-of-defun
)
(
beginning-of-defun
)
(
read
(
current-buffer
)))))
(
if
(
and
(
eq
(
car
form
)
'defvar
)
(
cdr-safe
(
cdr-safe
form
)))
(
setq
form
(
cons
'defconst
(
cdr
form
))))
(
cond
((
and
(
eq
(
car
form
)
'defvar
)
(
cdr-safe
(
cdr-safe
form
)))
;; Force variable to be bound.
(
setq
form
(
cons
'defconst
(
cdr
form
))))
((
and
(
eq
(
car
form
)
'defcustom
)
(
default-boundp
(
nth
1
form
)))
;; Force variable to be bound.
(
set-default
(
nth
1
form
)
(
eval
(
nth
2
form
)))))
(
prin1
(
eval
form
))))
(
defun
lisp-comment-indent
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment