stan-dev / stan-mode

Emacs mode for Stan.
GNU General Public License v3.0
71 stars 15 forks source link

Error loading stan-mode in Emacs 24.4 #27

Closed apintar closed 9 years ago

apintar commented 9 years ago

I got the following error while loading stan-mode after building and installing Emacs 24.4

Symbol's function definition is void: cl-macroexpand-all

I can't seem to easily provide the whole backtrace from starting Emacs with the --debug-init option here, but the troublesome lines (at least the first group of troublesome lines) seem to be lines 110 and 111 of stan-mode.el which are

  (c-lang-defconst c-symbol-start
     stan (concat "[" c-alpha "]"))

I install stan-mode manually by cloning the git repository and including (require 'stan-mode) in my initialization file.

To fix the error, I added (require 'cl) before (require 'stan-mode) in my initialization file. These two web pages provide more information.

http://emacs.stackexchange.com/questions/2864/symbols-function-definition-is-void-cl-macroexpand-all-when-trying-to-instal

and

https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-10/msg01332.html

I really just want to make you aware of the error by submitting an issue in case there is a better solution than adding (require 'cl) to my initialization file.

jrnold commented 9 years ago

I'm still stuck on 24.3 so I hadn't noticed. Sorry about that. Seems like a bug in emacs 24.4, but your links had a patch; thanks ! Can you try out https://github.com/stan-dev/stan-mode/tree/fix-27 and see if it works?

apintar commented 9 years ago

Thanks for the quick patch! It seems to be working perfectly.

stan-mode is great, so my thanks for it too.