summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-dirs.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/eshell/em-dirs.el
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/eshell/em-dirs.el')
-rw-r--r--lisp/eshell/em-dirs.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index c702ee192a6..ee9057f50e8 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -199,10 +199,10 @@ Thus, this does not include the current directory.")
(when eshell-cd-on-directory
(setq-local eshell-interpreter-alist
- (cons (cons #'(lambda (file _args)
- (eshell-lone-directory-p file))
- 'eshell-dirs-substitute-cd)
- eshell-interpreter-alist)))
+ (cons (cons (lambda (file _args)
+ (eshell-lone-directory-p file))
+ 'eshell-dirs-substitute-cd)
+ eshell-interpreter-alist)))
(add-hook 'eshell-parse-argument-hook
#'eshell-parse-user-reference nil t)
@@ -224,7 +224,7 @@ Thus, this does not include the current directory.")
(add-hook 'eshell-exit-hook #'eshell-write-last-dir-ring nil t)
- (add-hook 'kill-emacs-hook #'eshell-save-some-last-dir))
+ (add-hook 'kill-emacs-query-functions #'eshell-save-some-last-dir))
(defun eshell-save-some-last-dir ()
"Save the list-dir-ring for any open Eshell buffers."
@@ -238,7 +238,8 @@ Thus, this does not include the current directory.")
(format-message
"Save last dir ring for Eshell buffer `%s'? "
(buffer-name buf)))))
- (eshell-write-last-dir-ring))))))
+ (eshell-write-last-dir-ring)))))
+ t)
(defun eshell-lone-directory-p (file)
"Test whether FILE is just a directory name, and not a command name."