diff options
| author | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
| commit | cafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch) | |
| tree | 7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /lisp/custom.el | |
| parent | a08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff) | |
| parent | 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff) | |
| download | emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip | |
Merge from trunk
Diffstat (limited to 'lisp/custom.el')
| -rw-r--r-- | lisp/custom.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/custom.el b/lisp/custom.el index d0d11610b91..d9bb4f954bc 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -792,10 +792,10 @@ E.g. dumped variables whose default depends on run-time information." | |||
| 792 | (defvar custom-known-themes '(user changed) | 792 | (defvar custom-known-themes '(user changed) |
| 793 | "Themes that have been defined with `deftheme'. | 793 | "Themes that have been defined with `deftheme'. |
| 794 | The default value is the list (user changed). The theme `changed' | 794 | The default value is the list (user changed). The theme `changed' |
| 795 | contains the settings before custom themes are applied. The | 795 | contains the settings before custom themes are applied. The theme |
| 796 | theme `user' contains all the settings the user customized and saved. | 796 | `user' contains all the settings the user customized and saved. |
| 797 | Additional themes declared with the `deftheme' macro will be added to | 797 | Additional themes declared with the `deftheme' macro will be added |
| 798 | the front of this list.") | 798 | to the front of this list.") |
| 799 | 799 | ||
| 800 | (defsubst custom-theme-p (theme) | 800 | (defsubst custom-theme-p (theme) |
| 801 | "Non-nil when THEME has been defined." | 801 | "Non-nil when THEME has been defined." |
| @@ -1074,7 +1074,7 @@ order. Each element in the list should be one of the following: | |||
| 1074 | named \"themes\" in `data-directory'). | 1074 | named \"themes\" in `data-directory'). |
| 1075 | - a directory name (a string). | 1075 | - a directory name (a string). |
| 1076 | 1076 | ||
| 1077 | Each theme file is named NAME-theme.el, where THEME is the theme | 1077 | Each theme file is named THEME-theme.el, where THEME is the theme |
| 1078 | name." | 1078 | name." |
| 1079 | :type '(repeat (choice (const :tag "custom-theme-directory" | 1079 | :type '(repeat (choice (const :tag "custom-theme-directory" |
| 1080 | custom-theme-directory) | 1080 | custom-theme-directory) |
| @@ -1146,7 +1146,7 @@ Return t if THEME was successfully loaded, nil otherwise." | |||
| 1146 | '("" "c"))) | 1146 | '("" "c"))) |
| 1147 | hash) | 1147 | hash) |
| 1148 | (unless fn | 1148 | (unless fn |
| 1149 | (error "Unable to find theme file for `%s'." theme)) | 1149 | (error "Unable to find theme file for `%s'" theme)) |
| 1150 | (with-temp-buffer | 1150 | (with-temp-buffer |
| 1151 | (insert-file-contents fn) | 1151 | (insert-file-contents fn) |
| 1152 | (setq hash (sha1 (current-buffer))) | 1152 | (setq hash (sha1 (current-buffer))) |
| @@ -1212,7 +1212,7 @@ NAME should be a symbol." | |||
| 1212 | 1212 | ||
| 1213 | (defun custom-available-themes () | 1213 | (defun custom-available-themes () |
| 1214 | "Return a list of available Custom themes (symbols)." | 1214 | "Return a list of available Custom themes (symbols)." |
| 1215 | (let* (sym themes) | 1215 | (let (sym themes) |
| 1216 | (dolist (dir (custom-theme--load-path)) | 1216 | (dolist (dir (custom-theme--load-path)) |
| 1217 | (when (file-directory-p dir) | 1217 | (when (file-directory-p dir) |
| 1218 | (dolist (file (file-expand-wildcards | 1218 | (dolist (file (file-expand-wildcards |
| @@ -1222,7 +1222,7 @@ NAME should be a symbol." | |||
| 1222 | (setq sym (intern (match-string 1 file))) | 1222 | (setq sym (intern (match-string 1 file))) |
| 1223 | (custom-theme-name-valid-p sym) | 1223 | (custom-theme-name-valid-p sym) |
| 1224 | (push sym themes))))) | 1224 | (push sym themes))))) |
| 1225 | (delete-dups themes))) | 1225 | (nreverse (delete-dups themes)))) |
| 1226 | 1226 | ||
| 1227 | (defun custom-theme--load-path () | 1227 | (defun custom-theme--load-path () |
| 1228 | (let (lpath) | 1228 | (let (lpath) |
| @@ -1338,7 +1338,7 @@ That is to say, it specifies what the value should be according to | |||
| 1338 | currently enabled custom themes. | 1338 | currently enabled custom themes. |
| 1339 | 1339 | ||
| 1340 | This function returns nil if no custom theme specifies a value for VARIABLE." | 1340 | This function returns nil if no custom theme specifies a value for VARIABLE." |
| 1341 | (let* ((theme-value (get variable 'theme-value))) | 1341 | (let ((theme-value (get variable 'theme-value))) |
| 1342 | (if theme-value | 1342 | (if theme-value |
| 1343 | (cdr (car theme-value))))) | 1343 | (cdr (car theme-value))))) |
| 1344 | 1344 | ||