((eq keyword :options)
(if (get symbol 'custom-options)
;; Slow safe code to avoid duplicates.
- (mapcar (lambda (option)
- (custom-add-option symbol option))
+ (mapc (lambda (option)
+ (custom-add-option symbol option))
value)
;; Fast code for the common case.
(put symbol 'custom-options (copy-sequence value))))
set)
(when requests
(put symbol 'custom-requests requests)
- (mapcar 'require requests))
+ (mapc 'require requests))
(setq set (or (get symbol 'custom-set) 'custom-set-default))
(put symbol 'saved-value (list value))
(put symbol 'saved-variable-comment comment)
;; Allow for errors in the case where the setter has
- ;; changed between versions, say.
- (condition-case nil
+ ;; changed between versions, say, but let the user know.
+ (condition-case data
(cond (now
;; Rogue variable, set it now.
(put symbol 'force-value t)
((default-boundp symbol)
;; Something already set this, overwrite it.
(funcall set symbol (eval value))))
- (error nil))
+ (error
+ (message "Error setting %s: %s" symbol data)))
(setq args (cdr args))
(and (or now (default-boundp symbol))
(put symbol 'variable-comment comment)))