Mercurial > emacs
comparison lisp/calc/calc-trail.el @ 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 | 1d1d5d9bd884 |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
108655:fe3c51344472 | 108660:1e3c6cb46d2a |
---|---|
106 (calc-trail-here))) | 106 (calc-trail-here))) |
107 | 107 |
108 (defun calc-trail-isearch-forward () | 108 (defun calc-trail-isearch-forward () |
109 (interactive) | 109 (interactive) |
110 (calc-with-trail-buffer | 110 (calc-with-trail-buffer |
111 (save-window-excursion | 111 (let ((win (get-buffer-window (current-buffer))) |
112 (select-window (get-buffer-window (current-buffer))) | 112 pos) |
113 (let ((search-exit-char ?\r)) | 113 (save-window-excursion |
114 (isearch-forward))) | 114 (select-window win) |
115 (calc-trail-here))) | 115 (isearch-forward) |
116 (setq pos (point))) | |
117 (goto-char pos) | |
118 (set-window-point win pos) | |
119 (calc-trail-here)))) | |
116 | 120 |
117 (defun calc-trail-isearch-backward () | 121 (defun calc-trail-isearch-backward () |
118 (interactive) | 122 (interactive) |
119 (calc-with-trail-buffer | 123 (calc-with-trail-buffer |
120 (save-window-excursion | 124 (let ((win (get-buffer-window (current-buffer))) |
121 (select-window (get-buffer-window (current-buffer))) | 125 pos) |
122 (let ((search-exit-char ?\r)) | 126 (save-window-excursion |
123 (isearch-backward))) | 127 (select-window win) |
124 (calc-trail-here))) | 128 (isearch-backward) |
129 (setq pos (point))) | |
130 (goto-char pos) | |
131 (set-window-point win pos) | |
132 (calc-trail-here)))) | |
125 | 133 |
126 (defun calc-trail-yank (arg) | 134 (defun calc-trail-yank (arg) |
127 (interactive "P") | 135 (interactive "P") |
128 (calc-wrapper | 136 (calc-wrapper |
129 (or arg (calc-set-command-flag 'hold-trail)) | 137 (or arg (calc-set-command-flag 'hold-trail)) |