+2011-08-14 Chong Yidong <cyd@stupidchicken.com>
+
+ * ibuf-ext.el (ibuffer-filter-disable): New arg for deleting
+ filter groups.
+ (ibuffer-included-in-filter-p-1): Use it. Suggested by Noam
+ Postavsky (Bug#8804).
+
2011-08-12 Juanma Barranquero <lekktu@gmail.com>
* startup.el (argi): Declare as global variable (bug#9275).
(assoc (cdr filter)
ibuffer-saved-filters)))
(unless data
- (ibuffer-filter-disable)
+ (ibuffer-filter-disable t)
(error "Unknown saved filter %s" (cdr filter)))
(ibuffer-included-in-filters-p buf (cadr data))))
(t
;; filterdat should be like (TYPE DESCRIPTION FUNC)
;; just a sanity check
(unless filterdat
- (ibuffer-filter-disable)
+ (ibuffer-filter-disable t)
(error "Undefined filter %s" (car filter)))
(not
(not
(ibuffer-update nil t))
;;;###autoload
-(defun ibuffer-filter-disable ()
- "Disable all filters currently in effect in this buffer."
+(defun ibuffer-filter-disable (&optional delete-filter-groups)
+ "Disable all filters currently in effect in this buffer.
+With optional arg DELETE-FILTER-GROUPS non-nil, delete all filter
+group definitions by setting `ibuffer-filter-groups' to nil."
(interactive)
- (setq ibuffer-filtering-qualifiers nil
- ibuffer-filter-groups nil)
+ (setq ibuffer-filtering-qualifiers nil)
+ (if delete-filter-groups
+ (setq ibuffer-filter-groups nil))
(let ((buf (ibuffer-current-buffer)))
(ibuffer-update nil t)
(when buf