diff options
| -rw-r--r-- | lisp/custom.el | 11 | ||||
| -rw-r--r-- | lisp/startup.el | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index 2c9eadbd479..614f8cf822d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -117,9 +117,10 @@ For the standard setting, use `set-default'." | |||
| 117 | (set-default symbol (eval exp))))))) | 117 | (set-default symbol (eval exp))))))) |
| 118 | 118 | ||
| 119 | (defvar custom-delayed-init-variables nil | 119 | (defvar custom-delayed-init-variables nil |
| 120 | "List of variables whose initialization is pending.") | 120 | "List of variables whose initialization is pending until startup. |
| 121 | Once this list has been processed, this var is set to a non-list value.") | ||
| 121 | 122 | ||
| 122 | (defun custom-initialize-delay (symbol _value) | 123 | (defun custom-initialize-delay (symbol value) |
| 123 | "Delay initialization of SYMBOL to the next Emacs start. | 124 | "Delay initialization of SYMBOL to the next Emacs start. |
| 124 | This is used in files that are preloaded (or for autoloaded | 125 | This is used in files that are preloaded (or for autoloaded |
| 125 | variables), so that the initialization is done in the run-time | 126 | variables), so that the initialization is done in the run-time |
| @@ -133,7 +134,11 @@ the :set function." | |||
| 133 | ;; This seemed to be at least as good as setting it to an arbitrary | 134 | ;; This seemed to be at least as good as setting it to an arbitrary |
| 134 | ;; value like nil (evaluating `value' is not an option because it | 135 | ;; value like nil (evaluating `value' is not an option because it |
| 135 | ;; may have undesirable side-effects). | 136 | ;; may have undesirable side-effects). |
| 136 | (push symbol custom-delayed-init-variables)) | 137 | (if (listp custom-delayed-init-variables) |
| 138 | (push symbol custom-delayed-init-variables) | ||
| 139 | ;; In case this is called after startup, there is no "later" to which to | ||
| 140 | ;; delay it, so initialize it "normally" (bug#47072). | ||
| 141 | (custom-initialize-reset symbol value))) | ||
| 137 | 142 | ||
| 138 | (defun custom-declare-variable (symbol default doc &rest args) | 143 | (defun custom-declare-variable (symbol default doc &rest args) |
| 139 | "Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments. | 144 | "Like `defcustom', but SYMBOL and DEFAULT are evaluated as normal arguments. |
diff --git a/lisp/startup.el b/lisp/startup.el index 4d4c65e6c41..c1267274d92 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1175,7 +1175,7 @@ please check its value") | |||
| 1175 | ;; are dependencies between them. | 1175 | ;; are dependencies between them. |
| 1176 | (nreverse custom-delayed-init-variables)) | 1176 | (nreverse custom-delayed-init-variables)) |
| 1177 | (mapc #'custom-reevaluate-setting custom-delayed-init-variables) | 1177 | (mapc #'custom-reevaluate-setting custom-delayed-init-variables) |
| 1178 | (setq custom-delayed-init-variables nil) | 1178 | (setq custom-delayed-init-variables t) |
| 1179 | 1179 | ||
| 1180 | ;; Warn for invalid user name. | 1180 | ;; Warn for invalid user name. |
| 1181 | (when init-file-user | 1181 | (when init-file-user |