emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 5b8e0b31548: Fix tramp-sh-handle-insert-directory


From: Michael Albinus
Subject: emacs-29 5b8e0b31548: Fix tramp-sh-handle-insert-directory
Date: Sun, 5 Mar 2023 11:31:54 -0500 (EST)

branch: emacs-29
commit 5b8e0b31548feb7450d73a6ee33e10e6ed9796ee
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Fix tramp-sh-handle-insert-directory
    
    * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Remove also
    //DIRED-OPTIONS// line when there is no //DIRED// line.
---
 lisp/net/tramp-sh.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ec8437176db..392a654df21 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2742,8 +2742,8 @@ The method used must be an out-of-band method."
                      ;; End is followed by \n or by " -> ".
                      (put-text-property start end 'dired-filename t))))))
          ;; Remove trailing lines.
-         (beginning-of-line)
-         (while (looking-at "//")
+         (goto-char (point-max))
+         (while (re-search-backward (rx bol "//") nil 'noerror)
            (forward-line 1)
            (delete-region (match-beginning 0) (point))))
        ;; Reset multibyte if needed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]