Function: ibtypes::Info-node
ibtypes::Info-node is a byte-compiled function defined in hibtypes.el.
Signature
(ibtypes::Info-node)
Documentation
Make a "(filename)nodename" button display the associated Info node.
Also make a "(filename)itemname" button display the associated Info
index item. Examples are "(hyperbole)Implicit Buttons" and
`(hyperbole)C-c /'. Pathname formats like:
"hyperbole.info#Implicit Buttons" are also accepted. Activates only
if point is within the first line of the Info reference.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hibtypes.el
;;; ========================================================================
;;; Displays Info nodes when double quoted "(file)node" button is activated.
;;; ========================================================================
(defib Info-node ()
"Make a \"(filename)nodename\" button display the associated Info node.
Also make a \"(filename)itemname\" button display the associated Info
index item. Examples are \"(hyperbole)Implicit Buttons\" and
``(hyperbole)C-c /''. Pathname formats like:
\"hyperbole.info#Implicit Buttons\" are also accepted. Activates only
if point is within the first line of the Info reference."
(let* ((node-ref-and-pos (or ;; HTML
(hbut:label-p t """ """ t t)
;; Embedded double quotes
(hbut:label-p t "\\\"" "\\\"" t t)
;; Double quotes
(hbut:label-p t "\"" "\"" t t)
;; Typical GNU Info references; note
;; these are special quote marks, not the
;; standard ASCII characters.
(hbut:label-p t "‘" "’" t t)
(hbut:label-p t "‘" "’" t t)
;; Regular dual single quotes (Texinfo smart quotes)
(hbut:label-p t "``" "''" t t)
;; Regular open and close quotes
(hbut:label-p t "`" "'" t t)))
(ref (car node-ref-and-pos))
(node-ref (and (stringp ref)
(setq ref (hpath:to-Info-ref ref))
(or (string-match-p "\\`([^\): \t\n\r\f]+)\\'" ref)
(string-match-p "\\`([^\): \t\n\r\f]+)[^ :;\"'`]" ref))
;; Below handle decoding of Info node names in
;; Hyperbole Help buffer lbl-key: lines,
;; eliminating excess underscores.
(save-excursion
(beginning-of-line)
(when (looking-at "\\s-+lbl-key:\\s-+\"")
(setq ref (ibut:key-to-label ref)))
t)
(hpath:is-p ref nil t))))
(and node-ref
(ibut:label-set node-ref-and-pos)
(hact 'link-to-Info-node node-ref))))