[PATCH] erlang-eunit.el: Require cl, as it is used.

Ralf Doering rdoering@REDACTED
Mon Mar 22 14:00:19 CET 2010


erlang-eunit.el (part of erlang-mode) uses "flet", which is only available
if emacs package cl was loaded. The docs of the CL package suggest that
'...packages installed in Emacs must not load "CL" at run time.' We
honour this by using eval-when-compile.

This fixes warnings when byte-compiling erlang-eunit.el with:
 emacs -batch -f batch-byte-compile erlang-eunit.el

The warning fixed is:
	In erlang-eunit-compile-and-run-tests:
	erlang-eunit.el:146:4:Warning: `(save-some-buffers (&optional any) nil)'
	is a malformed function

This bug was reported initially against Ubuntu packages, see
https://bugs.launchpad.net/bugs/541893 for reference

Signed-off-by: Ralf Doering <rdoering@REDACTED>
---
 lib/tools/emacs/erlang-eunit.el |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/tools/emacs/erlang-eunit.el b/lib/tools/emacs/erlang-eunit.el
index 05528ae..1046143 100644
--- a/lib/tools/emacs/erlang-eunit.el
+++ b/lib/tools/emacs/erlang-eunit.el
@@ -20,6 +20,9 @@
 ;;;
 ;;; Author: Klas Johansson
 
+(eval-when-compile
+  (require 'cl))
+
 (defvar erlang-eunit-separate-src-and-test-directories t
   "*Whether or not to keep source and EUnit test files in separate directories")
 
-- 
1.7.0.1.61.gdc05d



More information about the erlang-patches mailing list