aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-11-22 17:52:24 +0000
committerDave Love2000-11-22 17:52:24 +0000
commit6b29231253d3021eb5b46ebbae6b00ce3e13b45c (patch)
tree5caa5f488f7b7846bfa505ef519c0ab74976d5c5
parent197615f33f70b994afbf797c60482c258ddfa511 (diff)
downloademacs-6b29231253d3021eb5b46ebbae6b00ce3e13b45c.tar.gz
emacs-6b29231253d3021eb5b46ebbae6b00ce3e13b45c.zip
(custom-buffer-create-internal): Save some consing.
(custom-variable-set): Improve validation error mesage.
-rw-r--r--lisp/cus-edit.el35
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index c7b0960c2ed..d8fa38249eb 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1297,14 +1297,13 @@ Un-customize all values in this buffer. They get their standard settings."
1297 :tag "Finish" 1297 :tag "Finish"
1298 :help-echo 1298 :help-echo
1299 (lambda (&rest ignore) 1299 (lambda (&rest ignore)
1300 (concat (cond 1300 (cond
1301 ((eq custom-buffer-done-function 1301 ((eq custom-buffer-done-function
1302 'custom-bury-buffer) 1302 'custom-bury-buffer)
1303 "Bury") 1303 "Bury this buffer")
1304 ((eq custom-buffer-done-function 'kill-buffer) 1304 ((eq custom-buffer-done-function 'kill-buffer)
1305 "Kill") 1305 "Kill this buffer")
1306 (t "Finish with")) 1306 (t "Finish with this buffer")))
1307 " the buffer."))
1308 :action #'Custom-buffer-done) 1307 :action #'Custom-buffer-done)
1309 (widget-insert "\n\n") 1308 (widget-insert "\n\n")
1310 (message "Creating customization items...") 1309 (message "Creating customization items...")
@@ -1322,18 +1321,18 @@ Un-customize all values in this buffer. They get their standard settings."
1322 (let ((count 0) 1321 (let ((count 0)
1323 (length (length options))) 1322 (length (length options)))
1324 (mapcar (lambda (entry) 1323 (mapcar (lambda (entry)
1325 (prog2 1324 (prog2
1326 (message "Creating customization items ...%2d%%" 1325 (message "Creating customization items ...%2d%%"
1327 (/ (* 100.0 count) length)) 1326 (/ (* 100.0 count) length))
1328 (widget-create (nth 1 entry) 1327 (widget-create (nth 1 entry)
1329 :tag (custom-unlispify-tag-name 1328 :tag (custom-unlispify-tag-name
1330 (nth 0 entry)) 1329 (nth 0 entry))
1331 :value (nth 0 entry)) 1330 :value (nth 0 entry))
1332 (setq count (1+ count)) 1331 (setq count (1+ count))
1333 (unless (eq (preceding-char) ?\n) 1332 (unless (eq (preceding-char) ?\n)
1334 (widget-insert "\n")) 1333 (widget-insert "\n"))
1335 (widget-insert "\n"))) 1334 (widget-insert "\n")))
1336 options)))) 1335 options))))
1337 (unless (eq (preceding-char) ?\n) 1336 (unless (eq (preceding-char) ?\n)
1338 (widget-insert "\n")) 1337 (widget-insert "\n"))
1339 (message "Creating customization items ...%2d%%done" 100) 1338 (message "Creating customization items ...%2d%%done" 100)
@@ -2379,7 +2378,7 @@ Optional EVENT is the location for the menu."
2379 (error "Cannot set hidden variable")) 2378 (error "Cannot set hidden variable"))
2380 ((setq val (widget-apply child :validate)) 2379 ((setq val (widget-apply child :validate))
2381 (goto-char (widget-get val :from)) 2380 (goto-char (widget-get val :from))
2382 (error "%s" (widget-get val :error))) 2381 (error "Saving %s: %s" symbol (widget-get val :error)))
2383 ((memq form '(lisp mismatch)) 2382 ((memq form '(lisp mismatch))
2384 (when (equal comment "") 2383 (when (equal comment "")
2385 (setq comment nil) 2384 (setq comment nil)