From c506e1034b5adb54b3e4f8d3e59086756f2bb126 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Thu, 29 Apr 2010 11:33:36 +0100 Subject: emacs: Avoid runtime use of `cl'. The GNU Emacs Lisp Reference Manual section D.1 says: > * Please don't require the cl package of Common Lisp extensions at > run time. Use of this package is optional, and it is not part of > the standard Emacs namespace. If your package loads cl at run time, > that could cause name clashes for users who don't use that package. > > However, there is no problem with using the cl package at compile > time, with (eval-when-compile (require 'cl)). That's sufficient for > using the macros in the cl package, because the compiler expands > them before generating the byte-code. Follow this advice, requiring the following changes where `cl' was used at runtime: - replace `rassoc-if' in `notmuch-search-buffer-title' with the `loop' macro and inline code. At the same time find the longest prefix which matches the query rather than simply the last, - replace `union', `intersection' and `set-difference' in `notmuch-show-add-tag' and `notmuch-show-remove-tag' with local code to calculate the result of adding and removing a list of tags from another list of tags. --- emacs/notmuch-hello.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emacs/notmuch-hello.el') diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 5970e3e5..8dbb8982 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -19,9 +19,9 @@ ;; ;; Authors: David Edmondson +(eval-when-compile (require 'cl)) (require 'widget) (require 'wid-edit) ; For `widget-forward'. -(require 'cl) (require 'notmuch-lib) (require 'notmuch-mua) -- cgit v1.2.3