+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'.
(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
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)))
((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