diff options
| author | Glenn Morris | 2017-02-21 15:11:56 -0500 |
|---|---|---|
| committer | Glenn Morris | 2017-02-21 15:11:56 -0500 |
| commit | 217eaf6932f68049e8f7f207b153c09ca85c7032 (patch) | |
| tree | da9f0da2d43c1fbd6b5d338c4e410d29376ef3ab | |
| parent | bac7de05e26dff44cd15d26f7f37fad1f8ce154b (diff) | |
| download | emacs-217eaf6932f68049e8f7f207b153c09ca85c7032.tar.gz emacs-217eaf6932f68049e8f7f207b153c09ca85c7032.zip | |
; * lisp/custom.el: Comments.
| -rw-r--r-- | lisp/custom.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 030478ab172..ecfa34db5bb 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -765,9 +765,16 @@ Use the :set function to do so. This is useful for customizable options | |||
| 765 | that are defined before their standard value can really be computed. | 765 | that are defined before their standard value can really be computed. |
| 766 | E.g. dumped variables whose default depends on run-time information." | 766 | E.g. dumped variables whose default depends on run-time information." |
| 767 | ;; If it has never been set at all, defvar it so as to mark it | 767 | ;; If it has never been set at all, defvar it so as to mark it |
| 768 | ;; special, etc (bug#25770). | 768 | ;; special, etc (bug#25770). This means we are initializing |
| 769 | ;; the variable, and normally any :set function would not apply. | ||
| 770 | ;; For custom-initialize-delay, however, it is documented that "the | ||
| 771 | ;; (delayed) initialization is performed with the :set function". | ||
| 772 | ;; This is needed by eg global-font-lock-mode, which uses | ||
| 773 | ;; custom-initialize-delay but needs the :set function custom-set-minor-mode | ||
| 774 | ;; to also run during initialization. So, long story short, we | ||
| 775 | ;; always do the funcall step, even if symbol was not bound before. | ||
| 769 | (or (default-boundp symbol) | 776 | (or (default-boundp symbol) |
| 770 | (eval `(defvar ,symbol nil))) | 777 | (eval `(defvar ,symbol nil))) ; reset below, so any value is fine |
| 771 | (funcall (or (get symbol 'custom-set) 'set-default) | 778 | (funcall (or (get symbol 'custom-set) 'set-default) |
| 772 | symbol | 779 | symbol |
| 773 | (eval (car (or (get symbol 'saved-value) (get symbol 'standard-value)))))) | 780 | (eval (car (or (get symbol 'saved-value) (get symbol 'standard-value)))))) |