diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-06-19 16:35:08 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-06-19 16:55:21 +0200 |
commit | 1de63a3969d98b47776f12b985d055caacb5a702 (patch) | |
tree | 83b724d2d25774a694492bde020b14470f624c5a /lisp/eshell/esh-mode.el | |
parent | a7ee25e90309fdf513d778ba0ae034aaff4cc559 (diff) | |
download | emacs-1de63a3969d98b47776f12b985d055caacb5a702.tar.gz emacs-1de63a3969d98b47776f12b985d055caacb5a702.tar.bz2 emacs-1de63a3969d98b47776f12b985d055caacb5a702.zip |
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)
Diffstat (limited to 'lisp/eshell/esh-mode.el')
-rw-r--r-- | lisp/eshell/esh-mode.el | 6 |
1 files changed, 5 insertions, 1 deletions
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)) |