Function: info-xref-goto-node-p

info-xref-goto-node-p is a byte-compiled function defined in info-xref.el.gz.

Signature

(info-xref-goto-node-p NODE)

Documentation

Return t if it's possible to go to the given NODE.

Source Code

;; Defined in /usr/src/emacs/lisp/info-xref.el.gz
;;-----------------------------------------------------------------------------
;; node checking

;; When asking Info-goto-node to fork, *info* needs to be the current
;; buffer, otherwise it seems to clone the current buffer but then do the
;; goto-node in plain *info*.
;;
;; We only fork if *info* already exists, if it doesn't then can create and
;; destroy just that instead of a new name.
;;
;; If Info-goto-node can't find the file, then no new buffer is created.  If
;; it finds the file but not the node, then a buffer is created.  Handle
;; this difference by checking before killing.
;;
(defun info-xref-goto-node-p (node)
  "Return t if it's possible to go to the given NODE."
  (let ((oldbuf (current-buffer)))
    (save-excursion
      (save-window-excursion
        (prog1
            (condition-case nil
                (progn
                  (Info-goto-node node
                                  (when (get-buffer "*info*")
                                    (set-buffer "*info*")
                                    "xref - temporary")
                                  (not info-xref-case-fold))
                  t)
              (error nil))
          (unless (equal (current-buffer) oldbuf)
            (kill-buffer)))))))