aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-01-08 06:12:37 +0000
committerRichard M. Stallman2002-01-08 06:12:37 +0000
commit029024e25b140d534834ebfb173e20d0985af7ef (patch)
tree7b628218b74d6a275c93301ef5c3c58bafda1119
parent192c3131345ac1f3445dd4bbdb46156ed4d6e122 (diff)
downloademacs-029024e25b140d534834ebfb173e20d0985af7ef.tar.gz
emacs-029024e25b140d534834ebfb173e20d0985af7ef.zip
(occur-mode-goto-occurrence-other-window): New command.
(occur-mode-map): Bind `o' to that.
-rw-r--r--lisp/replace.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 474e6158e87..6986a93b3bf 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -437,6 +437,7 @@ end of the buffer."
437 (define-key map [mouse-2] 'occur-mode-mouse-goto) 437 (define-key map [mouse-2] 'occur-mode-mouse-goto)
438 (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) 438 (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence)
439 (define-key map "\C-m" 'occur-mode-goto-occurrence) 439 (define-key map "\C-m" 'occur-mode-goto-occurrence)
440 (define-key map "\o" 'occur-mode-goto-occurrence-other-window)
440 (define-key map "\C-o" 'occur-mode-display-occurrence) 441 (define-key map "\C-o" 'occur-mode-display-occurrence)
441 (define-key map "\M-n" 'occur-next) 442 (define-key map "\M-n" 'occur-next)
442 (define-key map "\M-p" 'occur-prev) 443 (define-key map "\M-p" 'occur-prev)
@@ -514,6 +515,13 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
514 (pop-to-buffer occur-buffer) 515 (pop-to-buffer occur-buffer)
515 (goto-char (marker-position pos)))) 516 (goto-char (marker-position pos))))
516 517
518(defun occur-mode-goto-occurrence-other-window ()
519 "Go to the occurrence the current line describes, in another window."
520 (interactive)
521 (let ((pos (occur-mode-find-occurrence)))
522 (switch-to-buffer-other-window occur-buffer)
523 (goto-char (marker-position pos))))
524
517(defun occur-mode-display-occurrence () 525(defun occur-mode-display-occurrence ()
518 "Display in another window the occurrence the current line describes." 526 "Display in another window the occurrence the current line describes."
519 (interactive) 527 (interactive)