[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/replace.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/replace.el |
Date: |
Thu, 07 Jul 2005 05:59:27 -0400 |
Index: emacs/lisp/replace.el
diff -c emacs/lisp/replace.el:1.218 emacs/lisp/replace.el:1.219
*** emacs/lisp/replace.el:1.218 Mon Jul 4 23:08:57 2005
--- emacs/lisp/replace.el Thu Jul 7 09:59:26 2005
***************
*** 921,941 ****
(when current-prefix-arg
(prefix-numeric-value current-prefix-arg))))
! (defun occur-rename-buffer (&optional unique-p)
"Rename the current *Occur* buffer to *Occur: original-buffer-name*.
! Here `original-buffer-name' is the buffer name were occur was originally run.
! When given the prefix argument, the renaming will not clobber the existing
! buffer(s) of that name, but use `generate-new-buffer-name' instead.
! You can add this to `occur-mode-hook' if you always want a separate *Occur*
! buffer for each buffer where you invoke `occur'."
! (interactive "P")
(with-current-buffer
(if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*"))
(rename-buffer (concat "*Occur: "
(mapconcat #'buffer-name
(car (cddr occur-revert-arguments)) "/")
"*")
! unique-p)))
(defun occur (regexp &optional nlines)
"Show all lines in the current buffer containing a match for REGEXP.
--- 921,942 ----
(when current-prefix-arg
(prefix-numeric-value current-prefix-arg))))
! (defun occur-rename-buffer (&optional unique-p interactive-p)
"Rename the current *Occur* buffer to *Occur: original-buffer-name*.
! Here `original-buffer-name' is the buffer name were Occur was originally run.
! When given the prefix argument, or called non-interactively, the renaming
! will not clobber the existing buffer(s) of that name, but use
! `generate-new-buffer-name' instead. You can add this to `occur-hook'
! if you always want a separate *Occur* buffer for each buffer where you
! invoke `occur'."
! (interactive "P\np")
(with-current-buffer
(if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*"))
(rename-buffer (concat "*Occur: "
(mapconcat #'buffer-name
(car (cddr occur-revert-arguments)) "/")
"*")
! (or unique-p (not interactive-p)))))
(defun occur (regexp &optional nlines)
"Show all lines in the current buffer containing a match for REGEXP.