1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00

(ibuffer-last-sorting-mode): New variable.

(ibuffer-do-sort-by-recency): Reverse sorting order if last sorting
mode was recency.
This commit is contained in:
John Paul Wallington 2008-05-01 01:17:35 +00:00
parent 7041a99a5e
commit e782065477

View File

@ -214,6 +214,7 @@ view of the buffers."
(const :tag "Major mode" :value major-mode))
:group 'ibuffer)
(defvar ibuffer-sorting-mode nil)
(defvar ibuffer-last-sorting-mode nil)
(defcustom ibuffer-default-sorting-reversep nil
"If non-nil, reverse the default sorting order."
@ -1997,7 +1998,10 @@ the value of point at the beginning of the line for that buffer."
"Sort the buffers by last view time."
(interactive)
(setq ibuffer-sorting-mode 'recency)
(ibuffer-update nil t))
(when (eq ibuffer-last-sorting-mode 'recency)
(setq ibuffer-sorting-reversep (not ibuffer-sorting-reversep)))
(ibuffer-update nil t)
(setq ibuffer-last-sorting-mode 'recency))
(defun ibuffer-update-format ()
(when (null ibuffer-current-format)