1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

MH-E: do not look for MH variants in relative directories

* lisp/mh-e/mh-e.el (mh-variants): Do not examine relative directories
in exec-path (e.g., "."); these won't have MH installed.  Also,
file-chase-links is not robust with relative names: you cannot pass it
a relative name that is a symlink.
This commit is contained in:
Stephen Gildea 2021-06-07 21:47:24 -07:00
parent 19ef864084
commit 0d42c92978

View file

@ -738,8 +738,11 @@ is described by the variable `mh-variants'."
;; Make a unique list of directories, keeping the given order.
;; We don't want the same MH variant to be listed multiple times.
(cl-loop for dir in (append mh-path mh-sys-path exec-path) do
(setq dir (file-chase-links (directory-file-name dir)))
(cl-pushnew dir list-unique :test #'equal))
;; skip relative dirs, typically "."
(if (file-name-absolute-p dir)
(progn
(setq dir (file-chase-links (directory-file-name dir)))
(cl-pushnew dir list-unique :test #'equal))))
(cl-loop for dir in (nreverse list-unique) do
(when (and dir (file-accessible-directory-p dir))
(let ((variant (mh-variant-info dir)))