joostkremers / pandoc-mode

An Emacs minor mode for interacting with Pandoc.
https://joostkremers.github.io/pandoc-mode/
178 stars 14 forks source link

byte compiling utils: Symbol's function definition is void: caddr #49

Closed dunn closed 9 years ago

dunn commented 9 years ago
🐙  $(which emacs) --batch -Q --directory /private/tmp/pandoc-mode20150722-24370-ibmftp/pandoc-mode-2.13.1 --directory /usr/local/opt/dash/share/emacs/site-lisp/dash --directory /usr/local/opt/hydra/share/emacs/site-lisp/hydra -f batch-byte-compile pandoc-mode-utils.el

In toplevel form:
pandoc-mode-utils.el:899:1:Error: Symbol's function definition is void: caddr

Adding (require 'cl) to pandoc-mode-utils.el, as suggested in #5 and #35 reduces it to a warning:

In toplevel form:
pandoc-mode-utils.el:48:1:Warning: cl package required at runtime

Is it worth adding 'cl as a proper requirement?

joostkremers commented 9 years ago

Well, caddr is an alias for cl-caddr, but the former is defined in cl.el, while the latter is defined in cl-lib.el. pandoc-mode-utils.el already depends on cl-lib.el, so I think it makes more sense to replace caddr with cl-caddr, which I just did. A quick test suggests that it's solved now.

Thanks for reporting, I still get tripped up by cl.el / cl-lib.el issues from time to time... I wish they'd just fold everything from those packages into Elisp proper and be done with it. 😖

dunn commented 9 years ago

Thanks so much for the quick reply!