emacs-devel
[Top][All Lists]
Advanced

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

multi-occur-all-buffers suggestion, plus maybe a bug


From: John Paul Wallington
Subject: multi-occur-all-buffers suggestion, plus maybe a bug
Date: Wed, 15 May 2002 15:00:36 +0100

Do people think the following function, or something like it, is a
good idea ?

(defun multi-occur-all-buffers (regexp &optional nlines)
  "Show all lines in all buffers containing a match for REGEXP.
See also `multi-occur'."
  (interactive (occur-read-primary-args))
  (occur-1 regexp nlines (remove (get-buffer "*Occur*") (buffer-list))))


Also, presently C-u M-x occur will error:
Wrong type argument: number-or-marker-p, (4)

(as will other commands that use `occur-read-primary-args')

One way to change this is like so:

*** replace.el.orig     Wed May 15 14:49:47 2002
--- replace.el  Wed May 15 14:51:10 2002
***************
*** 612,618 ****
          (if (equal input "")
              default
            input))
!       current-prefix-arg))
  
  (defun occur (regexp &optional nlines)
    "Show all lines in the current buffer containing a match for REGEXP.
--- 612,619 ----
          (if (equal input "")
              default
            input))
!       (if current-prefix-arg
!           (prefix-numeric-value current-prefix-arg))))
  
  (defun occur (regexp &optional nlines)
    "Show all lines in the current buffer containing a match for

Is that a good way ?

-- 
John Paul Wallington




reply via email to

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