# HG changeset patch # User Michael Albinus # Date 1252052070 0 # Node ID 5d5bbec3b1c82819f5c65f429987caa121833dd2 # Parent 15ac40f6056a4ee6f41bc4a0bbbff4b91d0db928 * net/tramp.el (tramp-handle-insert-directory): Handle "--dired" also when adding a new directory. diff -r 15ac40f6056a -r 5d5bbec3b1c8 lisp/net/tramp.el --- a/lisp/net/tramp.el Fri Sep 04 07:00:22 2009 +0000 +++ b/lisp/net/tramp.el Fri Sep 04 08:14:30 2009 +0000 @@ -3761,10 +3761,9 @@ (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 @@ ;; 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)