1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00

(define-ibuffer-sorter): Define the sorter to reverse sorting order if

last sorting mode was the sorter's.
This commit is contained in:
John Paul Wallington 2008-05-01 01:19:26 +00:00
parent e782065477
commit e3b7143904

View File

@ -150,7 +150,10 @@ value if and only if `a' is \"less than\" `b'.
,(or documentation "No :documentation specified for this sorting method.")
(interactive)
(setq ibuffer-sorting-mode ',name)
(ibuffer-redisplay t))
(when (eq ibuffer-sorting-mode ibuffer-last-sorting-mode)
(setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep)))
(ibuffer-redisplay t)
(setq ibuffer-last-sorting-mode ',name))
(push (list ',name ,description
#'(lambda (a b)
,@body))