]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 3 Aug 2009 08:22:04 +0000 (08:22 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 3 Aug 2009 08:22:04 +0000 (08:22 +0000)
defconst.
(tramp-rfn-eshadow-update-overlay): Use it.

lisp/ChangeLog
lisp/net/tramp.el

index 783a95da6712ba39948466531fec0c3193f55987..b15c3eb3e0c6393dda24269019fc8443923a996b 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-03  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New
+       defconst.
+       (tramp-rfn-eshadow-update-overlay): Use it.
+
 2009-08-02  Kevin Ryde  <user42@zip.com.au>
 
        * net/newst-backend.el (newsticker--raw-url-list-defaults): Update
@@ -5,7 +11,6 @@
 
 2009-08-02  Chong Yidong  <cyd@stupidchicken.com>
 
-
        * select.el (x-set-selection): Doc fix (Bug#4021).
 
        * w32-fns.el (x-set-selection): Doc fix (Bug#4021).
index e8ce36e4c07245bb17ec8a614c548ca1217f7607..df2f10ba5dd5f2254199b2450c7fc6ed4d7d84ec 100644 (file)
@@ -2196,6 +2196,9 @@ special handling of `substitute-in-file-name'."
               (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 @@ been set up by `rfn-eshadow-setup-minibuffer'."
       (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))