From: Stephen Gildea Date: Tue, 8 Jun 2021 04:47:24 +0000 (-0700) Subject: MH-E: do not look for MH variants in relative directories X-Git-Tag: emacs-28.0.90~2164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d42c92978491588a3ad67ec59a5e105e8f1ab3a;p=emacs.git 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. --- diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 1aac3374153..e935cfda97e 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -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)))