[PATCH] fix compilation on emacs23
authorMark Walters <markwalters1009@gmail.com>
Sat, 24 Oct 2015 19:49:26 +0000 (20:49 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:55 +0000 (14:49 -0700)
a6/56691424adbdde20b4bd9a476882b6ed622854 [new file with mode: 0644]

diff --git a/a6/56691424adbdde20b4bd9a476882b6ed622854 b/a6/56691424adbdde20b4bd9a476882b6ed622854
new file mode 100644 (file)
index 0000000..e10959e
--- /dev/null
@@ -0,0 +1,116 @@
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 1330C6DE1766\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Oct 2015 12:49:39 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.072\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.072 tagged_above=-999 required=5 tests=[AWL=0.498,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id JyeXmawf-4sV for <notmuch@notmuchmail.org>;\r
+ Sat, 24 Oct 2015 12:49:36 -0700 (PDT)\r
+Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
+ [209.85.212.179])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id C9C326DE1764\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Oct 2015 12:49:35 -0700 (PDT)\r
+Received: by wicll6 with SMTP id ll6so68595672wic.0\r
+ for <notmuch@notmuchmail.org>; Sat, 24 Oct 2015 12:49:34 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=zfVlfbVZZafQuhJulAKYhVGVZZYmlLQ7w6wlHt7E0uU=;\r
+ b=M5v5tQN6gNslUM1QrBnRV1dn0YTJ7//VNptLxEYn0V4wmxOW/0i+Qt6Xs5Nb/sLOsS\r
+ vXNKTi85nNJsw6WKtLuARLDWnlcPdvKlVntggbFvdRBZ5OPI3/fA+powKPKOtrlspP5Z\r
+ CCL9OubUlgZttoVpLiEYoQeCqdkJpuxnNm9TuVHcQRSvpDQUTfNyNJF/TWB97NlfoGQq\r
+ Lt3CcKp873/5pkvaX3x89pEdVM3fvMJATjFvSWSvyR3t24mQ/7tHVSCOrQY0cz+ZSPPo\r
+ yJDmppk+F35J0i8BHkNeWxzP2De4fgxDEUBHh60CztQ/9rDsPf4Bb2nfYl2pOwVTP1qI\r
+ oruw==\r
+X-Received: by 10.194.71.84 with SMTP id s20mr11738148wju.89.1445716173724;\r
+ Sat, 24 Oct 2015 12:49:33 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by smtp.gmail.com with ESMTPSA id w9sm8235373wjf.20.2015.10.24.12.49.32\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 24 Oct 2015 12:49:32 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] fix compilation on emacs23\r
+Date: Sat, 24 Oct 2015 20:49:26 +0100\r
+Message-Id: <1445716166-26030-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1445708484-32189-4-git-send-email-david@tethera.net>\r
+References: <1445708484-32189-4-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 24 Oct 2015 19:49:39 -0000\r
+\r
+The series so far does not compile on emacs23. The two problems are\r
+that cl-lib doesn't exist and that defvar-local is not defined. The\r
+latter can trivially be replaced by defvar followed by\r
+make-variable-buffer-local.\r
+\r
+For the former just require 'cl as we do elsewhere, and change the one\r
+call to a cl function, namely to cl-case to case.\r
+---\r
+Lightly tested and seems to compile and work on emacs 23 and emacs 24.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+emacs/notmuch-company.el | 8 ++++----\r
+ 1 file changed, 4 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el\r
+index 03c492f..a9e769c 100644\r
+--- a/emacs/notmuch-company.el\r
++++ b/emacs/notmuch-company.el\r
+@@ -1,6 +1,5 @@\r
+ ;; notmuch-company.el --- Mail address completion for notmuch via company-mode  -*- lexical-binding: t -*-\r
\r
+-\r
+ ;; Authors: Trevor Jim <tjim@mac.com>\r
+ ;;        Michal Sojka <sojkam1@fel.cvut.cz>\r
+ ;;\r
+@@ -30,9 +29,10 @@\r
+ ;;; Code:\r
\r
+ (require 'notmuch-address)\r
+-(require 'cl-lib)\r
++(eval-when-compile (require 'cl))\r
\r
+-(defvar-local notmuch-company-last-prefix nil)\r
++(defvar notmuch-company-last-prefix nil)\r
++(make-variable-buffer-local 'notmuch-company-last-prefix)\r
+ (declare-function company-begin-backend "company")\r
+ (declare-function company-grab "company")\r
\r
+@@ -43,7 +43,7 @@ (defun notmuch-company (command &optional arg &rest _ignore)\r
+   (require 'company)\r
+   (let ((case-fold-search t)\r
+       (completion-ignore-case t))\r
+-    (cl-case command\r
++    (case command\r
+       (interactive (company-begin-backend 'notmuch-company))\r
+       (prefix (and (derived-mode-p 'message-mode)\r
+                  (looking-back "^\\(To\\|Cc\\|Bcc\\):.*"\r
+-- \r
+2.1.4\r
+\r