# HG changeset patch # User Richard M. Stallman # Date 1010470357 0 # Node ID a49b37e22b382013b49ab406db719f4770e051c0 # Parent 37c66e967bebd575e838eb7f21186b3931117fde (occur-mode-goto-occurrence-other-window): New command. (occur-mode-map): Bind `o' to that. diff -r 37c66e967beb -r a49b37e22b38 lisp/replace.el --- a/lisp/replace.el Tue Jan 08 05:41:37 2002 +0000 +++ b/lisp/replace.el Tue Jan 08 06:12:37 2002 +0000 @@ -437,6 +437,7 @@ (define-key map [mouse-2] 'occur-mode-mouse-goto) (define-key map "\C-c\C-c" 'occur-mode-goto-occurrence) (define-key map "\C-m" 'occur-mode-goto-occurrence) + (define-key map "\o" 'occur-mode-goto-occurrence-other-window) (define-key map "\C-o" 'occur-mode-display-occurrence) (define-key map "\M-n" 'occur-next) (define-key map "\M-p" 'occur-prev) @@ -514,6 +515,13 @@ (pop-to-buffer occur-buffer) (goto-char (marker-position pos)))) +(defun occur-mode-goto-occurrence-other-window () + "Go to the occurrence the current line describes, in another window." + (interactive) + (let ((pos (occur-mode-find-occurrence))) + (switch-to-buffer-other-window occur-buffer) + (goto-char (marker-position pos)))) + (defun occur-mode-display-occurrence () "Display in another window the occurrence the current line describes." (interactive)