master a1e6a538c1f: Fix tramp-file-name-for-operation
Michael Albinus via Mailing list for Emacs changes <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: master commit a1e6a538c1fab4faa295c51619210e53d7892dd3 Author: Alexey Lebedev <[email protected]> Commit: Michael Albinus <[email protected]> Fix tramp-file-name-for-operation * lisp/net/tramp.el (tramp-file-name-for-operation): Fix the case, that the first argument is a process name. --- lisp/net/tramp.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cb89428886e..52c73dcf92a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2573,7 +2573,9 @@ Must be handled by the callers." ((bufferp (nth 0 args)) (get-buffer (nth 0 args))) ((stringp (nth 0 args)) ;; Process or buffer name. - (or (get-process (nth 0 args)) (get-buffer (nth 0 args))))))) + (or (when-let* ((proc (get-process (nth 0 args)))) + (process-buffer proc)) + (get-buffer (nth 0 args))))))) (tramp-get-default-directory buf)) ""))