[PATCH] fix compilation on emacs23
Mark Walters
markwalters1009 at gmail.com
Sat Oct 24 12:49:26 PDT 2015
The series so far does not compile on emacs23. The two problems are
that cl-lib doesn't exist and that defvar-local is not defined. The
latter can trivially be replaced by defvar followed by
make-variable-buffer-local.
For the former just require 'cl as we do elsewhere, and change the one
call to a cl function, namely to cl-case to case.
---
Lightly tested and seems to compile and work on emacs 23 and emacs 24.
Best wishes
Mark
emacs/notmuch-company.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index 03c492f..a9e769c 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -1,6 +1,5 @@
;; notmuch-company.el --- Mail address completion for notmuch via company-mode -*- lexical-binding: t -*-
-
;; Authors: Trevor Jim <tjim at mac.com>
;; Michal Sojka <sojkam1 at fel.cvut.cz>
;;
@@ -30,9 +29,10 @@
;;; Code:
(require 'notmuch-address)
-(require 'cl-lib)
+(eval-when-compile (require 'cl))
-(defvar-local notmuch-company-last-prefix nil)
+(defvar notmuch-company-last-prefix nil)
+(make-variable-buffer-local 'notmuch-company-last-prefix)
(declare-function company-begin-backend "company")
(declare-function company-grab "company")
@@ -43,7 +43,7 @@ (defun notmuch-company (command &optional arg &rest _ignore)
(require 'company)
(let ((case-fold-search t)
(completion-ignore-case t))
- (cl-case command
+ (case command
(interactive (company-begin-backend 'notmuch-company))
(prefix (and (derived-mode-p 'message-mode)
(looking-back "^\\(To\\|Cc\\|Bcc\\):.*"
--
2.1.4
More information about the notmuch
mailing list