Function: smart-tags-file-path
smart-tags-file-path is an autoloaded and byte-compiled function
defined in hmouse-tag.el.
Signature
(smart-tags-file-path FILE)
Documentation
Expand relative FILE name by looking it up within appropriate tags files.
Return FILE unchanged if it exists relative to the current directory or cannot be expanded via a tags file.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hmouse-tag.el
;;;###autoload
(defun smart-tags-file-path (file)
"Expand relative FILE name by looking it up within appropriate tags files.
Return FILE unchanged if it exists relative to the current directory or
cannot be expanded via a tags file."
(if (or (file-exists-p file) (file-name-absolute-p file))
file
(let ((tags-table-list (smart-tags-file-list))
(file-regexp
(concat "\^L\r?\n\\(.*/\\)?" (regexp-quote file) ",")))
(save-excursion
(while tags-table-list
(set-buffer (find-file-noselect (car tags-table-list)))
(goto-char (point-min))
(if (re-search-forward file-regexp nil t)
(setq file
(expand-file-name
(buffer-substring-no-properties (1- (match-end 0))
(progn (beginning-of-line)
(point))))
tags-table-list nil)
(setq tags-table-list (cdr tags-table-list)))))
file)))