Function: smart-man-file-ref

smart-man-file-ref is a byte-compiled function defined in hui-mouse.el.

Signature

(smart-man-file-ref)

Documentation

Return form to eval to display file whose name is at point.

Enabled within a FILES man page section. If not on a file name, returns nil.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-mouse.el
(defun smart-man-file-ref ()
  "Return form to eval to display file whose name is at point.
Enabled within a FILES man page section.
If not on a file name, returns nil."
  (let ((ref)
	(opoint (point))
	(case-fold-search))
    (save-excursion
      (and (re-search-backward "^[.A-Z]" nil t)
	   (looking-at "^FILES[ \t\n\r]")
	     (progn (goto-char opoint)
		    (skip-chars-backward "^ \t")
		    (if (looking-at "/[^ \t\n\r]+")
			(setq ref (buffer-substring
				   (match-beginning 0) (match-end 0)))))))
    (if ref
	(list (if (br-in-browser)
		  'find-file 'find-file-other-window)
	      ref))))