(let ((type (assq (car qualifier) ibuffer-filtering-alist)))
(unless qualifier
(error "Ibuffer: Bad qualifier %s" qualifier))
- (concat " [" (cadr type) ": " (format "%s]" (cdr qualifier)))))))
+ (if (cdr qualifier)
+ (format " [%s: %s]" (cadr type) (cdr qualifier))
+ (format " [%s]" (cadr type)))))))
(defun ibuffer-list-buffer-modes (&optional include-parents)
"Create a completion table of buffer modes currently in use.
(when (cdr qualifier) ; Compose individual filters with `or'.
(setq ,filter `(or ,@(mapcar (lambda (m) (cons ',name m)) qualifier))))))
(if (null (ibuffer-push-filter ,filter))
- (message ,(format "Filter by %s already applied: %%s" description)
- ,qualifier-str)
- (message ,(format "Filter by %s added: %%s" description)
- ,qualifier-str)
+ (if ,qualifier-str
+ (message ,(format "Filter by %s already applied: %%s"
+ description)
+ ,qualifier-str)
+ (message ,(format "Filter by %s already applied" description)))
+ (if ,qualifier-str
+ (message ,(format "Filter by %s added: %%s" description)
+ ,qualifier-str)
+ (message ,(format "Filter by %s added" description)))
(ibuffer-update nil t))))
(push (list ',name ,description
(lambda (buf qualifier)