emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] 216/255: small list buffer tweaks


From: Eric Schulte
Subject: [elpa] 216/255: small list buffer tweaks
Date: Sun, 16 Mar 2014 01:02:51 +0000

eschulte pushed a commit to branch go
in repository elpa.

commit 27204127de6274884f53cca2a2a2efd9423dbe43
Author: Eric Schulte <address@hidden>
Date:   Tue Aug 6 13:03:08 2013 -0600

    small list buffer tweaks
---
 list-buffer.el |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/list-buffer.el b/list-buffer.el
index 4ef4340..7f9e762 100644
--- a/list-buffer.el
+++ b/list-buffer.el
@@ -72,12 +72,15 @@
            (concat " " (list-format-row widths *buffer-headers*))))
     ;; write rows
     (delete-region (point-min) (point-max))
-    (insert (mapconcat (curry #'list-format-row widths) strings "\n"))))
+    (insert (mapconcat (curry #'list-format-row widths) strings "\n")))
+  (goto-char (point-min)))
 
-(defun list-buffer-sort (key predicate)
-  (set *buffer-list* (cl-sort *buffer-list* predicate :key key)))
+(defun list-buffer-sort (col predicate)
+  (set *buffer-list* (cl-sort *buffer-list* predicate :key (curry #'nth col)))
+  (list-buffer-refresh))
 
-(defun list-buffer-filter (key filter)
-  (set *buffer-list* (cl-remove-if-not *buffer-list* filter :key key)))
+(defun list-buffer-filter (col filter)
+  (set *buffer-list* (cl-remove-if-not *buffer-list* filter :key (curry #'nth 
col)))
+  (list-buffer-refresh))
 
 (provide 'list-buffer)



reply via email to

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