(custom-buffer-create-internal): Save some consing.

(custom-variable-set): Improve validation error mesage.
This commit is contained in:
Dave Love 2000-11-22 17:52:24 +00:00
parent 197615f33f
commit 6b29231253

View file

@ -1297,14 +1297,13 @@ Un-customize all values in this buffer. They get their standard settings."
:tag "Finish" :tag "Finish"
:help-echo :help-echo
(lambda (&rest ignore) (lambda (&rest ignore)
(concat (cond (cond
((eq custom-buffer-done-function ((eq custom-buffer-done-function
'custom-bury-buffer) 'custom-bury-buffer)
"Bury") "Bury this buffer")
((eq custom-buffer-done-function 'kill-buffer) ((eq custom-buffer-done-function 'kill-buffer)
"Kill") "Kill this buffer")
(t "Finish with")) (t "Finish with this buffer")))
" the buffer."))
:action #'Custom-buffer-done) :action #'Custom-buffer-done)
(widget-insert "\n\n") (widget-insert "\n\n")
(message "Creating customization items...") (message "Creating customization items...")
@ -2379,7 +2378,7 @@ Optional EVENT is the location for the menu."
(error "Cannot set hidden variable")) (error "Cannot set hidden variable"))
((setq val (widget-apply child :validate)) ((setq val (widget-apply child :validate))
(goto-char (widget-get val :from)) (goto-char (widget-get val :from))
(error "%s" (widget-get val :error))) (error "Saving %s: %s" symbol (widget-get val :error)))
((memq form '(lisp mismatch)) ((memq form '(lisp mismatch))
(when (equal comment "") (when (equal comment "")
(setq comment nil) (setq comment nil)