Anonymous avatar Anonymous committed 49e5483

* ibuffer.el (ibuffer-set-mark): Go to the beginning of the
line after setting the mark.
* ibuf-ext.el (ibuffer-toggle-sorting-mode): Don't use find-if.
From Colin Walters <walters@verbum.org>;

Comments (0)

Files changed (3)

+2002-03-19  John Paul Wallington  <jpw@xemacs.org>
+
+	* ibuffer.el (ibuffer-set-mark): Go to the beginning of the
+	line after setting the mark.
+	* ibuf-ext.el (ibuffer-toggle-sorting-mode): Don't use find-if.
+	From Colin Walters  <walters@verbum.org>
+
 2002-03-05  John Paul Wallington  <jpw@xemacs.org>
 
 	* ibuffer.el (ibuffer-shrink-to-fit): Use window-displayed-height
 		     ibuffer-toggle-sorting-modes
 		   '(alphabetic major-mode mode-name buffer-size)))))
     (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 (%s)" 
   (let ((inhibit-read-only t))
     (ibuffer-set-mark-1 mark)
     (setq ibuffer-did-modification t)
-    (ibuffer-redisplay-current)))
+    (ibuffer-redisplay-current)
+    (beginning-of-line)))
 
 (defun ibuffer-set-mark-1 (mark)
   (let ((beg (ibuffer-line-beginning-position))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.