diff options
author | David Edmondson <dme@dme.org> | 2010-04-29 11:33:36 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-10-27 17:41:50 -0700 |
commit | c506e1034b5adb54b3e4f8d3e59086756f2bb126 (patch) | |
tree | 7fda3e5dc2e837473281c0754994fc791e2294bd /emacs/notmuch-hello.el | |
parent | b67c3ed6094025558ebcdd608735d116a01997f8 (diff) |
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.
Diffstat (limited to 'emacs/notmuch-hello.el')
-rw-r--r-- | emacs/notmuch-hello.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 <dme@dme.org> +(eval-when-compile (require 'cl)) (require 'widget) (require 'wid-edit) ; For `widget-forward'. -(require 'cl) (require 'notmuch-lib) (require 'notmuch-mua) |