From: Stefan Kangas Date: Sun, 19 Jun 2022 14:35:08 +0000 (+0200) Subject: Fix starting eshell with missing/invalid modules defined X-Git-Tag: emacs-29.0.90~1447^2~1608 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1de63a3969d98b47776f12b985d055caacb5a702;p=emacs.git 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) --- diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index c21484dc45f..db36909fb86 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))