I wanted to test yasnippet
for editing Emacs Lisp files. After installing it from the package manager, the problem is that it works fine from the *scratch*
buffer but not when editing a Lisp file using emacs-lisp-mode
.
To debug, I reduced my Emacs init file to one line:
(setq debug-on-error t)
Then I started Emacs from command line with:
$ emacs test.el
and run M-x yas-minor-mode
and then M-x yas-reload-all
, then I typed
defun
and pressed the TAB
key, but nothing happend.
However, if I first switch to the *scratch*
buffer and run the same commands it works fine and inserts the defun
template when I press TAB
..