[PATCH] emacs: Fix byte compile warning on Emacs < 24
authorAustin Clements <amdragon@MIT.EDU>
Fri, 8 Aug 2014 15:11:20 +0000 (11:11 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:04:09 +0000 (10:04 -0800)
fb/807bf64f9b390b2cc939a3f95fe88730050868 [new file with mode: 0644]

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