From: Austin Clements Date: Fri, 8 Aug 2014 15:11:20 +0000 (+2000) Subject: [PATCH] emacs: Fix byte compile warning on Emacs < 24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e5acc5b20bc2c51956f2fa1dca711ee949e0785f;p=notmuch-archives.git [PATCH] emacs: Fix byte compile warning on Emacs < 24 --- diff --git a/fb/807bf64f9b390b2cc939a3f95fe88730050868 b/fb/807bf64f9b390b2cc939a3f95fe88730050868 new file mode 100644 index 000000000..2e128fa04 --- /dev/null +++ b/fb/807bf64f9b390b2cc939a3f95fe88730050868 @@ -0,0 +1,108 @@ +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 44A40431FBD + for ; Fri, 8 Aug 2014 08:11:32 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled +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 QoA+zdsNukWi for ; + Fri, 8 Aug 2014 08:11:28 -0700 (PDT) +Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu + [18.7.68.34]) + by olra.theworths.org (Postfix) with ESMTP id 90904431FAE + for ; Fri, 8 Aug 2014 08:11:28 -0700 (PDT) +X-AuditID: 12074422-f79be6d000007518-13-53e4e89f04d4 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP + id 37.FE.29976.0A8E4E35; Fri, 8 Aug 2014 11:11:28 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s78FBQr0024751; + Fri, 8 Aug 2014 11:11:26 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s78FBN6t008387 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Fri, 8 Aug 2014 11:11:25 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1XFlpD-0004a6-Nk; Fri, 08 Aug 2014 11:11:23 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: Fix byte compile warning on Emacs < 24 +Date: Fri, 8 Aug 2014 11:11:20 -0400 +Message-Id: <1407510680-17576-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 2.0.0 +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsUixG6norvgxZNgg//3WCyapjtbXL85k9mB + yePW/dfsHs9W3WIOYIrisklJzcksSy3St0vgyvj+/CRbQQtnxa6W3SwNjOvYuxg5OSQETCSW + HD3OBGGLSVy4t56ti5GLQ0hgNpPEtK2HmCCcDYwSh5ZNZoZwbjNJNG97zwrhzGWUuDnrCCNI + P5uAhsS2/cvBbBEBaYmdd2cDFXFwMAuYS9xsiQMJCwvYSbyZuQFsHYuAqsSeRX0sIDavgIPE + s1X9bBBnyEk03PjENoGRdwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdU73czBK91JTSTYzg + wHBR2sH486DSIUYBDkYlHl6B7sfBQqyJZcWVuYcYJTmYlER5cw4+CRbiS8pPqcxILM6ILyrN + SS0+xCjBwawkwvvkEVCONyWxsiq1KB8mJc3BoiTO+9baKlhIID2xJDU7NbUgtQgmK8PBoSTB + m/IcqFGwKDU9tSItM6cEIc3EwQkynAdoeDFIDW9xQWJucWY6RP4Uo6KUOK/5M6CEAEgiozQP + rhcWua8YxYFeEeadBtLOA4x6uO5XQIOZgAbLqj4GGVySiJCSamDMOKu5646pRKN1+ctn100X + v6zL5V29o9a6YX3We5/H091ffmWZf+vkjakzy1tu5fUxG074JfpLrlmS71bi+/qUg4//8Yl9 + OXdjvoD/7w0Jrz8vibne/zD9ZOc1OZWc1I0134pfCilNWb1oE8/3De9Pau2Y80ri96yVHmmH + nBpnOU/o6njw/tMrPyWW4oxEQy3mouJEAKMC4n63AgAA +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, 08 Aug 2014 15:11:32 -0000 + +Fix "Warning: the function `window-body-width' is not known to be +defined." by moving our compatibility wrapper before its use. +--- + emacs/notmuch-jump.el | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el +index 05bbce5..35082a6 100644 +--- a/emacs/notmuch-jump.el ++++ b/emacs/notmuch-jump.el +@@ -25,6 +25,12 @@ + (require 'notmuch-lib) + (require 'notmuch-hello) + ++(unless (fboundp 'window-body-width) ++ ;; Compatibility for Emacs pre-24 ++ (defun window-body-width (&optional window) ++ (let ((edges (window-inside-edges window))) ++ (- (caddr edges) (car edges))))) ++ + ;;;###autoload + (defun notmuch-jump-search () + "Jump to a saved search by shortcut key. +@@ -165,9 +171,3 @@ (defun notmuch-jump--make-keymap (action-map) + (setq notmuch-jump--action ',(third action)) + (exit-minibuffer)))) + map)) +- +-(unless (fboundp 'window-body-width) +- ;; Compatibility for Emacs pre-24 +- (defun window-body-width (&optional window) +- (let ((edges (window-inside-edges window))) +- (- (caddr edges) (car edges))))) +-- +2.0.0 +