From: Colin Walters Date: Mon, 29 Apr 2002 23:12:29 +0000 (+0000) Subject: (ibuffer-kill-filter-group): Call `delete' function. X-Git-Tag: ttn-vms-21-2-B4~15293 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b6cee49460597a2e510e6a1911f59e14dcdb4645;p=emacs.git (ibuffer-kill-filter-group): Call `delete' function. (ibuffer-kill-line): Copy the filter group data structure when killing. (ibuffer-yank): Handle case where we're yanking on the default group correctly. (ibuffer-delete-saved-filter-groups): Doc fix. --- diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 64ae878ca13..c164a752b2b 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -610,7 +610,7 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." (setq ibuffer-filter-groups (ibuffer-delete-alist name ibuffer-filter-groups)) (setq ibuffer-hidden-filter-groups - delete name ibuffer-hidden-filter-groups)) + (delete name ibuffer-hidden-filter-groups))) (error "No filter group with name \"%s\"" name)) (ibuffer-update nil t)) @@ -623,7 +623,8 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." (progn (when (equal it "Default") (error "Can't kill default filtering group")) - (push (assoc it ibuffer-filter-groups) ibuffer-filter-group-kill-ring) + (push (copy-tree (assoc it ibuffer-filter-groups)) + ibuffer-filter-group-kill-ring) (ibuffer-kill-filter-group it)) (funcall (if (interactive-p) #'call-interactively #'funcall) #'kill-line arg))) @@ -641,10 +642,10 @@ To evaluate a form without viewing the buffer, see `ibuffer-do-eval'." (get-text-property (point) 'ibuffer-filter-group) (last all-groups))) (pos (or (position cur (mapcar #'car all-groups) :test #'equal) - (1- (length all-groups))))) + (length all-groups)))) (cond ((= pos 0) (push last-killed ibuffer-filter-groups)) - ((= pos (1- (length all-groups))) + ((= pos (length all-groups)) (setq ibuffer-filter-groups (nconc ibuffer-filter-groups (list last-killed)))) (t @@ -677,8 +678,8 @@ They are removed from `ibuffer-saved-filter-groups'." (interactive (list (if (null ibuffer-saved-filter-groups) - (error "No saved filters") - (completing-read "Delete saved filters: " + (error "No saved filter groups") + (completing-read "Delete saved filter group: " ibuffer-saved-filter-groups nil t)))) (setq ibuffer-saved-filter-groups (ibuffer-delete-alist name ibuffer-saved-filter-groups))