diff options
| author | Joakim Verona | 2012-03-25 22:04:52 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-03-25 22:04:52 +0200 |
| commit | 75da28a3845b9dfa4e730cfa19c14edc52cbb222 (patch) | |
| tree | b04519bffcb21264cbe3ce8af13df7186548667f /lisp/custom.el | |
| parent | b827329a89291ed68dd017c53976be7ce5ed3b22 (diff) | |
| parent | f514f6f0e3f8bbeb5212d0337e5bda5a9a4eaeb5 (diff) | |
| download | emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.tar.gz emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.zip | |
upstream
Diffstat (limited to 'lisp/custom.el')
| -rw-r--r-- | lisp/custom.el | 9 |
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 | |||
| 1143 | optional arg NO-CONFIRM is non-nil, load the theme without | 1143 | optional arg NO-CONFIRM is non-nil, load the theme without |
| 1144 | prompting. | 1144 | prompting. |
| 1145 | 1145 | ||
| 1146 | Normally, this function also enables THEME; if optional arg | 1146 | Normally, this function also enables THEME. If optional arg |
| 1147 | NO-ENABLE is non-nil, load the theme but don't enable it. | 1147 | NO-ENABLE is non-nil, load the theme but don't enable it, unless |
| 1148 | the theme was already enabled. | ||
| 1148 | 1149 | ||
| 1149 | This function is normally called through Customize when setting | 1150 | This 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) |