# HG changeset patch # User Dave Love # Date 920571166 0 # Node ID 4a78f6354310ce3196ffc1c7250624f25666e7d3 # Parent 8a9d8919ebe871680a3cad6d13b28b6a3970aa3b (custom-set-variables): Protect against setter errors. diff -r 8a9d8919ebe8 -r 4a78f6354310 lisp/custom.el --- a/lisp/custom.el Thu Mar 04 11:35:42 1999 +0000 +++ b/lisp/custom.el Thu Mar 04 18:12:46 1999 +0000 @@ -414,13 +414,17 @@ (mapcar 'require requests)) (setq set (or (get symbol 'custom-set) 'custom-set-default)) (put symbol 'saved-value (list value)) - (cond (now - ;; Rogue variable, set it now. - (put symbol 'force-value t) - (funcall set symbol (eval value))) - ((default-boundp symbol) - ;; Something already set this, overwrite it. - (funcall set symbol (eval value)))) + ;; Allow for errors in the case where the setter has + ;; changed between versions, say. + (condition-case nil + (cond (now + ;; Rogue variable, set it now. + (put symbol 'force-value t) + (funcall set symbol (eval value))) + ((default-boundp symbol) + ;; Something already set this, overwrite it. + (funcall set symbol (eval value)))) + (error nil)) (setq args (cdr args))) ;; Old format, a plist of SYMBOL VALUE pairs. (message "Warning: old format `custom-set-variables'")