Function: hpath:match

hpath:match is a byte-compiled function defined in hpath.el.

Signature

(hpath:match FILENAME REGEXP-ALIST)

Documentation

If FILENAME matches the car of any element in REGEXP-ALIST, return its cdr.

REGEXP-ALIST elements must be of the form

    (<filename-regexp> . <command-to-display-file>).

<command-to-display-file> may be a string representing an
external window-system command to run or it may be a Lisp function to call with FILENAME as its single argument.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hpath.el
(defun hpath:match (filename regexp-alist)
  "If FILENAME matches the car of any element in REGEXP-ALIST, return its cdr.
REGEXP-ALIST elements must be of the form

    (<filename-regexp> . <command-to-display-file>).

<command-to-display-file> may be a string representing an
external window-system command to run or it may be a Lisp
function to call with FILENAME as its single argument."
  (let ((cmd)
	elt)
    (while (and (not cmd) regexp-alist)
      (if (string-match (car (setq elt (car regexp-alist))) filename)
	  (setq cmd (cdr elt)))
      (setq regexp-alist (cdr regexp-alist)))
    cmd))