mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
emacs: Remove notmuch-hello-roundup function
as it does the same as (ceiling number divisor) which is already provided in elisp.
This commit is contained in:
parent
a54cecfc8e
commit
5bc4ff4e1d
1 changed files with 1 additions and 6 deletions
|
@ -139,11 +139,6 @@ So:
|
||||||
maximize (length (car elem)))
|
maximize (length (car elem)))
|
||||||
0))
|
0))
|
||||||
|
|
||||||
(defun notmuch-hello-roundup (dividend divisor)
|
|
||||||
"Return the rounded up value of dividing `dividend' by `divisor'."
|
|
||||||
(+ (/ dividend divisor)
|
|
||||||
(if (> (% dividend divisor) 0) 1 0)))
|
|
||||||
|
|
||||||
(defun notmuch-hello-reflect-generate-row (ncols nrows row list)
|
(defun notmuch-hello-reflect-generate-row (ncols nrows row list)
|
||||||
(let ((len (length list)))
|
(let ((len (length list)))
|
||||||
(loop for col from 0 to (- ncols 1)
|
(loop for col from 0 to (- ncols 1)
|
||||||
|
@ -159,7 +154,7 @@ So:
|
||||||
"Reflect a `ncols' wide matrix represented by `list' along the
|
"Reflect a `ncols' wide matrix represented by `list' along the
|
||||||
diagonal."
|
diagonal."
|
||||||
;; Not very lispy...
|
;; Not very lispy...
|
||||||
(let ((nrows (notmuch-hello-roundup (length list) ncols)))
|
(let ((nrows (ceiling (length list) ncols)))
|
||||||
(loop for row from 0 to (- nrows 1)
|
(loop for row from 0 to (- nrows 1)
|
||||||
append (notmuch-hello-reflect-generate-row ncols nrows row list))))
|
append (notmuch-hello-reflect-generate-row ncols nrows row list))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue