[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 995b699: * custom.el (custom-theme-load-path): Demo
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master 995b699: * custom.el (custom-theme-load-path): Demote to defvar |
Date: |
Fri, 16 Oct 2015 15:14:59 +0000 |
branch: master
commit 995b69918bddb58536b5d09d2127179314e1fffb
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* custom.el (custom-theme-load-path): Demote to defvar
`custom-theme-load-path' was a defcustom, but it shouldn't be for the
same reason that `load-path' shouldn't. Setting it via the customize
interface is a trap for the user.
Installed themes commonly add themselves to this variable, which means
its value is not fit for being saved (it will permanently remember dirs
that don't exist anymore).
This is aggravated by the fact that Emacs always applies the `user'
theme on top of any theme that's loaded, since this will apply the old
variable value and remove any new directories that had been recently
added by themes themselves.
Not to mention, we already have `custom-theme-directory', which is safe
to customize.
---
lisp/custom.el | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/lisp/custom.el b/lisp/custom.el
index e212e32..c5d0e65 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1120,7 +1120,7 @@ directory first---see `custom-theme-load-path'."
:group 'customize
:version "22.1")
-(defcustom custom-theme-load-path (list 'custom-theme-directory t)
+(defvar custom-theme-load-path (list 'custom-theme-directory t)
"List of directories to search for custom theme files.
When loading custom themes (e.g. in `customize-themes' and
`load-theme'), Emacs searches for theme files in the specified
@@ -1132,13 +1132,11 @@ order. Each element in the list should be one of the
following:
- a directory name (a string).
Each theme file is named THEME-theme.el, where THEME is the theme
-name."
- :type '(repeat (choice (const :tag "custom-theme-directory"
- custom-theme-directory)
- (const :tag "Built-in theme directory" t)
- directory))
- :group 'customize
- :version "24.1")
+name.
+
+This variable is designed for use in lisp code (including
+external packages). For manual user customizations, use
+`custom-theme-directory' instead.")
(defvar custom--inhibit-theme-enable nil
"Whether the custom-theme-set-* functions act immediately.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 995b699: * custom.el (custom-theme-load-path): Demote to defvar,
Artur Malabarba <=