;;; ibuf-macs.el --- macros for ibuffer
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
-;; published by the Free Software Foundation; either version 2, or (at
+;; published by the Free Software Foundation; either version 3, or (at
;; your option) any later version.
;; This program is distributed in the hope that it will be useful, but
;; (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
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
,(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