diff options
| author | Juanma Barranquero | 2007-10-22 09:43:42 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-10-22 09:43:42 +0000 |
| commit | e8308ca76096fb8a7da02425ade339d32a2f4496 (patch) | |
| tree | 325b323353b7998e456c6e1e46303f886ee339e6 | |
| parent | 0f3cd6b26401d1e68c1ad5dbcd73ed72569acb6b (diff) | |
| download | emacs-e8308ca76096fb8a7da02425ade339d32a2f4496.tar.gz emacs-e8308ca76096fb8a7da02425ade339d32a2f4496.zip | |
(tramp-handle-expand-many-files): Remove.
(PC-expand-many-files): Remove advice.
| -rw-r--r-- | lisp/net/tramp.el | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 10c2043b204..865a3c51837 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -4514,61 +4514,6 @@ Falls back to normal file name handler if no tramp file name handler exists." | |||
| 4514 | 4514 | ||
| 4515 | (add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers) | 4515 | (add-hook 'tramp-unload-hook 'tramp-unload-file-name-handlers) |
| 4516 | 4516 | ||
| 4517 | ;;; Interactions with other packages: | ||
| 4518 | |||
| 4519 | ;; -- complete.el -- | ||
| 4520 | |||
| 4521 | ;; This function contributed by Ed Sabol | ||
| 4522 | (defun tramp-handle-expand-many-files (name) | ||
| 4523 | "Like `PC-expand-many-files' for Tramp files." | ||
| 4524 | (with-parsed-tramp-file-name name nil | ||
| 4525 | (save-match-data | ||
| 4526 | (if (or (string-match "\\*" name) | ||
| 4527 | (string-match "\\?" name) | ||
| 4528 | (string-match "\\[.*\\]" name)) | ||
| 4529 | (progn | ||
| 4530 | (let (bufstr) | ||
| 4531 | ;; CCC: To do it right, we should quote certain characters | ||
| 4532 | ;; in the file name, but since the echo command is going to | ||
| 4533 | ;; break anyway when there are spaces in the file names, we | ||
| 4534 | ;; don't bother. | ||
| 4535 | ;;-(let ((comint-file-name-quote-list | ||
| 4536 | ;;- (set-difference tramp-file-name-quote-list | ||
| 4537 | ;;- '(?\* ?\? ?[ ?])))) | ||
| 4538 | ;;- (tramp-send-command | ||
| 4539 | ;;- method user host | ||
| 4540 | ;;- (format "echo %s" (comint-quote-filename localname)))) | ||
| 4541 | (tramp-send-command v (format "echo %s" localname)) | ||
| 4542 | (setq bufstr (buffer-substring | ||
| 4543 | (point-min) (tramp-compat-line-end-position))) | ||
| 4544 | (with-current-buffer (tramp-get-buffer v) | ||
| 4545 | (goto-char (point-min)) | ||
| 4546 | (if (string-equal localname bufstr) | ||
| 4547 | nil | ||
| 4548 | (insert "(\"") | ||
| 4549 | (while (search-forward " " nil t) | ||
| 4550 | (delete-backward-char 1) | ||
| 4551 | (insert "\" \"")) | ||
| 4552 | (goto-char (point-max)) | ||
| 4553 | (delete-backward-char 1) | ||
| 4554 | (insert "\")") | ||
| 4555 | (goto-char (point-min)) | ||
| 4556 | (mapcar | ||
| 4557 | (lambda (x) (tramp-make-tramp-file-name method user host x)) | ||
| 4558 | (read (current-buffer))))))) | ||
| 4559 | (list (expand-file-name name)))))) | ||
| 4560 | |||
| 4561 | (eval-after-load "complete" | ||
| 4562 | '(progn | ||
| 4563 | (defadvice PC-expand-many-files | ||
| 4564 | (around tramp-advice-PC-expand-many-files (name) activate) | ||
| 4565 | "Invoke `tramp-handle-expand-many-files' for Tramp files." | ||
| 4566 | (if (tramp-tramp-file-p name) | ||
| 4567 | (setq ad-return-value (tramp-handle-expand-many-files name)) | ||
| 4568 | ad-do-it)) | ||
| 4569 | (add-hook 'tramp-unload-hook | ||
| 4570 | '(lambda () (ad-unadvise 'PC-expand-many-files))))) | ||
| 4571 | |||
| 4572 | ;;; File name handler functions for completion mode. | 4517 | ;;; File name handler functions for completion mode. |
| 4573 | 4518 | ||
| 4574 | (defvar tramp-completion-mode nil | 4519 | (defvar tramp-completion-mode nil |