emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ibuf-ext.el


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/ibuf-ext.el
Date: Sun, 17 Feb 2002 03:57:24 -0500

Index: emacs/lisp/ibuf-ext.el
diff -c emacs/lisp/ibuf-ext.el:1.5 emacs/lisp/ibuf-ext.el:1.6
*** emacs/lisp/ibuf-ext.el:1.5  Sun Feb  3 22:57:19 2002
--- emacs/lisp/ibuf-ext.el      Sun Feb 17 03:57:24 2002
***************
*** 654,676 ****
  ;;;###autoload
  (defun ibuffer-toggle-sorting-mode ()
    "Toggle the current sorting mode.
! Possible sorting modes are:
   Recency - the last time the buffer was viewed
   Name - the name of the buffer
   Major Mode - the name of the major mode of the buffer
   Size - the size of the buffer"
    (interactive)
!   (let* ((keys (mapcar #'car ibuffer-sorting-functions-alist))
!        (entry (memq ibuffer-sorting-mode keys))
!        (next (or (cadr entry) (car keys)))
!        (nextentry (assq next ibuffer-sorting-functions-alist)))
!     (if (and entry nextentry)
!       (progn
!         (setq ibuffer-sorting-mode next)
!         (message "Sorting by %s" (cadr nextentry)))
!       (progn
!       (setq ibuffer-sorting-mode 'recency)
!       (message "Sorting by last view time"))))
    (ibuffer-redisplay t))
  
  ;;;###autoload
--- 654,673 ----
  ;;;###autoload
  (defun ibuffer-toggle-sorting-mode ()
    "Toggle the current sorting mode.
! Default sorting modes are:
   Recency - the last time the buffer was viewed
   Name - the name of the buffer
   Major Mode - the name of the major mode of the buffer
   Size - the size of the buffer"
    (interactive)
!   (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)
!                     (car modes))))
!       (setq ibuffer-sorting-mode next)
!       (message "Sorting by %s" next)))
    (ibuffer-redisplay t))
  
  ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]