diff options
| author | Daniel Colascione | 2018-06-12 23:28:47 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2018-06-12 23:28:47 -0700 |
| commit | b8478b2ab7ad19c629da9c6b0dfd9a6544a6acee (patch) | |
| tree | 611c85ab29c47bf3acc2e4c6e0e84bac721c6c8e | |
| parent | 5ed119141d10a09c4cd767c42a25a285f4f844ce (diff) | |
| download | emacs-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.el | 13 |
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. |
| 1188 | The theme file is named THEME-theme.el, in one of the directories | 1188 | The theme file is named THEME-theme.el, in one of the directories |
| 1189 | specified by `custom-theme-load-path'. | 1189 | specified by `custom-theme-load-path'. |
| 1190 | 1190 | ||
| @@ -1197,6 +1197,11 @@ Normally, this function also enables THEME. If optional arg | |||
| 1197 | NO-ENABLE is non-nil, load the theme but don't enable it, unless | 1197 | NO-ENABLE is non-nil, load the theme but don't enable it, unless |
| 1198 | the theme was already enabled. | 1198 | the theme was already enabled. |
| 1199 | 1199 | ||
| 1200 | Note that enabling THEME does not disable any other | ||
| 1201 | already-enabled themes. If THEME is enabled, it has the highest | ||
| 1202 | precedence (after `user') among enabled themes. To disable other | ||
| 1203 | themes, use `disable-theme'. | ||
| 1204 | |||
| 1200 | This function is normally called through Customize when setting | 1205 | This 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 |
| 1202 | should be called with a non-nil NO-CONFIRM argument, or after | 1207 | should 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. |
| 1326 | THEME should be either `user', or a theme loaded via `load-theme'. | 1331 | THEME should be either `user', or a theme loaded via `load-theme'. |
| 1332 | |||
| 1327 | After this function completes, THEME will have the highest | 1333 | After this function completes, THEME will have the highest |
| 1328 | precedence (after `user')." | 1334 | precedence (after `user') among enabled themes. |
| 1335 | |||
| 1336 | Note that any already-enabled themes remain enabled after this | ||
| 1337 | function 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: " |