]> git.eshelyaron.com Git - emacs.git/commitdiff
(ibuffer-toggle-sorting-mode): Remove `find-if' so we don't require
authorColin Walters <walters@gnu.org>
Mon, 18 Mar 2002 21:21:31 +0000 (21:21 +0000)
committerColin Walters <walters@gnu.org>
Mon, 18 Mar 2002 21:21:31 +0000 (21:21 +0000)
`cl' at runtime.
(sorting mode mode-name): Don't take the symbol-name of a string.

lisp/ibuf-ext.el

index 1c3f6c749306808c19e06a8e6bc18ac1192a7e11..58240deb162b955395fc9077a94f3d4ad4f80e49 100644 (file)
@@ -669,8 +669,7 @@ Default sorting modes are:
   (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."
 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.