changeset 44995:f365c85cce40

(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.
author Colin Walters <walters@gnu.org>
date Mon, 29 Apr 2002 23:12:29 +0000
parents 27ae12d5d8e5
children dbde822f9021
files lisp/ibuf-ext.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-ext.el	Mon Apr 29 23:03:27 2002 +0000
+++ b/lisp/ibuf-ext.el	Mon Apr 29 23:12:29 2002 +0000
@@ -610,7 +610,7 @@
 	(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 @@
       (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 @@
 		    (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 @@
   (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))