emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 20dda6b: Tweak recent custom-reevaluate-setting cha


From: Glenn Morris
Subject: [Emacs-diffs] master 20dda6b: Tweak recent custom-reevaluate-setting change
Date: Tue, 21 Feb 2017 13:00:06 -0500 (EST)

branch: master
commit 20dda6be76236253f689037a31dcc82cc9673bd4
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Tweak recent custom-reevaluate-setting change
    
    * lisp/custom.el (custom-reevaluate-setting):
    Tweak previous change to avoid font-lock init issues.
---
 lisp/custom.el | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/lisp/custom.el b/lisp/custom.el
index 7eaff45..030478a 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -764,17 +764,13 @@ Return non-nil if the `customized-value' property 
actually changed."
 Use the :set function to do so.  This is useful for customizable options
 that are defined before their standard value can really be computed.
 E.g. dumped variables whose default depends on run-time information."
-  (let ((val (car (or (get symbol 'saved-value)
-                     (get symbol 'standard-value)))))
-    (if (default-boundp symbol)
-       (funcall (or (get symbol 'custom-set) 'set-default) symbol (eval val))
-      ;; If it has never been set at all, defvar it so as to mark it
-      ;; special, etc (bug#25770).  This ignores any :set function,
-      ;; but that is not supposed to be used for initialization anyway.
-      ;; Or we could move this branch to the start, then unconditionally
-      ;; call the custom-set branch.
-      (eval `(defvar ,symbol ,val)))))
-
+  ;; If it has never been set at all, defvar it so as to mark it
+  ;; special, etc (bug#25770).
+  (or (default-boundp symbol)
+      (eval `(defvar ,symbol nil)))
+  (funcall (or (get symbol 'custom-set) 'set-default)
+          symbol
+          (eval (car (or (get symbol 'saved-value) (get symbol 
'standard-value))))))
 
 
 ;;; Custom Themes



reply via email to

[Prev in Thread] Current Thread [Next in Thread]