]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-set-variables): Protect against setter errors.
authorDave Love <fx@gnu.org>
Thu, 4 Mar 1999 18:12:46 +0000 (18:12 +0000)
committerDave Love <fx@gnu.org>
Thu, 4 Mar 1999 18:12:46 +0000 (18:12 +0000)
lisp/custom.el

index 5f08474ddc75e0754a26a93eab5a939d220a49e1..869681227ba222fff0eabe44a702e7a72a6fb353 100644 (file)
@@ -414,13 +414,17 @@ the default value for the SYMBOL."
              (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'")