Mercurial > emacs
changeset 108660:1e3c6cb46d2a
calc-trail.el (calc-trail-isearch-forward)
(calc-trail-isearch-backward): Ensure that the new window
point is set correctly.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Tue, 18 May 2010 17:49:56 -0500 |
parents | fe3c51344472 |
children | 391df511b305 452cd1d4f5ad 194ff305ac3f |
files | lisp/ChangeLog lisp/calc/calc-trail.el |
diffstat | 2 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue May 18 16:31:44 2010 -0400 +++ b/lisp/ChangeLog Tue May 18 17:49:56 2010 -0500 @@ -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 16:31:44 2010 -0400 +++ b/lisp/calc/calc-trail.el Tue May 18 17:49:56 2010 -0500 @@ -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")