Mercurial > emacs
diff lisp/net/tramp.el @ 85428:ad84adc0e027
From_ Johan Bockgrd, <http://article.gmane.org/gmane.emacs.devel/81056>
* net/tramp.el (tramp-rfn-eshadow-update-overlay): Save excursion.
Use `save-restriction' rather than `widen'.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 18 Oct 2007 22:49:05 +0000 |
parents | 9a6e9b6e4a76 |
children | 05c8e6a18913 1251cabc40b7 |
line wrap: on
line diff
--- a/lisp/net/tramp.el Thu Oct 18 22:07:34 2007 +0000 +++ b/lisp/net/tramp.el Thu Oct 18 22:49:05 2007 +0000 @@ -2092,12 +2092,13 @@ (symbol-value 'rfn-eshadow-overlay)) (funcall (symbol-function 'minibuffer-prompt-end))))) (when (file-remote-p (buffer-substring-no-properties end (point-max))) - (narrow-to-region - (1+ (or (string-match "/" (buffer-string) end) end)) (point-max)) - (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) - (rfn-eshadow-update-overlay-hook nil)) - (funcall (symbol-function 'rfn-eshadow-update-overlay))) - (widen)))) + (save-excursion + (save-restriction + (narrow-to-region + (1+ (or (string-match "/" (buffer-string) end) end)) (point-max)) + (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) + (rfn-eshadow-update-overlay-hook nil)) + (funcall (symbol-function 'rfn-eshadow-update-overlay)))))))) (when (boundp 'rfn-eshadow-update-overlay-hook) (add-hook 'rfn-eshadow-update-overlay-hook