emacs-diffs
[Top][All Lists]
Advanced

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

master 61291e0: Lift restriction for finding theme summary line


From: Mauro Aranda
Subject: master 61291e0: Lift restriction for finding theme summary line
Date: Wed, 19 May 2021 08:58:18 -0400 (EDT)

branch: master
commit 61291e06cc804de2075305c220d31ef6072f28c8
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Mauro Aranda <maurooaranda@gmail.com>

    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.
---
 lisp/cus-theme.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 13fb9f3..dfa2226 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)



reply via email to

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