elisp - "Symbol's function definition is void: cl-defstruct" error for my emacs script -


i trying write emacs script call command line in following way:

emacs --script script.el 

i running issues when try include either cl-defstruct or defstruct in said script. example, following works fine when run in emacs using m-x eval-buffer fails when run script:

(cl-defstruct test slot) (setq mytest (make-test)) (setf (test-slot mytest) "hello") (message (test-slot mytest)) 

the above should spit out the message "hello" when run script, see 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 void: cl-defstruct 

the last line particularly surprising. ideas why cl-defstruct macro not recognized in setting? thanks!

try adding (require 'cl-lib) @ top of script.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -