summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2021-10-24 01:55:45 -0700
committerGlenn Morris <rgm@gnu.org>2021-10-24 01:55:45 -0700
commitb931e11a03fdb44e378133b10f312e38b1b3d712 (patch)
treec7b22a272237570d7dfdfce970913e36eb8dce08 /lisp/shell.el
parentaea4af5119fdf130f1df7190478a23c6777f92a2 (diff)
parentc7f53824a8d4d9be26fad61893a0a4db9e2ed8e7 (diff)
downloademacs-b931e11a03fdb44e378133b10f312e38b1b3d712.tar.gz
emacs-b931e11a03fdb44e378133b10f312e38b1b3d712.tar.bz2
emacs-b931e11a03fdb44e378133b10f312e38b1b3d712.zip
Merge from origin/emacs-28
c7f53824a8 (origin/emacs-28) Update publicsuffix.txt from upstream 9a50f760e9 ; * doc/lispref/modes.texi (Hooks): Clarify wording. (Bug... e154fd9119 Refer to the info node on keymaps in map-keymap docstring 4fd5c8df67 Clarify abnormal hook documentation 6fa5206770 Update to Org 9.5-59-g52e6f1 39413a45bf ; * doc/lispref/functions.texi (Calling Functions): Fix la... 43914ab01f Improve documentation of cl-reduce ef37a86cac Improve documentation of apply-partially 1e8be48738 Fix typos 8c5fbd712b Revert commit 225ca617b7, and apply another fix cdbd03345d Fix documentation of posn-at-x-y 598732c899 ; * src/vm-limit.c (get_lim_data): Fix a typo. (Bug#18238) efdffd86c5 ; * etc/refcards/README: Prefer HTTPS in link. # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index b575024e016..cb4afe6dea8 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -766,12 +766,16 @@ Make the shell buffer the current buffer, and return it.
(called-interactively-p 'any)
(null explicit-shell-file-name)
(null (getenv "ESHELL")))
+ ;; `expand-file-name' shall not add the MS Windows volume letter
+ ;; (Bug#49229).
(setq-local explicit-shell-file-name
- (file-local-name
- (expand-file-name
- (read-file-name "Remote shell path: " default-directory
- shell-file-name t shell-file-name
- #'file-remote-p)))))
+ (replace-regexp-in-string
+ "^[[:alpha:]]:" ""
+ (file-local-name
+ (expand-file-name
+ (read-file-name "Remote shell path: " default-directory
+ shell-file-name t shell-file-name
+ #'file-remote-p))))))
;; Rain or shine, BUFFER must be current by now.
(unless (comint-check-proc buffer)