summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 0449be2..fa1ee72 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -113,7 +113,7 @@
(comint-send-input) ; and send it.
(save-excursion
;; Then, we copy the input to the previous line,
- (previous-line)
+ (forward-line -1)
(end-of-visual-line)
(yank)
;; And finish by cleaning the kill ring.
@@ -178,13 +178,15 @@
"Called when the shell process is stopped.
Kills the buffer when the shell program quits."
+ (ignore event)
(comint-write-input-ring)
(let ((buf (process-buffer process)))
(when (buffer-live-p buf)
(with-current-buffer buf (kill-buffer)))))
(defun add-shell-sentinel (&rest args)
+ (ignore args)
(set-process-sentinel (get-buffer-process (current-buffer))
- #'shell-test-sentinel))
+ #'shell-kill-buffer-on-quit))
(add-hook 'shell-mode-hook #'add-shell-sentinel)

© 2015 - 2026 Jakob L. Kreuze