aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorMiles Bader2005-07-14 08:02:00 +0000
committerMiles Bader2005-07-14 08:02:00 +0000
commitbacb9790f594207469f22ed9f3e8085ab76e5e2b (patch)
treeb1cee62715d6cd2797f3122e4f058d7bc18ceef6 /lisp/replace.el
parentd3e4babdd1267fb5690a17949196640a47c6f159 (diff)
parentead25b5cabbe092711864eae13a76437e6a65ce1 (diff)
downloademacs-bacb9790f594207469f22ed9f3e8085ab76e5e2b.tar.gz
emacs-bacb9790f594207469f22ed9f3e8085ab76e5e2b.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-69
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 474-484) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 88-91) - Merge from emacs--cvs-trunk--0 - Update FSF's address in GPL notices - Update from CVS
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 4b745d54433..a8ef61e828d 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -921,21 +921,22 @@ If the value is nil, don't highlight the buffer names specially."
921 (when current-prefix-arg 921 (when current-prefix-arg
922 (prefix-numeric-value current-prefix-arg)))) 922 (prefix-numeric-value current-prefix-arg))))
923 923
924(defun occur-rename-buffer (&optional unique-p) 924(defun occur-rename-buffer (&optional unique-p interactive-p)
925 "Rename the current *Occur* buffer to *Occur: original-buffer-name*. 925 "Rename the current *Occur* buffer to *Occur: original-buffer-name*.
926Here `original-buffer-name' is the buffer name were occur was originally run. 926Here `original-buffer-name' is the buffer name were Occur was originally run.
927When given the prefix argument, the renaming will not clobber the existing 927When given the prefix argument, or called non-interactively, the renaming
928buffer(s) of that name, but use `generate-new-buffer-name' instead. 928will not clobber the existing buffer(s) of that name, but use
929You can add this to `occur-mode-hook' if you always want a separate *Occur* 929`generate-new-buffer-name' instead. You can add this to `occur-hook'
930buffer for each buffer where you invoke `occur'." 930if you always want a separate *Occur* buffer for each buffer where you
931 (interactive "P") 931invoke `occur'."
932 (interactive "P\np")
932 (with-current-buffer 933 (with-current-buffer
933 (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*")) 934 (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*"))
934 (rename-buffer (concat "*Occur: " 935 (rename-buffer (concat "*Occur: "
935 (mapconcat #'buffer-name 936 (mapconcat #'buffer-name
936 (car (cddr occur-revert-arguments)) "/") 937 (car (cddr occur-revert-arguments)) "/")
937 "*") 938 "*")
938 unique-p))) 939 (or unique-p (not interactive-p)))))
939 940
940(defun occur (regexp &optional nlines) 941(defun occur (regexp &optional nlines)
941 "Show all lines in the current buffer containing a match for REGEXP. 942 "Show all lines in the current buffer containing a match for REGEXP.