emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/custom.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/custom.el
Date: Wed, 04 Jan 2006 15:56:09 +0000

Index: emacs/lisp/custom.el
diff -u emacs/lisp/custom.el:1.117 emacs/lisp/custom.el:1.118
--- emacs/lisp/custom.el:1.117  Mon Jan  2 15:41:56 2006
+++ emacs/lisp/custom.el        Wed Jan  4 15:56:08 2006
@@ -1007,11 +1007,17 @@
     (enable-theme 'user)))
 
 (defun load-theme (theme)
-  "Try to load a theme's settings from its file.
+  "Load a theme's settings from its file.
 This also enables the theme; use `disable-theme' to disable it."
   ;; Note we do no check for validity of the theme here.
   ;; This allows to pull in themes by a file-name convention
   (interactive "SCustom theme name: ")
+  ;; If reloading, clear out the old theme settings.
+  (when (custom-theme-p theme)
+    (disable-theme theme)
+    (put theme 'theme-settings nil)
+    (put theme 'theme-feature nil)
+    (put theme 'theme-documentation nil))
   (let ((load-path (if (file-directory-p custom-theme-directory)
                       (cons custom-theme-directory load-path)
                     load-path)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]