diff options
author | Philipp Stephani <phst@google.com> | 2017-05-18 20:24:04 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2017-05-23 15:27:29 +0200 |
commit | 979107ec7a257cbb6a0fa221956a9b2ada03b7ad (patch) | |
tree | 9d241413c289e151877c460bd273672f4cf2a804 /editors/protobuf-mode.el | |
parent | 85466206109ee4cffc32bf7d55b02ca78d7a16fa (diff) | |
download | protobuf-979107ec7a257cbb6a0fa221956a9b2ada03b7ad.tar.gz protobuf-979107ec7a257cbb6a0fa221956a9b2ada03b7ad.tar.bz2 protobuf-979107ec7a257cbb6a0fa221956a9b2ada03b7ad.zip |
Improve fix for https://github.com/google/protobuf/issues/295
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.
Diffstat (limited to 'editors/protobuf-mode.el')
-rw-r--r-- | editors/protobuf-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/protobuf-mode.el b/editors/protobuf-mode.el index 1cef4137..d3bdcded 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)) |