Emacs Wiki заявляет:
Компания действительно вмешивается в собственное поведение Yasnippet. Вот быстрое исправление: http://gist.github.com/265010
Код следующий:
(define-key company-active-map "\t" 'company-yasnippet-or-completion)
(defun company-yasnippet-or-completion ()
(interactive)
(if (yas/expansion-at-point)
(progn (company-abort)
(yas/expand))
(company-complete-common)))
(defun yas/expansion-at-point ()
"Tested with v0.6.1. Extracted from `yas/expand-1'"
(first (yas/current-key)))
Я поместил тот код в свой .emacs, и следующее сообщение появилось:
Warning (initialization): An error occurred while loading `c:/Documents and Settings/Alex.AUTOINSTALL.001/Application Data/.emacs.elc':
Symbol's value as variable is void: company-active-map
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.
Я должен поместить код фиксации в .el файле YASNIPPET? или в моем .emacs (который бросает меня ошибка)?
Звучит как проблема с трассой нагрузки. Значение символа void означает, что emacs не может найти для него определения - скорее всего, потому, что файл, содержащий его определение, еще не загружен.
Вы можете попробовать добавить что-нибудь подобное в свой .emacs (до кода, вызывающего ошибки):
;; where ~/.emacs.d/ is the path to a directory containing
;; additional library code you want emacs to load
(add-to-list 'load-path "~/.emacs.d/")