[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 8c5fbd7 1/2: Revert commit 225ca617b7, and apply another fix
From: |
Michael Albinus |
Subject: |
emacs-28 8c5fbd7 1/2: Revert commit 225ca617b7, and apply another fix |
Date: |
Sat, 23 Oct 2021 09:21:46 -0400 (EDT) |
branch: emacs-28
commit 8c5fbd712be0cfc6ec9683ba1fb30c3b8ef007f8
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Revert commit 225ca617b7, and apply another fix
* lisp/minibuffer.el (read-file-name-default): Revert commit
225ca617b7. (Bug#50976).
* lisp/shell.el (shell): Remove volume letter for remote shell
file name. (Bug#49229)
---
lisp/minibuffer.el | 1 -
lisp/shell.el | 14 +++++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 13da7f9..bc21f02 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3214,7 +3214,6 @@ See `read-file-name' for the meaning of the arguments."
(unless val (error "No file name specified"))
(if (and default-filename
- (not (file-remote-p dir))
(string-equal val (if (consp insdef) (car insdef) insdef)))
(setq val default-filename))
(setq val (substitute-in-file-name val))
diff --git a/lisp/shell.el b/lisp/shell.el
index b575024..cb4afe6 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)