aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Colascione2018-06-12 23:28:47 -0700
committerDaniel Colascione2018-06-12 23:28:47 -0700
commitb8478b2ab7ad19c629da9c6b0dfd9a6544a6acee (patch)
tree611c85ab29c47bf3acc2e4c6e0e84bac721c6c8e
parent5ed119141d10a09c4cd767c42a25a285f4f844ce (diff)
downloademacs-b8478b2ab7ad19c629da9c6b0dfd9a6544a6acee.tar.gz
emacs-b8478b2ab7ad19c629da9c6b0dfd9a6544a6acee.zip
Clarify that enabling a theme does not disable other themes
Avoid user confusion by explicitly stating that enabling a theme does not imply disabling other themes and that theme load functions are not theme switch functions. * lisp/custom.el (load-theme, enable-theme): Clarify docstrings.
-rw-r--r--lisp/custom.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/custom.el b/lisp/custom.el
index b7539685a89..2a489c4f5b3 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1184,7 +1184,7 @@ This variable cannot be set in a Custom theme."
1184 :version "24.1") 1184 :version "24.1")
1185 1185
1186(defun load-theme (theme &optional no-confirm no-enable) 1186(defun load-theme (theme &optional no-confirm no-enable)
1187 "Load Custom theme named THEME from its file. 1187 "Load Custom theme named THEME from its file and possibly enable it.
1188The theme file is named THEME-theme.el, in one of the directories 1188The theme file is named THEME-theme.el, in one of the directories
1189specified by `custom-theme-load-path'. 1189specified by `custom-theme-load-path'.
1190 1190
@@ -1197,6 +1197,11 @@ Normally, this function also enables THEME. If optional arg
1197NO-ENABLE is non-nil, load the theme but don't enable it, unless 1197NO-ENABLE is non-nil, load the theme but don't enable it, unless
1198the theme was already enabled. 1198the theme was already enabled.
1199 1199
1200Note that enabling THEME does not disable any other
1201already-enabled themes. If THEME is enabled, it has the highest
1202precedence (after `user') among enabled themes. To disable other
1203themes, use `disable-theme'.
1204
1200This function is normally called through Customize when setting 1205This function is normally called through Customize when setting
1201`custom-enabled-themes'. If used directly in your init file, it 1206`custom-enabled-themes'. If used directly in your init file, it
1202should be called with a non-nil NO-CONFIRM argument, or after 1207should be called with a non-nil NO-CONFIRM argument, or after
@@ -1324,8 +1329,12 @@ variable `custom-known-themes'."
1324(defun enable-theme (theme) 1329(defun enable-theme (theme)
1325 "Reenable all variable and face settings defined by THEME. 1330 "Reenable all variable and face settings defined by THEME.
1326THEME should be either `user', or a theme loaded via `load-theme'. 1331THEME should be either `user', or a theme loaded via `load-theme'.
1332
1327After this function completes, THEME will have the highest 1333After this function completes, THEME will have the highest
1328precedence (after `user')." 1334precedence (after `user') among enabled themes.
1335
1336Note that any already-enabled themes remain enabled after this
1337function runs. To disable other themes, use `disable-theme'."
1329 (interactive (list (intern 1338 (interactive (list (intern
1330 (completing-read 1339 (completing-read
1331 "Enable custom theme: " 1340 "Enable custom theme: "