aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Paul Wallington2008-05-01 01:19:26 +0000
committerJohn Paul Wallington2008-05-01 01:19:26 +0000
commite3b714390480e3082a6fab0ea636cb1d8a6c93e5 (patch)
treeea19022cca67f5f9ce6d232d798d2ea9a24549fb
parente782065477917c10759d618e43b2ec18330ffae3 (diff)
downloademacs-e3b714390480e3082a6fab0ea636cb1d8a6c93e5.tar.gz
emacs-e3b714390480e3082a6fab0ea636cb1d8a6c93e5.zip
(define-ibuffer-sorter): Define the sorter to reverse sorting order if
last sorting mode was the sorter's.
-rw-r--r--lisp/ibuf-macs.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index d3a4da54e50..947c2b7040a 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -150,7 +150,10 @@ value if and only if `a' is \"less than\" `b'.
150 ,(or documentation "No :documentation specified for this sorting method.") 150 ,(or documentation "No :documentation specified for this sorting method.")
151 (interactive) 151 (interactive)
152 (setq ibuffer-sorting-mode ',name) 152 (setq ibuffer-sorting-mode ',name)
153 (ibuffer-redisplay t)) 153 (when (eq ibuffer-sorting-mode ibuffer-last-sorting-mode)
154 (setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep)))
155 (ibuffer-redisplay t)
156 (setq ibuffer-last-sorting-mode ',name))
154 (push (list ',name ,description 157 (push (list ',name ,description
155 #'(lambda (a b) 158 #'(lambda (a b)
156 ,@body)) 159 ,@body))