summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-trail.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2010-05-18 17:49:56 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2010-05-18 17:49:56 -0500
commit134c2f29cef985c940bd9496a1e69dff850b80a3 (patch)
treef24c59536e7745d156526f8f59395e721400d61d /lisp/calc/calc-trail.el
parent278847cd9230346c8cc210b79a21acaf28f0fb62 (diff)
downloademacs-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.el28
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")