changeset 67180:8d028f859146

(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.
author Juri Linkov <juri@jurta.org>
date Mon, 28 Nov 2005 19:59:16 +0000
parents cfc0110bc143
children b3df9252e4e8
files lisp/replace.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Mon Nov 28 19:18:51 2005 +0000
+++ b/lisp/replace.el	Mon Nov 28 19:59:16 2005 +0000
@@ -755,7 +755,9 @@
       (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 @@
 (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 @@
 
     (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)