changeset 44020:784c6f7e7ed3

(ibuffer-toggle-sorting-mode): Remove `find-if' so we don't require `cl' at runtime. (sorting mode mode-name): Don't take the symbol-name of a string.
author Colin Walters <walters@gnu.org>
date Mon, 18 Mar 2002 21:21:31 +0000
parents 06140deb145b
children b2462b8e1cf2
files lisp/ibuf-ext.el
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ibuf-ext.el	Mon Mar 18 21:21:13 2002 +0000
+++ b/lisp/ibuf-ext.el	Mon Mar 18 21:21:31 2002 +0000
@@ -669,8 +669,7 @@
   (let ((modes (mapcar 'car ibuffer-sorting-functions-alist)))
     (add-to-list 'modes 'recency)
     (setq modes (sort modes 'string-lessp))
-    (let ((next (or (find-if 
-                     (lambda (x) (string-lessp ibuffer-sorting-mode x)) modes)
+    (let ((next (or (car-safe (cdr-safe (memq ibuffer-sorting-mode modes)))
                     (car modes))))
       (setq ibuffer-sorting-mode next)
       (message "Sorting by %s" next)))
@@ -705,13 +704,13 @@
 Ordering is lexicographic."
   (:description "mode name")
   (string-lessp (downcase
-		 (symbol-name (with-current-buffer
-				  (car a)
-				mode-name)))
+		  (with-current-buffer
+		      (car a)
+		    mode-name))
 		(downcase
-		 (symbol-name (with-current-buffer
-				  (car b)
-				mode-name)))))
+		 (with-current-buffer
+		     (car b)
+		   mode-name))))
 
 (define-ibuffer-sorter alphabetic
   "Sort the buffers by their names.