Commit 30d94e4b authored by Michael Albinus's avatar Michael Albinus

Fix Bug#32550

* lisp/net/tramp.el (tramp-rfn-eshadow-setup-minibuffer): Do not
use `symbol-value'.
(tramp-rfn-eshadow-update-overlay): Do not use `symbol-value'.  Do
not let-bind `rfn-eshadow-overlay', assign it directly (due to
lexical binding).  (Bug#32550)
parent 57bcdc76
......@@ -1892,7 +1892,6 @@ For definition of that list see `tramp-set-completion-function'."
;; The method related defaults.
(cdr (assoc method tramp-completion-function-alist))))
;;; Fontification of `read-file-name':
(defvar tramp-rfn-eshadow-overlay)
......@@ -1902,11 +1901,11 @@ For definition of that list see `tramp-set-completion-function'."
"Set up a minibuffer for `file-name-shadow-mode'.
Adds another overlay hiding filename parts according to Tramp's
special handling of `substitute-in-file-name'."
(when (symbol-value 'minibuffer-completing-file-name)
(when minibuffer-completing-file-name
(setq tramp-rfn-eshadow-overlay
(make-overlay (minibuffer-prompt-end) (minibuffer-prompt-end)))
;; Copy rfn-eshadow-overlay properties.
(let ((props (overlay-properties (symbol-value 'rfn-eshadow-overlay))))
(let ((props (overlay-properties rfn-eshadow-overlay)))
(while props
;; The `field' property prevents correct minibuffer
;; completion; we exclude it.
......@@ -1931,26 +1930,24 @@ This is intended to be used as a minibuffer `post-command-hook' for
been set up by `rfn-eshadow-setup-minibuffer'."
;; In remote files name, there is a shadowing just for the local part.
(let ((end (or (overlay-end (symbol-value 'rfn-eshadow-overlay))
(let ((end (or (overlay-end rfn-eshadow-overlay)
;; We do not want to send any remote command.
(non-essential t))
(buffer-substring-no-properties end (point-max)))
(1+ (or (string-match
(buffer-string) end)
(let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
(rfn-eshadow-update-overlay-hook nil)
(move-overlay rfn-eshadow-overlay (point-max) (point-max))
(1+ (or (string-match
(buffer-string) end)
(setq rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
(let (rfn-eshadow-update-overlay-hook file-name-handler-alist)
(move-overlay rfn-eshadow-overlay (point-max) (point-max))
(add-hook 'rfn-eshadow-update-overlay-hook
......@@ -4616,8 +4613,6 @@ Only works for Bourne-like shells."
;; strange when doing zerop, we should kill the process and start
;; again. (Greg Stark)
;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846)
;; * I was wondering if it would be possible to use tramp even if I'm
;; actually using sshfs. But when I launch a command I would like
;; to get it executed on the remote machine where the files really
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment