Function: hpath:to-Info-ref

hpath:to-Info-ref is a byte-compiled function defined in hpath.el.

Signature

(hpath:to-Info-ref PATH)

Documentation

Reformat Info PATH "file.info#ref" into "(file)ref" format.

Leave any other format unchanged and return the resulting path.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
(defun hpath:to-Info-ref (path)
  "Reformat Info PATH \"file.info#ref\" into \"(file)ref\" format.
Leave any other format unchanged and return the resulting path."
  (if (string-match "\\(.+\\)\\.info\\(-[0-9]+\\)?\\(\\.gz\\|\\.Z\\|-z\\)?\\(#\\(.+\\)\\)?\\'" path)
      (format "(%s)%s"
	      (match-string 1 path)
	      (or (match-string 5 path) ""))
    path))