From: Michael Albinus Date: Mon, 3 Aug 2009 08:22:04 +0000 (+0000) Subject: * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New X-Git-Tag: emacs-pretest-23.1.90~1969 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=adcbca532ba6d14daf5d6afc8aa231b01ce3f064;p=emacs.git * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New defconst. (tramp-rfn-eshadow-update-overlay): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 783a95da671..b15c3eb3e0c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-08-03 Michael Albinus + + * net/tramp.el (tramp-rfn-eshadow-update-overlay-regexp) New + defconst. + (tramp-rfn-eshadow-update-overlay): Use it. + 2009-08-02 Kevin Ryde * net/newst-backend.el (newsticker--raw-url-list-defaults): Update @@ -5,7 +11,6 @@ 2009-08-02 Chong Yidong - * select.el (x-set-selection): Doc fix (Bug#4021). * w32-fns.el (x-set-selection): Doc fix (Bug#4021). diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e8ce36e4c07..df2f10ba5dd 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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))