]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-handle-insert-directory): Handle "--dired"
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 4 Sep 2009 08:14:30 +0000 (08:14 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 4 Sep 2009 08:14:30 +0000 (08:14 +0000)
also when adding a new directory.

lisp/net/tramp.el

index 2586542b656a94d8f3c092490c2fa0cb78c1078e..4a860dbb9f55672953443268ea31c1c2f8c7c0f5 100644 (file)
@@ -3761,10 +3761,9 @@ This is like `dired-recursive-delete-directory' for Tramp files."
           (buffer-string)))
 
        ;; Check for "--dired" output.
-       (goto-char (point-max))
        (forward-line -2)
        (when (looking-at "//DIRED//")
-         (let ((end (line-end-position))
+         (let ((end (tramp-compat-line-end-position))
                (linebeg (point)))
            ;; Now read the numeric positions of file names.
            (goto-char linebeg)
@@ -3777,12 +3776,10 @@ This is like `dired-recursive-delete-directory' for Tramp files."
                    ;; End is followed by \n or by " -> ".
                    (put-text-property start end 'dired-filename t)))))
          ;; Reove training lines.
-         (goto-char (point-max))
-         (forward-line -1)
+         (goto-char (tramp-compat-line-beginning-position))
          (while (looking-at "//")
            (forward-line 1)
-           (delete-region (match-beginning 0) (point))
-           (forward-line -1))))
+           (delete-region (match-beginning 0) (point)))))
       (goto-char (point-max)))))
 
 (defun tramp-handle-unhandled-file-name-directory (filename)