changeset 43567:26cb2bd7070b

(sorter mode-name): New. (ibuffer-do-occur): Don't quote ibuffer-marked-char.
author Colin Walters <walters@gnu.org>
date Tue, 26 Feb 2002 19:53:56 +0000
parents 504d4997ab7a
children d71670d5afa3
files lisp/ibuf-ext.el
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-ext.el	Tue Feb 26 19:53:41 2002 +0000
+++ b/lisp/ibuf-ext.el	Tue Feb 26 19:53:56 2002 +0000
@@ -697,6 +697,19 @@
 				  (car b)
 				major-mode)))))
 
+(define-ibuffer-sorter mode-name
+  "Sort the buffers by their mode name.
+Ordering is lexicographic."
+  (:description "mode name")
+  (string-lessp (downcase
+		 (symbol-name (with-current-buffer
+				  (car a)
+				mode-name)))
+		(downcase
+		 (symbol-name (with-current-buffer
+				  (car b)
+				mode-name)))))
+
 (define-ibuffer-sorter alphabetic
   "Sort the buffers by their names.
 Ordering is lexicographic."
@@ -1139,7 +1152,7 @@
 	  (< nlines 0))
       (setq nlines 1))
   (when (zerop (ibuffer-count-marked-lines))
-    (ibuffer-set-mark 'ibuffer-marked-char))
+    (ibuffer-set-mark ibuffer-marked-char))
   (let ((ibuffer-do-occur-bufs nil))
     ;; Accumulate a list of marked buffers
     (ibuffer-map-marked-lines