Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6BAD94196F0 for ; Fri, 30 Apr 2010 03:34:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oy4Uo4GZPZXb for ; Fri, 30 Apr 2010 03:34:02 -0700 (PDT) Received: from homiemail-a15.g.dreamhost.com (caiajhbdcagg.dreamhost.com [208.97.132.66]) by olra.theworths.org (Postfix) with ESMTP id 5901A431FC1 for ; Fri, 30 Apr 2010 03:34:02 -0700 (PDT) Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch [129.132.133.204]) (Authenticated sender: sebastian@sspaeth.de) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id DAA3076C014; Fri, 30 Apr 2010 03:34:00 -0700 (PDT) From: Sebastian Spaeth To: Notmuch developer list Subject: [PATCH] emacs: Remove notmuch-hello-roundup function Date: Fri, 30 Apr 2010 12:33:57 +0200 Message-Id: <1272623637-23951-1-git-send-email-Sebastian@SSpaeth.de> X-Mailer: git-send-email 1.7.0.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2010 10:34:04 -0000 as it does the same as (ceiling number divisor) which is already provided in elisp. --- dme, am I right that this patch is really correct? emacs/notmuch-hello.el | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 1358387..8fabbf4 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -113,11 +113,6 @@ 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) @@ -133,7 +128,7 @@ "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)))) -- 1.7.0.4