;;; ibuf-macs.el --- macros for ibuffer
-;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2014 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
;; From Paul Graham's "ANSI Common Lisp", adapted for Emacs Lisp here.
(defmacro ibuffer-aif (test true-body &rest false-body)
(ibuffer-redisplay t))))))
;;;###autoload
-(defmacro* define-ibuffer-column (symbol (&key name inline props summarizer
+(cl-defmacro define-ibuffer-column (symbol (&key name inline props summarizer
header-mouse-map) &rest body)
"Define a column SYMBOL for use with `ibuffer-formats'.
:autoload-end)))
;;;###autoload
-(defmacro* define-ibuffer-sorter (name documentation
+(cl-defmacro define-ibuffer-sorter (name documentation
(&key
description)
&rest body)
:autoload-end))
;;;###autoload
-(defmacro* define-ibuffer-op (op args
+(cl-defmacro define-ibuffer-op (op args
documentation
(&key
interactive
,(if (not (null interactive))
`(interactive ,interactive)
'(interactive))
- (assert (derived-mode-p 'ibuffer-mode))
+ (cl-assert (derived-mode-p 'ibuffer-mode))
(setq ibuffer-did-modification nil)
- (let ((marked-names (,(case mark
+ (let ((marked-names (,(pcase mark
(:deletion
'ibuffer-deletion-marked-buffer-names)
- (t
+ (_
'ibuffer-marked-buffer-names)))))
(when (null marked-names)
(setq marked-names (list (buffer-name (ibuffer-current-buffer))))
- (ibuffer-set-mark ,(case mark
+ (ibuffer-set-mark ,(pcase mark
(:deletion
'ibuffer-deletion-char)
- (t
+ (_
'ibuffer-marked-char))))
,(let* ((finish (append
'(progn)
,@body))
t)))
(body `(let ((count
- (,(case mark
+ (,(pcase mark
(:deletion
'ibuffer-map-deletion-lines)
- (t
+ (_
'ibuffer-map-marked-lines))
#'(lambda (buf mark)
,(if (eq modifier-p :maybe)
:autoload-end))
;;;###autoload
-(defmacro* define-ibuffer-filter (name documentation
+(cl-defmacro define-ibuffer-filter (name documentation
(&key
reader
description)