From 96673afeb28274a4495c35e49435ad25e3005a48 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 4 Jul 2013 02:11:58 +0300 Subject: [PATCH] * lisp/buff-menu.el (Buffer-menu-multi-occur): Add args and move the call of `occur-read-primary-args' to interactive spec. * lisp/ibuffer.el (ibuffer-mode-map): Bind "M-s a C-o" to `ibuffer-do-occur' like in buff-menu.el. Fixes: debbugs:14673 --- etc/NEWS | 4 ++++ lisp/ChangeLog | 8 ++++++++ lisp/buff-menu.el | 7 +++---- lisp/ibuffer.el | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index f83d82417dd..cd17d806a81 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -218,6 +218,10 @@ The default separator is changed to allow surrounding spaces around the comma. *** Battery information via the BSD `apm' utility is now supported. +** Buffer Menu + +*** `M-s a C-o' shows lines matching a regexp in marked buffers using Occur. + ** Calendar and Diary +++ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1b73026f1e..8a54c5ac370 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-07-03 Juri Linkov + + * buff-menu.el (Buffer-menu-multi-occur): Add args and move the + call of `occur-read-primary-args' to interactive spec. + + * ibuffer.el (ibuffer-mode-map): Bind "M-s a C-o" to + `ibuffer-do-occur' like in buff-menu.el. (Bug#14673) + 2013-07-03 Matthias Meulien * buff-menu.el (Buffer-menu-mode-map): Bind "M-s a C-o" to diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 1eda9f19625..1db9b7229f3 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -482,11 +482,10 @@ If UNMARK is non-nil, unmark them." (interactive) (multi-isearch-buffers-regexp (Buffer-menu-marked-buffers))) -(defun Buffer-menu-multi-occur () +(defun Buffer-menu-multi-occur (regexp &optional nlines) "Show all lines in marked buffers containing a match for a regexp." - (interactive) - (let ((regexp (occur-read-primary-args))) - (multi-occur (Buffer-menu-marked-buffers) (car regexp)))) + (interactive (occur-read-primary-args)) + (multi-occur (Buffer-menu-marked-buffers) regexp nlines)) (defun Buffer-menu-visit-tags-table () diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 8f7d584d00b..a4f18201a3f 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -462,6 +462,7 @@ directory, like `default-directory'." (define-key map (kbd "M-g") 'ibuffer-jump-to-buffer) (define-key map (kbd "M-s a C-s") 'ibuffer-do-isearch) (define-key map (kbd "M-s a M-C-s") 'ibuffer-do-isearch-regexp) + (define-key map (kbd "M-s a C-o") 'ibuffer-do-occur) (define-key map (kbd "DEL") 'ibuffer-unmark-backward) (define-key map (kbd "M-DEL") 'ibuffer-unmark-all) (define-key map (kbd "* *") 'ibuffer-unmark-all) -- 2.11.4.GIT