From: Richard M. Stallman Date: Fri, 30 Dec 2005 22:58:31 +0000 (+0000) Subject: (custom-load-themes): Function deleted. X-Git-Tag: emacs-pretest-22.0.90~4958 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8913f945ec49e5f647ab5d405bab8c7aee40b183;p=emacs.git (custom-load-themes): Function deleted. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aaadc554715..54bb2ee6687 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-12-30 Richard M. Stallman + * custom.el (custom-load-themes): Function deleted. + * cus-edit.el (custom-save-loaded-themes): Function deleted. (custom-save-variables): Don't delete or add custom-load-themes call. diff --git a/lisp/custom.el b/lisp/custom.el index df2488bda40..66f6dc06c65 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1057,9 +1057,9 @@ The first one is always `user'.") (memq theme custom-enabled-themes)) (defun provide-theme (theme) - "Indicate that this file provides THEME. -Add THEME to `custom-loaded-themes', and `provide' whatever -feature name is stored in THEME's property `theme-feature'. + "Indicate that this file provides THEME, and mark it as enabled. +Add THEME to `custom-loaded-themes' and `custom-enabled-themes', +and `provide' the feature name stored in THEME's property `theme-feature'. Usually the `theme-feature' property contains a symbol created by `custom-make-theme-feature'." @@ -1120,12 +1120,6 @@ All the themes loaded for BY-THEME are recorded in BY-THEME's property (load-theme theme))) (push theme themes-loaded)) (put by-theme 'theme-loads-themes themes-loaded))) - -(defun custom-load-themes (&rest body) - "Load themes for the USER theme as specified by BODY. - -See `custom-theme-load-themes' for more information on BODY." - (apply 'custom-theme-load-themes 'user body)) ;;; Enabling and disabling loaded themes. @@ -1138,8 +1132,8 @@ This signals an error if THEME does not specify any theme settings. Theme settings are set using `load-theme'." (interactive "SEnable Custom theme: ") (let ((settings (get theme 'theme-settings))) - (if (and (not (eq theme 'user)) (null settings)) - (error "No theme settings defined in %s." (symbol-name theme))) + (unless (or (eq theme 'user) (memq theme custom-loaded-themes)) + (error "Theme %s not defined" (symbol-name theme))) (dolist (s settings) (let* ((prop (car s)) (symbol (cadr s)) @@ -1157,17 +1151,18 @@ settings. Theme settings are set using `load-theme'." (defun disable-theme (theme) "Disable all variable and face settings defined by THEME. -See `custom-known-themes' for a list of known themes." +See `custom-enabled-themes' for a list of known themes." (interactive "SDisable Custom theme: ") - (let ((settings (get theme 'theme-settings))) - (dolist (s settings) - (let* ((prop (car s)) - (symbol (cadr s)) - (spec-list (get symbol prop))) - (put symbol prop (assq-delete-all theme spec-list)) - (if (eq prop 'theme-value) - (custom-theme-recalc-variable symbol) - (custom-theme-recalc-face symbol))))) + (when (memq theme custom-enabled-themes) + (let ((settings (get theme 'theme-settings))) + (dolist (s settings) + (let* ((prop (car s)) + (symbol (cadr s)) + (spec-list (get symbol prop))) + (put symbol prop (assq-delete-all theme spec-list)) + (if (eq prop 'theme-value) + (custom-theme-recalc-variable symbol) + (custom-theme-recalc-face symbol)))))) (setq custom-enabled-themes (delq theme custom-enabled-themes)))