emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-26 508c40e: Comple fix for Bug#32550


From: Michael Albinus
Subject: [Emacs-diffs] emacs-26 508c40e: Comple fix for Bug#32550
Date: Mon, 1 Oct 2018 08:17:44 -0400 (EDT)

branch: emacs-26
commit 508c40ef1dd625b9c9a58c863995ed241f4a5184
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Comple fix for Bug#32550
    
    * lisp/net/tramp.el (tramp-rfn-eshadow-update-overlay):
    Use `save-excursion'.  This completes the fix of Bug#32550.
---
 lisp/net/tramp.el | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 452e70e..98ec841 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1941,21 +1941,20 @@ been set up by `rfn-eshadow-setup-minibuffer'."
                   (minibuffer-prompt-end)))
          ;; We do not want to send any remote command.
          (non-essential t))
-      (when
-         (tramp-tramp-file-p
-          (buffer-substring-no-properties end (point-max)))
-       (save-restriction
-         (narrow-to-region
-          (1+ (or (string-match
-                   (tramp-rfn-eshadow-update-overlay-regexp)
-                   (buffer-string) end)
-                  end))
-          (point-max))
-         (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
-               (rfn-eshadow-update-overlay-hook nil)
-               file-name-handler-alist)
-           (move-overlay rfn-eshadow-overlay (point-max) (point-max))
-           (rfn-eshadow-update-overlay)))))))
+      (when (tramp-tramp-file-p (buffer-substring end (point-max)))
+       (save-excursion
+         (save-restriction
+           (narrow-to-region
+            (1+ (or (string-match
+                     (tramp-rfn-eshadow-update-overlay-regexp)
+                     (buffer-string) end)
+                    end))
+            (point-max))
+           (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay)
+                 (rfn-eshadow-update-overlay-hook nil)
+                 file-name-handler-alist)
+             (move-overlay rfn-eshadow-overlay (point-max) (point-max))
+             (rfn-eshadow-update-overlay))))))))
 
 (add-hook 'rfn-eshadow-update-overlay-hook
          'tramp-rfn-eshadow-update-overlay)



reply via email to

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