]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Remove notmuch-hello-roundup function
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Fri, 30 Apr 2010 10:33:57 +0000 (12:33 +0200)
committerCarl Worth <cworth@cworth.org>
Fri, 4 Jun 2010 01:17:03 +0000 (18:17 -0700)
as it does the same as (ceiling number divisor) which is already provided in elisp.

emacs/notmuch-hello.el

index 79e3d5ffb95302e980b67c56640725f13b90e301..5072669b3d0f0f6b6bfc5670fd3489c0723cff6a 100644 (file)
@@ -139,11 +139,6 @@ So:
            maximize (length (car elem)))
       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)
   (let ((len (length list)))
     (loop for col from 0 to (- ncols 1)
@@ -159,7 +154,7 @@ So:
   "Reflect a `ncols' wide matrix represented by `list' along the
 diagonal."
   ;; 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)
          append (notmuch-hello-reflect-generate-row ncols nrows row list))))