From: Michael Albinus Date: Fri, 28 Jun 2024 09:28:33 +0000 (+0200) Subject: Make `shell-mode' more robust X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~850 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c4ad54812acaf8f156962047eaaaf75b0c0ecf96;p=emacs.git Make `shell-mode' more robust * lisp/shell.el (shell-mode): Ensure that `comint-input-ring-file-name' is non-nil when calling `file-truename'. --- diff --git a/lisp/shell.el b/lisp/shell.el index 9399906715f..e1936ff1119 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -764,9 +764,10 @@ command." (setq-local comint-input-ring-size hsize)) (setq comint-input-ring-file-name (concat remote hfile))) - (if (or (equal comint-input-ring-file-name "") - (equal (file-truename comint-input-ring-file-name) - (file-truename null-device))) + (if (and comint-input-ring-file-name + (or (equal comint-input-ring-file-name "") + (equal (file-truename comint-input-ring-file-name) + (file-truename null-device)))) (setq comint-input-ring-file-name nil)) ;; Arrange to write out the input ring on exit, if the shell doesn't ;; do this itself.