From 979107ec7a257cbb6a0fa221956a9b2ada03b7ad Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Thu, 18 May 2017 20:24:04 +0200 Subject: [PATCH] Improve fix for https://github.com/google/protobuf/issues/295 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requiring the legacy ‘cl’ library unconditionally pollutes the namespace. Instead, require it only when compiling and in known-broken versions. This is almost the same patch that opoplawski suggested, except that I removed the test for ‘emacs-repository-version’, which isn’t defined in Emacs 24.3. --- editors/protobuf-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editors/protobuf-mode.el b/editors/protobuf-mode.el index 1cef41375..d3bdcded7 100644 --- a/editors/protobuf-mode.el +++ b/editors/protobuf-mode.el @@ -64,9 +64,11 @@ ;;; Code: (require 'cc-mode) -(require 'cl) (eval-when-compile + (and (= emacs-major-version 24) + (>= emacs-minor-version 4) + (require 'cl)) (require 'cc-langs) (require 'cc-fonts))