Commit 04482335 authored by Chong Yidong's avatar Chong Yidong
Browse files

Tweak handling of custom-enabled-themes and custom-safe-themes.

* lisp/cus-theme.el (custom-theme-merge-theme): Ignore
custom-enabled-themes and custom-safe-themes.

* lisp/custom.el (enable-theme): Don't set custom-safe-themes.
parent b0d7d8af
2012-01-05 Chong Yidong <cyd@gnu.org>
* custom.el (enable-theme): Don't set custom-safe-themes.
* cus-theme.el (custom-theme-merge-theme): Ignore
custom-enabled-themes and custom-safe-themes.
2012-01-05 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el (sql-login-hook): Add hook to respond to the
first prompt in `sql-interacive-mode'.
(sql-mode-oracle-font-lock-keywords): Add CONNECT_BY_* builtin
keywords.
keywords.
(sql-mode-mysql-font-lock-keywords): Add ELSEIF keyword.
(sql-product-interactive): Bug fix: Set `sql-buffer' in
context of original buffer. Invoke `sql-login-hook'.
......
......@@ -329,11 +329,16 @@ SPEC, if non-nil, should be a face spec to which to set the widget."
(load-theme theme nil t))
(let ((settings (reverse (get theme 'theme-settings))))
(dolist (setting settings)
(funcall (if (eq (car setting) 'theme-value)
'custom-theme-add-variable
'custom-theme-add-face)
(nth 1 setting)
(nth 3 setting))))
(let ((option (eq (car setting) 'theme-value))
(name (nth 1 setting))
(value (nth 3 setting)))
(unless (and option
(memq name '(custom-enabled-themes
custom-safe-themes)))
(funcall (if option
'custom-theme-add-variable
'custom-theme-add-face)
name value)))))
theme)
;; From cus-edit.el
......
......@@ -1110,7 +1110,9 @@ hash of a safe theme file, or the symbol `default', which stands
for any theme in the built-in Emacs theme directory (a directory
named \"themes\" in `data-directory').
If the value is t, Emacs treats all themes as safe."
If the value is t, Emacs treats all themes as safe.
This variable cannot be set in a Custom theme."
:type '(choice (repeat :tag "List of safe themes"
(choice string
(const :tag "Built-in themes" default)))
......@@ -1285,8 +1287,8 @@ precedence (after `user')."
((eq prop 'theme-face)
(custom-theme-recalc-face symbol))
((eq prop 'theme-value)
;; Don't change `custom-enabled-themes'; that's special.
(unless (eq symbol 'custom-enabled-themes)
;; Ignore `custom-enabled-themes' and `custom-safe-themes'.
(unless (memq symbol '(custom-enabled-themes custom-safe-themes))
(custom-theme-recalc-variable symbol)))))))
(unless (eq theme 'user)
(setq custom-enabled-themes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment