summaryrefslogtreecommitdiff
path: root/lisp/cus-theme.el
diff options
context:
space:
mode:
authorMauro Aranda <maurooaranda@gmail.com>2021-05-19 09:57:46 -0300
committerMauro Aranda <maurooaranda@gmail.com>2021-05-19 09:57:46 -0300
commit61291e06cc804de2075305c220d31ef6072f28c8 (patch)
treefa61c287bad402389092c8ecec838a5342cbb964 /lisp/cus-theme.el
parent567c31121fdef6bdc8b645999a6ca1d994378c89 (diff)
downloademacs-61291e06cc804de2075305c220d31ef6072f28c8.tar.gz
Lift restriction for finding theme summary line
* lisp/cus-theme.el (custom-theme-summary): Don't limit the file to having the deftheme form as the very first form, rather look for the deftheme form explicitly.
Diffstat (limited to 'lisp/cus-theme.el')
-rw-r--r--lisp/cus-theme.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 13fb9f34fa0..dfa22264037 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -657,10 +657,12 @@ Theme files are named *-theme.el in `"))
(insert-file-contents fn)
(let ((sexp (let ((read-circle nil))
(condition-case nil
- (read (current-buffer))
- (end-of-file nil)))))
- (and (eq (car-safe sexp) 'deftheme)
- (setq doc (nth 2 sexp))))))))
+ (progn
+ (re-search-forward "^(deftheme")
+ (beginning-of-line)
+ (read (current-buffer)))
+ (error nil)))))
+ (setq doc (nth 2 sexp)))))))
(cond ((null doc)
"(no documentation available)")
((string-match ".*" doc)