Function: tramp-rfn-eshadow-update-overlay
tramp-rfn-eshadow-update-overlay is a byte-compiled function defined
in tramp-integration.el.gz.
Signature
(tramp-rfn-eshadow-update-overlay)
Documentation
Update rfn-eshadow-overlay to cover shadowed part of minibuffer input.
This is intended to be used as a minibuffer post-command-hook for
file-name-shadow-mode(var)/file-name-shadow-mode(fun); the minibuffer should have already
been set up by rfn-eshadow-setup-minibuffer.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-integration.el.gz
(defun tramp-rfn-eshadow-update-overlay ()
"Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input.
This is intended to be used as a minibuffer `post-command-hook' for
`file-name-shadow-mode'; the minibuffer should have already
been set up by `rfn-eshadow-setup-minibuffer'."
(declare (tramp-suppress-trace t))
;; In remote files name, there is a shadowing just for the local part.
(ignore-errors
(let ((end (or (overlay-end rfn-eshadow-overlay)
(minibuffer-prompt-end)))
;; We do not want to send any remote command.
(non-essential t))
(when (and (tramp-tramp-file-p (buffer-substring end (point-max)))
(not (file-name-quoted-p (buffer-substring end (point-max)))))
(save-excursion
(save-restriction
(narrow-to-region
(1+ (or (string-match-p
(tramp-rfn-eshadow-update-overlay-regexp)
(buffer-string) end)
end))
(point-max))
(let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
rfn-eshadow-update-overlay-hook
file-name-handler-alist)
(move-overlay rfn-eshadow-overlay (point-max) (point-max))
(rfn-eshadow-update-overlay))))))))