]> code.delx.au - gnu-emacs/blobdiff - lisp/ibuf-macs.el
(url-http-mark-connection-as-free, url-http-find-free-connection):
[gnu-emacs] / lisp / ibuf-macs.el
index effcafd92405d327b5ff27cbc297ba44208cddbb..009935e153949bcb9744978ac704f442667d8734 100644 (file)
@@ -1,6 +1,7 @@
 ;;; ibuf-macs.el --- macros for ibuffer
 
-;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Colin Walters <walters@verbum.org>
 ;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -21,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program ; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -74,8 +75,8 @@ During evaluation of body, bind `it' to the value returned by TEST."
 ;; (put 'ibuffer-save-marks 'lisp-indent-function 0)
 
 ;;;###autoload
-(defmacro* define-ibuffer-column (symbol (&key name inline props
-                                              summarizer) &rest body)
+(defmacro* define-ibuffer-column (symbol (&key name inline props summarizer 
+                                              header-mouse-map) &rest body)
   "Define a column SYMBOL for use with `ibuffer-formats'.
 
 BODY will be called with `buffer' bound to the buffer object, and
@@ -89,6 +90,9 @@ the text, such as `mouse-face'.  And SUMMARIZER, if given, is a
 function which will be passed a list of all the strings in its column;
 it should return a string to display at the bottom.
 
+If HEADER-MOUSE-MAP is given, it will be used as a keymap for the
+title of the column.
+
 Note that this macro expands into a `defun' for a function named
 ibuffer-make-column-NAME.  If INLINE is non-nil, then the form will be
 inlined into the compiled format versions.  This means that if you
@@ -114,6 +118,7 @@ change its definition, you should explicitly call
            ,(if (stringp name)
                 name
               (capitalize (symbol-name symbol))))
+       ,(if header-mouse-map `(put (quote ,sym) 'header-mouse-map ,header-mouse-map))
        ,(if summarizer
            ;; Store the name of the summarizing function.
            `(put (quote ,sym) 'ibuffer-column-summarizer
@@ -280,7 +285,7 @@ bound to the current value of the filter.
         ,(concat (or documentation "This filter is not documented."))
         (interactive (list ,reader))
         (ibuffer-push-filter (cons ',name qualifier))
-        (message
+        (message "%s"
          (format ,(concat (format "Filter by %s added: " description)
                           " %s")
                  qualifier))