Function: custom-theme-summary

custom-theme-summary is a byte-compiled function defined in cus-theme.el.gz.

Signature

(custom-theme-summary THEME)

Documentation

Return the summary line of THEME.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-theme.el.gz
(defun custom-theme-summary (theme)
  "Return the summary line of THEME."
  (let (doc)
    (if (custom-theme-p theme)
	(setq doc (get theme 'theme-documentation))
      (let ((fn (locate-file (concat (symbol-name theme) "-theme.el")
			     (custom-theme--load-path)
			     '("" "c"))))
	(when fn
	  (with-temp-buffer
	    (insert-file-contents fn)
	    (let ((sexp (let ((read-circle nil))
			  (condition-case nil
                              (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)
	   (match-string 0 doc))
	  (t doc))))