aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/custom.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/custom.el')
-rw-r--r--lisp/custom.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index 2f17ad36da0..bffd30bff21 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1143,8 +1143,9 @@ prompt the user for confirmation before loading it. But if
1143optional arg NO-CONFIRM is non-nil, load the theme without 1143optional arg NO-CONFIRM is non-nil, load the theme without
1144prompting. 1144prompting.
1145 1145
1146Normally, this function also enables THEME; if optional arg 1146Normally, this function also enables THEME. If optional arg
1147NO-ENABLE is non-nil, load the theme but don't enable it. 1147NO-ENABLE is non-nil, load the theme but don't enable it, unless
1148the theme was already enabled.
1148 1149
1149This function is normally called through Customize when setting 1150This function is normally called through Customize when setting
1150`custom-enabled-themes'. If used directly in your init file, it 1151`custom-enabled-themes'. If used directly in your init file, it
@@ -1160,6 +1161,10 @@ Return t if THEME was successfully loaded, nil otherwise."
1160 nil nil)) 1161 nil nil))
1161 (unless (custom-theme-name-valid-p theme) 1162 (unless (custom-theme-name-valid-p theme)
1162 (error "Invalid theme name `%s'" theme)) 1163 (error "Invalid theme name `%s'" theme))
1164 ;; If THEME is already enabled, re-enable it after loading, even if
1165 ;; NO-ENABLE is t.
1166 (if no-enable
1167 (setq no-enable (not (custom-theme-enabled-p theme))))
1163 ;; If reloading, clear out the old theme settings. 1168 ;; If reloading, clear out the old theme settings.
1164 (when (custom-theme-p theme) 1169 (when (custom-theme-p theme)
1165 (disable-theme theme) 1170 (disable-theme theme)