diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2010-05-18 17:49:56 -0500 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2010-05-18 17:49:56 -0500 |
commit | 134c2f29cef985c940bd9496a1e69dff850b80a3 (patch) | |
tree | f24c59536e7745d156526f8f59395e721400d61d /lisp/calc/calc-trail.el | |
parent | 278847cd9230346c8cc210b79a21acaf28f0fb62 (diff) | |
download | emacs-134c2f29cef985c940bd9496a1e69dff850b80a3.tar.gz |
calc-trail.el (calc-trail-isearch-forward)
(calc-trail-isearch-backward): Ensure that the new window
point is set correctly.
Diffstat (limited to 'lisp/calc/calc-trail.el')
-rw-r--r-- | lisp/calc/calc-trail.el | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index 9bbb4178fd3..20dc1d1b99e 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -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") |