# HG changeset patch # User Katsumi Yamaoka # Date 1274225038 0 # Node ID 391df511b305a0ef73fa0882b1a99f81555fc22f # Parent 94ded30ef2abf7059095034d1b5fffbf10869574# Parent 1e3c6cb46d2a25b11ace7672dac77782af0fd35b Merge from mainline. diff -r 94ded30ef2ab -r 391df511b305 lisp/ChangeLog --- 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 + + * 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 * subr.el (read-quoted-char): Resolve modifiers after key diff -r 94ded30ef2ab -r 391df511b305 lisp/calc/calc-trail.el --- 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")