Reputation: 789
I am trying to write an emacs script to call from the command line in the following way:
emacs --script script.el
I am running into issues when I try to include either a cl-defstruct
or a defstruct
in said script. For example, the following works just fine when I run it in emacs using M-x eval-buffer
but fails when run as a script:
(cl-defstruct test slot)
(setq myTest (make-test))
(setf (test-slot myTest) "hello")
(message (test-slot myTest))
The above should only spit out the the message "hello" but when run as a script, I see the following error:
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Symbol's function definition is void: cl-defstruct
The last line is particularly surprising. Any ideas why the cl-defstruct macro would not be recognized in this setting? Thanks!
Upvotes: 1
Views: 1083