[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 210/255: using curry, rcurry and compose helpers
From: |
Eric Schulte |
Subject: |
[elpa] 210/255: using curry, rcurry and compose helpers |
Date: |
Sun, 16 Mar 2014 01:02:50 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit 02a6f5b78cc56d184b1709b8515adae198587025
Author: Eric Schulte <address@hidden>
Date: Tue Aug 6 12:14:03 2013 -0600
using curry, rcurry and compose helpers
---
list-buffer.el | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/list-buffer.el b/list-buffer.el
index 416fda5..e8d8cd6 100644
--- a/list-buffer.el
+++ b/list-buffer.el
@@ -27,6 +27,7 @@
;;; Code:
(eval-when-compile (require 'cl))
+(require 'go-util)
(defvar *buffer-list* nil
"List associated with the current list buffer.")
@@ -51,19 +52,16 @@
widths row)))
(defun list-buffer-refresh ()
- (let* ((strings (mapcar (lambda (row)
- (mapcar (lambda (cell) (format "%s" cell)) row))
- *buffer-list*))
- (lengths (mapcar (lambda (row) (mapcar #'length row)) strings))
- (widths (apply #'cl-mapcar #'max lengths)))
+ (let* ((strings (mapcar (curry #'mapcar (curry #'format "%s"))
*buffer-list*))
+ (lengths (mapcar (curry #'mapcar #'length) strings))
+ (widths (apply #'cl-mapcar (compose '1+ #'max) lengths)))
;; write headers
(when *buffer-headers*
(set (make-local-variable 'header-line-format)
(list-format-row widths *buffer-headers*)))
;; write rows
(delete (point-min) (point-max))
- (insert (mapconcat (lambda (row) (list-format-row widths row))
- strings "\n"))))
+ (insert (mapconcat (curry #'list-format-row widths) strings "\n"))))
(defun list-buffer-sort (key predicate)
(set *buffer-list* (cl-sort *buffer-list* predicate :key key)))
- [elpa] 217/255: sorting columns, (continued)
- [elpa] 217/255: sorting columns, Eric Schulte, 2014/03/15
- [elpa] 216/255: small list buffer tweaks, Eric Schulte, 2014/03/15
- [elpa] 238/255: wrap go-re-cond in save-match-data, Eric Schulte, 2014/03/15
- [elpa] 223/255: use igs-re-cond to handle prompts, Eric Schulte, 2014/03/15
- [elpa] 224/255: handle IGS shouts, Eric Schulte, 2014/03/15
- [elpa] 226/255: remove shouts from comments, Eric Schulte, 2014/03/15
- [elpa] 151/255: Revert "push all buffer-local variables into an igs object", Eric Schulte, 2014/03/15
- [elpa] 237/255: thoughts about browser-based implementation, Eric Schulte, 2014/03/15
- [elpa] 236/255: factor general comint utils out of igs.el, Eric Schulte, 2014/03/15
- [elpa] 192/255: two consecutive passes ends the game, Eric Schulte, 2014/03/15
- [elpa] 210/255: using curry, rcurry and compose helpers,
Eric Schulte <=
- [elpa] 203/255: adding GPL copyright file, Eric Schulte, 2014/03/15
- [elpa] 243/255: undo through gtp pipe, Eric Schulte, 2014/03/15
- [elpa] 246/255: customizable default gnugo options, Eric Schulte, 2014/03/15
- [elpa] 241/255: igs class definitions up front for better loading, Eric Schulte, 2014/03/15
- [elpa] 247/255: notes, Eric Schulte, 2014/03/15
- [elpa] 235/255: better line truncation, Eric Schulte, 2014/03/15
- [elpa] 250/255: mark dead stones at end of game, Eric Schulte, 2014/03/15
- [elpa] 229/255: igs TODO: consistent game un-observation, Eric Schulte, 2014/03/15
- [elpa] 242/255: need assoc for aget, Eric Schulte, 2014/03/15
- [elpa] 228/255: refresh the game list buffer, Eric Schulte, 2014/03/15