aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2021-10-23 15:21:14 +0200
committerMichael Albinus2021-10-23 15:21:14 +0200
commit8c5fbd712be0cfc6ec9683ba1fb30c3b8ef007f8 (patch)
tree9de91238b4f9dc86503a78c004dee6892a6ba75e
parentcdbd03345d57339cce5709cc08fdcd3a96c79ce7 (diff)
downloademacs-8c5fbd712be0cfc6ec9683ba1fb30c3b8ef007f8.tar.gz
emacs-8c5fbd712be0cfc6ec9683ba1fb30c3b8ef007f8.zip
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)
-rw-r--r--lisp/minibuffer.el1
-rw-r--r--lisp/shell.el14
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 13da7f99a38..bc21f027b6e 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3214,7 +3214,6 @@ See `read-file-name' for the meaning of the arguments."
3214 (unless val (error "No file name specified")) 3214 (unless val (error "No file name specified"))
3215 3215
3216 (if (and default-filename 3216 (if (and default-filename
3217 (not (file-remote-p dir))
3218 (string-equal val (if (consp insdef) (car insdef) insdef))) 3217 (string-equal val (if (consp insdef) (car insdef) insdef)))
3219 (setq val default-filename)) 3218 (setq val default-filename))
3220 (setq val (substitute-in-file-name val)) 3219 (setq val (substitute-in-file-name val))
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.
766 (called-interactively-p 'any) 766 (called-interactively-p 'any)
767 (null explicit-shell-file-name) 767 (null explicit-shell-file-name)
768 (null (getenv "ESHELL"))) 768 (null (getenv "ESHELL")))
769 ;; `expand-file-name' shall not add the MS Windows volume letter
770 ;; (Bug#49229).
769 (setq-local explicit-shell-file-name 771 (setq-local explicit-shell-file-name
770 (file-local-name 772 (replace-regexp-in-string
771 (expand-file-name 773 "^[[:alpha:]]:" ""
772 (read-file-name "Remote shell path: " default-directory 774 (file-local-name
773 shell-file-name t shell-file-name 775 (expand-file-name
774 #'file-remote-p))))) 776 (read-file-name "Remote shell path: " default-directory
777 shell-file-name t shell-file-name
778 #'file-remote-p))))))
775 779
776 ;; Rain or shine, BUFFER must be current by now. 780 ;; Rain or shine, BUFFER must be current by now.
777 (unless (comint-check-proc buffer) 781 (unless (comint-check-proc buffer)