aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/replace.el
diff options
context:
space:
mode:
authorKaroly Lorentey2006-02-03 13:58:41 +0000
committerKaroly Lorentey2006-02-03 13:58:41 +0000
commit0a7114a4e535e70b237b15817988344a03fe7ab1 (patch)
tree62203ebf84b3070c638cbea265d25fe542514cc0 /lisp/replace.el
parenteb2bfdae0a1b6579908f072ab57aec0d80d6c6ec (diff)
parentc36f1e67800423383832447c45e6125bf46efc7a (diff)
downloademacs-0a7114a4e535e70b237b15817988344a03fe7ab1.tar.gz
emacs-0a7114a4e535e70b237b15817988344a03fe7ab1.zip
Merged from
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-32 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-33 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-34 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-35 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-36 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-37 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-8 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-9 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-10 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-11 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-12 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-13 Merge from emacs--devo--0 git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-504
Diffstat (limited to 'lisp/replace.el')
-rw-r--r--lisp/replace.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/replace.el b/lisp/replace.el
index 46f672a8d1a..92b4be7fd7b 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -973,7 +973,8 @@ the matching is case-sensitive."
973(defun multi-occur (bufs regexp &optional nlines) 973(defun multi-occur (bufs regexp &optional nlines)
974 "Show all lines in buffers BUFS containing a match for REGEXP. 974 "Show all lines in buffers BUFS containing a match for REGEXP.
975This function acts on multiple buffers; otherwise, it is exactly like 975This function acts on multiple buffers; otherwise, it is exactly like
976`occur'." 976`occur'. When you invoke this command interactively, you must specify
977the buffer names that you want, one by one."
977 (interactive 978 (interactive
978 (cons 979 (cons
979 (let* ((bufs (list (read-buffer "First buffer to search: " 980 (let* ((bufs (list (read-buffer "First buffer to search: "
@@ -993,15 +994,19 @@ This function acts on multiple buffers; otherwise, it is exactly like
993 (occur-read-primary-args))) 994 (occur-read-primary-args)))
994 (occur-1 regexp nlines bufs)) 995 (occur-1 regexp nlines bufs))
995 996
996(defun multi-occur-by-filename-regexp (bufregexp regexp &optional nlines) 997(defun multi-occur-in-matching-buffers (bufregexp regexp &optional allbufs)
997 "Show all lines matching REGEXP in buffers named by BUFREGEXP. 998 "Show all lines matching REGEXP in buffers specified by BUFREGEXP.
999Normally BUFREGEXP matches against each buffer's visited file name,
1000but if you specify a prefix argument, it matches against the buffer name.
998See also `multi-occur'." 1001See also `multi-occur'."
999 (interactive 1002 (interactive
1000 (cons 1003 (cons
1001 (let* ((default (car regexp-history)) 1004 (let* ((default (car regexp-history))
1002 (input 1005 (input
1003 (read-from-minibuffer 1006 (read-from-minibuffer
1004 "List lines in buffers whose filename matches regexp: " 1007 (if current-prefix-arg
1008 "List lines in buffers whose names match regexp: "
1009 "List lines in buffers whose filenames match regexp: ")
1005 nil 1010 nil
1006 nil 1011 nil
1007 nil 1012 nil
@@ -1011,12 +1016,15 @@ See also `multi-occur'."
1011 input)) 1016 input))
1012 (occur-read-primary-args))) 1017 (occur-read-primary-args)))
1013 (when bufregexp 1018 (when bufregexp
1014 (occur-1 regexp nlines 1019 (occur-1 regexp nil
1015 (delq nil 1020 (delq nil
1016 (mapcar (lambda (buf) 1021 (mapcar (lambda (buf)
1017 (when (and (buffer-file-name buf) 1022 (when (if allbufs
1018 (string-match bufregexp 1023 (string-match bufregexp
1019 (buffer-file-name buf))) 1024 (buffer-name buf))
1025 (and (buffer-file-name buf)
1026 (string-match bufregexp
1027 (buffer-file-name buf))))
1020 buf)) 1028 buf))
1021 (buffer-list)))))) 1029 (buffer-list))))))
1022 1030