1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/shell.el (shell-mode): Check if buffer has a live process.

(Bug#31028)
This commit is contained in:
Juri Linkov 2018-04-04 23:43:54 +03:00
parent 29006a6fd8
commit 25b22772a7

View file

@ -568,8 +568,10 @@ buffer."
(setq list-buffers-directory (expand-file-name default-directory))
;; shell-dependent assignments.
(when (ring-empty-p comint-input-ring)
(let ((shell (file-name-nondirectory (car
(process-command (get-buffer-process (current-buffer))))))
(let ((shell (if (get-buffer-process (current-buffer))
(file-name-nondirectory
(car (process-command (get-buffer-process (current-buffer)))))
""))
(hsize (getenv "HISTSIZE")))
(and (stringp hsize)
(integerp (setq hsize (string-to-number hsize)))