summaryrefslogtreecommitdiff
path: root/lisp/net/tramp-sudoedit.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2021-12-06 19:36:15 +0100
committerMichael Albinus <michael.albinus@gmx.de>2021-12-06 19:36:15 +0100
commite135f15aac84bcc1357fe98aea56d9e198f51e8f (patch)
tree02b25ff79c8247c655c7aef761f89f727ab095b6 /lisp/net/tramp-sudoedit.el
parentaa63064fec4b94bbe090ea17965062bfc11ee944 (diff)
downloademacs-e135f15aac84bcc1357fe98aea56d9e198f51e8f.tar.gz
Tramp code cleanup
* lisp/net/tramp.el (tramp-get-default-directory) (tramp-get-buffer-string): New defsubsts. (tramp-message, tramp-error-with-buffer) (tramp-file-name-for-operation, tramp-command-completion-p) (tramp-action-login, tramp-action-yesno, tramp-action-yn) (tramp-action-terminal, tramp-action-confirm-message) (tramp-wait-for-regexp, tramp-call-process) (tramp-call-process-region, tramp-read-passwd): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers) (tramp-reporter-dump-variable): * lisp/net/tramp-gvfs.el (tramp-gvfs-monitor-process-filter): * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory) (tramp-sh-handle-process-file, tramp-sh-handle-write-region) (tramp-sh-gio-monitor-process-filter): * lisp/net/tramp-smb.el (tramp-smb-action-set-acl): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-name-all-completions): * test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case) (tramp-test32-shell-command): Use them.
Diffstat (limited to 'lisp/net/tramp-sudoedit.el')
-rw-r--r--lisp/net/tramp-sudoedit.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 6da00f812da..0309b6b0227 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -453,12 +453,13 @@ the result will be a local, non-Tramp, file name."
(if (file-directory-p (expand-file-name f directory))
(file-name-as-directory f)
f))
- (with-current-buffer (tramp-get-connection-buffer v)
- (delq
- nil
- (mapcar
- (lambda (l) (and (not (string-match-p "^[[:space:]]*$" l)) l))
- (split-string (buffer-string) "\n" 'omit)))))))))
+ (delq
+ nil
+ (mapcar
+ (lambda (l) (and (not (string-match-p "^[[:space:]]*$" l)) l))
+ (split-string
+ (tramp-get-buffer-string (tramp-get-connection-buffer v))
+ "\n" 'omit))))))))
(defun tramp-sudoedit-handle-file-readable-p (filename)
"Like `file-readable-p' for Tramp files."