Commit 365486d6 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(occur-mode-display-occurrence): New function.

(occur-mode-map): Bind C-o to it.
parent 3978dec0
2001-12-24 Richard M. Stallman <>
* replace.el (occur-mode-display-occurrence): New function.
(occur-mode-map): Bind C-o to it.
2001-12-24 Michael Kifer <>
* viper-cmd.el (viper-change-state): Got rid of make-local-hook.
......@@ -436,6 +436,7 @@ end of the buffer."
(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 "\C-o" 'occur-mode-display-occurrence)
(define-key map "\M-n" 'occur-next)
(define-key map "\M-p" 'occur-prev)
(define-key map "g" 'revert-buffer)
......@@ -512,6 +513,19 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(pop-to-buffer occur-buffer)
(goto-char (marker-position pos))))
(defun occur-mode-display-occurrence ()
"Display in another window the occurrence the current line describes."
(let ((pos (occur-mode-find-occurrence))
(setq window (display-buffer occur-buffer))
;; This is the way to set point in the proper window.
(select-window window)
(goto-char (marker-position pos)))))
(defun occur-next (&optional n)
"Move to the Nth (default 1) next match in the *Occur* buffer."
(interactive "p")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment