summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2005-11-28 19:59:16 +0000
committerJuri Linkov <juri@jurta.org>2005-11-28 19:59:16 +0000
commit6c6605b2cf27340ed455d20de6b289beea1a62d7 (patch)
tree0208f54c4924e9d7427ea41d711e620594129315 /lisp
parent7e1d31d4604a0525afd6b25cb1bf31bd23fe9db9 (diff)
downloademacs-6c6605b2cf27340ed455d20de6b289beea1a62d7.tar.gz
(occur-mode-mouse-goto): Pop, don't switch.
(occur-mode-goto-occurrence): Let-bind same-window-buffer-names and same-window-regexps. (occur-next-error): Don't move point for arg 0.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/replace.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index f269baef9f1..57326d08ef2 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -755,7 +755,9 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(save-excursion
(goto-char (posn-point (event-end event)))
(setq pos (occur-mode-find-occurrence))))
- (switch-to-buffer-other-window (marker-buffer pos))
+ (let (same-window-buffer-names
+ same-window-regexps)
+ (pop-to-buffer (marker-buffer pos)))
(goto-char pos)))
(defun occur-mode-find-occurrence ()
@@ -769,7 +771,9 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(defun occur-mode-goto-occurrence ()
"Go to the occurrence the current line describes."
(interactive)
- (let ((pos (occur-mode-find-occurrence)))
+ (let ((pos (occur-mode-find-occurrence))
+ same-window-buffer-names
+ same-window-regexps)
(pop-to-buffer (marker-buffer pos))
(goto-char pos)))
@@ -832,7 +836,8 @@ Compatibility function for \\[next-error] invocations."
(goto-char (cond (reset (point-min))
((< argp 0) (line-beginning-position))
- ((line-end-position))))
+ ((> argp 0) (line-end-position))
+ ((point))))
(occur-find-match
(abs argp)
(if (> 0 argp)