Function: describe-theme-from-file
describe-theme-from-file is a byte-compiled function defined in
cus-theme.el.gz.
Signature
(describe-theme-from-file THEME &optional FILE SHORT)
Documentation
Describe THEME from its FILE without loading it.
If FILE is nil try to look in custom-theme-load-path for the
theme's file using the theme's name.
If SHORT is non-nil, show only the first line of thene's documentation.
Source Code
;; Defined in /usr/src/emacs/lisp/cus-theme.el.gz
(defun describe-theme-from-file (theme &optional file short)
"Describe THEME from its FILE without loading it.
If FILE is nil try to look in `custom-theme-load-path' for the
theme's file using the theme's name.
If SHORT is non-nil, show only the first line of thene's documentation."
(let ((file (or file
(locate-file (concat (symbol-name theme) "-theme.el")
(custom-theme--load-path)
'("" "c")))))
(with-temp-buffer
(insert-file-contents file)
(catch 'found
(let (sexp)
(while (setq sexp (let ((read-circle nil))
(condition-case nil
(read (current-buffer))
(end-of-file nil))))
(when (eq (car-safe sexp) 'deftheme)
(throw 'found (if short
(car (split-string (nth 2 sexp) "\n"))
(nth 2 sexp))))))))))