emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1de63a3969: Fix starting eshell with missing/invalid modules defi


From: Stefan Kangas
Subject: master 1de63a3969: Fix starting eshell with missing/invalid modules defined
Date: Sun, 19 Jun 2022 10:56:09 -0400 (EDT)

branch: master
commit 1de63a3969d98b47776f12b985d055caacb5a702
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Fix starting eshell with missing/invalid modules defined
    
    * lisp/eshell/esh-mode.el (eshell-mode): Warn instead of failing to
    start when 'eshell-modules-list' has invalid entries.  (Bug#54976)
---
 lisp/eshell/esh-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index c21484dc45..db36909fb8 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -361,7 +361,11 @@ and the hook `eshell-exit-hook'."
       (unless module-shortname
        (error "Invalid Eshell module name: %s" module-fullname))
       (unless (featurep (intern module-shortname))
-       (load module-shortname))))
+        (condition-case nil
+            (load module-shortname)
+          (error (lwarn 'eshell :error
+                        "Unable to load module `%s' (defined in 
`eshell-modules-list')"
+                        module-fullname))))))
 
   (unless (file-exists-p eshell-directory-name)
     (eshell-make-private-directory eshell-directory-name t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]