Function: finder-commentary

finder-commentary is an autoloaded, interactive and byte-compiled function defined in finder.el.gz.

Signature

(finder-commentary FILE)

Documentation

Display FILE's commentary section.

FILE should be in a form suitable for passing to locate-library.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/finder.el.gz
;;;###autoload
(defun finder-commentary (file)
  "Display FILE's commentary section.
FILE should be in a form suitable for passing to `locate-library'."
  ;; FIXME: Merge this function into `describe-package', which is
  ;; strictly better as it has links to URLs and is in a proper help
  ;; buffer with navigation forward and backward, etc.
  (interactive
   (list
    (completing-read "Library name: "
		     (apply-partially 'locate-file-completion-table
                                      (or find-library-source-path load-path)
                                      (find-library-suffixes)))))
  (let ((str (lm-commentary (find-library-name file))))
    (or str (error "Can't find any Commentary section"))
    ;; This used to use *Finder* but that would clobber the
    ;; directory of categories.
    (pop-to-buffer "*Finder-package*")
    (setq buffer-read-only nil
          buffer-undo-list t)
    (erase-buffer)
    (insert str)
    (goto-char (point-min))
    (package--describe-add-library-links)
    (goto-char (point-min))
    (setq buffer-read-only t)
    (set-buffer-modified-p nil)
    (shrink-window-if-larger-than-buffer)
    (finder-mode)
    (finder-summary)))