emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Disable same window pop-to-buffer in Occur buffers


From: Juri Linkov
Subject: Disable same window pop-to-buffer in Occur buffers
Date: Sat, 29 Oct 2005 01:07:34 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

`occur-mode-mouse-goto' and `occur-mode-goto-occurrence' switch the
buffer in the same window when the buffer name is matched by
`same-window-...' variables.  There is a special command
`occur-mode-goto-occurrence-other-window' that selects the buffer in
another window, so I think these command should disregard the values
of `same-window-...':

Index: lisp/replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.227
diff -c -r1.227 replace.el
*** lisp/replace.el     27 Oct 2005 18:22:00 -0000      1.227
--- lisp/replace.el     28 Oct 2005 22:05:42 -0000
***************
*** 755,761 ****
        (save-excursion
        (goto-char (posn-point (event-end event)))
        (setq pos (occur-mode-find-occurrence))))
!     (pop-to-buffer (marker-buffer pos))
      (goto-char pos)))
  
  (defun occur-mode-find-occurrence ()
--- 755,763 ----
        (save-excursion
        (goto-char (posn-point (event-end event)))
        (setq pos (occur-mode-find-occurrence))))
!     (let (same-window-buffer-names
!         same-window-regexps)
!       (pop-to-buffer (marker-buffer pos)))
      (goto-char pos)))
  
  (defun occur-mode-find-occurrence ()
***************
*** 769,775 ****
  (defun occur-mode-goto-occurrence ()
    "Go to the occurrence the current line describes."
    (interactive)
!   (let ((pos (occur-mode-find-occurrence)))
      (pop-to-buffer (marker-buffer pos))
      (goto-char pos)))
  
--- 771,779 ----
  (defun occur-mode-goto-occurrence ()
    "Go to the occurrence the current line describes."
    (interactive)
!   (let ((pos (occur-mode-find-occurrence))
!       same-window-buffer-names
!       same-window-regexps)
      (pop-to-buffer (marker-buffer pos))
      (goto-char pos)))
  

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]