Function: Info-follow-nearest-node@gitman

Info-follow-nearest-node@gitman is a byte-compiled function defined in magit-base.el.

Signature

(Info-follow-nearest-node@gitman FN &optional FORK)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-base.el
;;; Kludges for Info Manuals

;;;###autoload
(define-advice Info-follow-nearest-node (:around (fn &optional fork) gitman)
  ;; Do not use `if-let*' (aka `cond-let--if-let*') because this is
  ;; copied to the autoload file, which does not require `cond-let'.
  (let ((node (Info-get-token
               (point) "\\*note[ \n\t]+"
               "\\*note[ \n\t]+\\([^:]*\\):\\(:\\|[ \n\t]*(\\)?")))
    (if (and node (string-match "^(gitman)\\(.+\\)" node))
        (pcase magit-view-git-manual-method
          ('info  (funcall fn fork))
          ('man   (require 'man)
                  (man (match-str 1 node)))
          ('woman (require 'woman)
                  (woman (match-str 1 node)))
          (_ (user-error "Invalid value for `magit-view-git-manual-method'")))
      (funcall fn fork))))