emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp/net tramp.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net tramp.el
Date: Mon, 03 Aug 2009 08:21:29 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/08/03 08:21:29

Modified files:
        lisp/net       : tramp.el 

Log message:
        * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New
        defconst.
        (tramp-rfn-eshadow-update-overlay): Use it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&r1=1.246&r2=1.247

Patches:
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -b -r1.246 -r1.247
--- tramp.el    2 Aug 2009 17:16:39 -0000       1.246
+++ tramp.el    3 Aug 2009 08:21:29 -0000       1.247
@@ -2196,6 +2196,9 @@
               (remove-hook 'rfn-eshadow-setup-minibuffer-hook
                            'tramp-rfn-eshadow-setup-minibuffer))))
 
+(defconst tramp-rfn-eshadow-update-overlay-regexp
+  (format "[^%s/~]*\\(/\\|~\\)" tramp-postfix-host-format))
+
 (defun tramp-rfn-eshadow-update-overlay ()
   "Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input.
 This is intended to be used as a minibuffer `post-command-hook' for
@@ -2209,7 +2212,10 @@
       (save-excursion
        (save-restriction
          (narrow-to-region
-          (1+ (or (string-match "/" (buffer-string) end) end)) (point-max))
+          (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))
            (move-overlay rfn-eshadow-overlay (point-max) (point-max))




reply via email to

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