changeset 108685:391df511b305

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Tue, 18 May 2010 23:23:58 +0000
parents 94ded30ef2ab (current diff) 1e3c6cb46d2a (diff)
children 912915c9edd9
files
diffstat 2 files changed, 24 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue May 18 22:45:34 2010 +0000
+++ b/lisp/ChangeLog	Tue May 18 23:23:58 2010 +0000
@@ -1,3 +1,9 @@
+2010-05-18  Jay Belanger  <jay.p.belanger@gmail.com>
+
+	* calc/calc-trail.el (calc-trail-isearch-forward)
+	(calc-trail-isearch-backward): Ensure that the new window
+	point is set correctly.
+
 2010-05-18  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* subr.el (read-quoted-char): Resolve modifiers after key
--- a/lisp/calc/calc-trail.el	Tue May 18 22:45:34 2010 +0000
+++ b/lisp/calc/calc-trail.el	Tue May 18 23:23:58 2010 +0000
@@ -108,20 +108,28 @@
 (defun calc-trail-isearch-forward ()
   (interactive)
   (calc-with-trail-buffer
-   (save-window-excursion
-     (select-window (get-buffer-window (current-buffer)))
-     (let ((search-exit-char ?\r))
-       (isearch-forward)))
-   (calc-trail-here)))
+   (let ((win (get-buffer-window (current-buffer)))
+         pos)
+     (save-window-excursion
+       (select-window win)
+       (isearch-forward)
+       (setq pos (point)))
+     (goto-char pos)
+     (set-window-point win pos)
+     (calc-trail-here))))
 
 (defun calc-trail-isearch-backward ()
   (interactive)
   (calc-with-trail-buffer
-   (save-window-excursion
-     (select-window (get-buffer-window (current-buffer)))
-     (let ((search-exit-char ?\r))
-       (isearch-backward)))
-   (calc-trail-here)))
+   (let ((win (get-buffer-window (current-buffer)))
+         pos)
+     (save-window-excursion
+       (select-window win)
+       (isearch-backward)
+       (setq pos (point)))
+     (goto-char pos)
+     (set-window-point win pos)
+     (calc-trail-here))))
 
 (defun calc-trail-yank (arg)
   (interactive "P")