Installing YASnippet
debian, emacs, yasnippet
Solution
Just at a glance, that
(yas--initialise)
should be
(yas/initialize)
I'm running `0.6.1` and there's no such function as `yas--initialize` in the package.
My init code looks like
(require 'yasnippet)
(yas/initialize)
(yas/load-directory
(dot-emacs "elpa/yasnippet-0.6.1/snippets"))
I think you just got some garbled init code somewhere.
EDIT
I should have omitted the `load-directory` call in my sample since it's beside the point. But for what it's worth, `dot-emacs` is just a config-agnostic function I use to reference files relative to my init:
(defun dot-emacs (relative-path)
"Return the full path of a file in the user's emacs directory."
(expand-file-name (concat user-emacs-directory relative-path)))
Problem
I have installed YASnippet and configured it with this: ``` (add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c") (require 'yasnippet) ;; not yasnippet-bundle (yas--initialize) (yas/load-directory "~/.emacs.d/packages/yasnippet-0.6.1c/snippets") ``` However, when I launch Emacs it gives me an error: ``` Warning (initialization): An error occurred while loading `/home/alexander/.emacs': Symbol's function definition is void: yas--initialize To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace. (add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c") (require 'yasnippet) ;; not yasnippet-bundle (yas--initialize) (yas/load-directory "~/.emacs.d/packages/yasnippet-0.6.1c/snippets") ``` What am I doing wrong? I have tried to find the answer but with no success. (I have also tried with another version of yasnippet yasnippet-0.6.1b but it was the same.)