Function: ibtypes::man-apropos

ibtypes::man-apropos is a byte-compiled function defined in hibtypes.el.

Signature

(ibtypes::man-apropos)

Documentation

Make man apropos entries display associated man pages when selected.

No longer used within man pages since Emacs adds pushbuttons to man page cross-references itself. But this will fire for such cross-references in other buffers.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hibtypes.el
;;; ========================================================================
;;; Shows man page associated with a man apropos entry.
;;; ========================================================================

(defib man-apropos ()
  "Make man apropos entries display associated man pages when selected.
No longer used within man pages since Emacs adds pushbuttons to man page
cross-references itself.  But this will fire for such cross-references in
other buffers."
  (save-excursion
    ;; Move to the start of the potential man page name; point must be
    ;; within the name, not the parenthesized section
    (skip-syntax-backward "w")
    (let ((nm "[^ \t\n\r!@,:;(){}][^ \t\n\r,(){}]*[^ \t\n\r@.,:;(){}]")
          start
          end
          topic)
      (when (looking-at (concat "\\(" nm "\\)[ \t]*\\(([1-9][-0-9a-zA-z]*)\\)"))
        (setq start (match-beginning 0)
              end   (match-end 0))
        (require 'man)
        (when (and (fboundp 'Man-default-man-entry)
                   (setq topic (Man-default-man-entry)))
          (ibut:label-set topic start end)
	  ;; Use 'man' instead of 'actypes::man-show' in next line so
	  ;; can follow cross-references within the same window when
	  ;; Hyperbole is set to display other referents in another window.
          (hact 'man topic))))))