Function: mh-alias-which-file-has-alias
mh-alias-which-file-has-alias is a byte-compiled function defined in
mh-alias.el.gz.
Signature
(mh-alias-which-file-has-alias ALIAS FILE-LIST)
Documentation
Return the name of writable file which defines ALIAS from list FILE-LIST.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-alias.el.gz
(defun mh-alias-which-file-has-alias (alias file-list)
"Return the name of writable file which defines ALIAS from list FILE-LIST."
(with-current-buffer (get-buffer-create mh-temp-buffer)
(let ((the-list file-list)
(found))
(while the-list
(erase-buffer)
(when (file-writable-p (car file-list))
(insert-file-contents (car file-list))
(if (re-search-forward (concat "^" (regexp-quote alias) ":") nil t)
(setq found (car file-list)
the-list nil)
(setq the-list (cdr the-list)))))
found)))