Function: info-display-manual

info-display-manual is an autoloaded, interactive and byte-compiled function defined in info.el.gz.

Signature

(info-display-manual MANUAL)

Documentation

Display an Info buffer displaying MANUAL.

If there is an existing Info buffer for MANUAL, display it. Otherwise, visit the manual in a new Info buffer. In interactive use, a prefix argument directs this command to limit the completion alternatives to currently visited manuals.

Probably introduced at or before Emacs version 24.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/info.el.gz
;;;###autoload
(defun info-display-manual (manual)
  "Display an Info buffer displaying MANUAL.
If there is an existing Info buffer for MANUAL, display it.
Otherwise, visit the manual in a new Info buffer.  In interactive
use, a prefix argument directs this command to limit the
completion alternatives to currently visited manuals."
  (interactive
   (list
    (progn
      (info-initialize)
      (completing-read "Manual name: "
		       (info--filter-manual-names
                        (info--manual-names current-prefix-arg))
		       nil t))))
  (let ((blist (buffer-list))
	(manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
	(case-fold-search t)
	found)
    (dolist (buffer blist)
      (with-current-buffer buffer
        (when (and (derived-mode-p 'Info-mode)
		   (stringp Info-current-file)
		   (string-match manual-re Info-current-file))
	  (setq found buffer
		blist nil))))
    (if found
        (let ((window (get-buffer-window found t)))
          ;; If the buffer is already displayed in a window somewhere,
          ;; then select that window (and pop its frame to the top).
          (if window
              (progn
                (raise-frame (window-frame window))
                (select-frame-set-input-focus (window-frame window))
                (select-window window))
	    (info-pop-to-buffer nil found)))
      ;; The buffer doesn't exist; create it.
      (info-initialize)
      (info (Info-find-file manual)
	    (generate-new-buffer-name "*info*")))))