Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacs compile error #295

Closed
opoplawski opened this issue Apr 22, 2015 · 3 comments
Closed

emacs compile error #295

opoplawski opened this issue Apr 22, 2015 · 3 comments
Labels

Comments

@opoplawski
Copy link

Building protobuf 2.4.1 with emacs 24.4 and 24.5:

+ emacs -batch -f batch-byte-compile editors/protobuf-mode.el
Eval error in the `c-lang-defconst' for `c-regular-keywords-regexp' in protobuf-mode:
Eval error in the `c-lang-defconst' for `c-basic-matchers-before' in protobuf-mode:
Eval error in the `c-lang-defconst' for `c-matchers-2' in protobuf-mode:
In toplevel form:
editors/protobuf-mode.el:165:1:Error: Symbol's function definition is void: set-difference

You can see some discussion of the issue here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845
That discussion assumed that the issue would be fixed in 24.5, but that does not appear to be the case. I'm currently using:

--- protobuf-2.5.0/editors/protobuf-mode.el
+++ protobuf-2.5.0/editors/protobuf-mode.el
@@ -66,6 +66,10 @@
 (require 'cc-mode)

 (eval-when-compile
+  (and (= emacs-major-version 24)
+       (>= emacs-minor-version 4)
+       (null emacs-repository-version)
+       (require 'cl))
   (require 'cc-langs)
   (require 'cc-fonts))

@hotpxl
Copy link
Contributor

hotpxl commented Aug 4, 2016

I'm having the same issue. Please add (require 'cl) to the top of protobuf-mode.el.

Thanks.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Aug 4, 2016

Can you help send a pull request to update the file?

@hotpxl
Copy link
Contributor

hotpxl commented Aug 5, 2016

PR #1926 submitted. Thanks!

@xfxyjwf xfxyjwf closed this as completed in ddf6d1e Aug 5, 2016
xfxyjwf added a commit that referenced this issue Aug 5, 2016
[master] Add dependency cl. Fixes #295.
tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Aug 12, 2016
phst added a commit to phst/dart-mode that referenced this issue May 18, 2017
I’ve unfortunately removed a similar workaround in
emacsorphanage/dart-mode@bd08208.
This is the same workaround as suggested for
protocolbuffers/protobuf#295 by @opoplawski.
nex3 pushed a commit to emacsorphanage/dart-mode that referenced this issue May 18, 2017
#40)

I’ve unfortunately removed a similar workaround in
bd08208.
This is the same workaround as suggested for
protocolbuffers/protobuf#295 by @opoplawski.
phst added a commit to phst/protobuf that referenced this issue May 23, 2017
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.
acozzette pushed a commit that referenced this issue May 26, 2017
tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Jun 13, 2017
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.
tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Jun 14, 2019
tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Jun 14, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants