我正在使用GNU Emacs 24.3.1的全新配置。我想在公司中使用emacs-eclim。Company可以正常工作,但如果我打开一个java文件,它就会停止工作,并发出以下错误消息:
Company: An error occurred in auto-begin
Invalid function: (java-mode javascript-mode js-mode ruby-mode php-mode c-mode c++-mode)我的Emacs配置:
(require 'iso-transl)
(require 'recentf)
(require 'recentf-ext)
(require 'eclim)
(require 'company-emacs-eclim)
(require 'eclimd)还有我的钩子:
(add-hook 'after-init-hook
(lambda ()
(iswitchb-mode)
(helm-mode 1)
(auto-indent-global-mode)
(toggle-diredp-find-file-reuse-dir 1)
(recentf-mode 1)
(global-flycheck-mode)
(auto-indent-global-mode)
(autopair-global-mode)
(projectile-global-mode)
(global-pretty-mode)
(global-eclim-mode)
(global-company-mode t)
(yas-global-mode 1)))
(add-hook 'java-mode-hook
(lambda ()
(company-emacs-eclim-setup)
(help-at-pt-set-timer)
))以下是我通过Emacs包管理器安装的包:
ace跳转模式,自动缩进模式,autopair,公司,破折号,dired+,emacs-eclim,epl,f,flycheck,ext helper,helm,helm-company,helm-flycheck,helm-projectile-all,十六进制,java代码段,javadoc-lookup,多项,多光标,pkg-info,powerline,漂亮模式,projectile,recentf-ext,s,sublime主题,visual-regexp,visual-regexp类固醇和yasnippet。
以下是来自Emacs的调试信息:
Debugger entered--Lisp error: (invalid-function (java-mode javascript-mode js-mode ruby-mode php-mode c-mode c++-mode))
(java-mode javascript-mode js-mode ruby-mode php-mode c-mode c++-mode)(128)
eclim-completion-start()
(let ((start (eclim-completion-start))) (if start (progn (buffer-substring-no-properties start (point)))))
(cond ((eql command (quote interactive)) (company-begin-backend (quote company-emacs-eclim))) ((eql command (quote prefix)) (let ((start (eclim-completion-start))) (if start (progn (buffer-substring-no-properties start (point)))))) ((eql command (quote candidates)) (company-emacs-eclim--candidates arg)) ((eql command (quote annotation)) (company-emacs-eclim--annotation arg)) ((eql command (quote meta)) (eclim--completion-documentation (concat arg (company-emacs-eclim--annotation arg)))) ((eql command (quote no-cache)) (equal arg "")) ((eql command (quote ignore-case)) t) ((eql command (quote sorted)) t) ((eql command (quote post-completion)) (let ((ann (company-emacs-eclim--annotation arg))) (if ann (progn (insert ann))) (eclim--completion-action))))
company-emacs-eclim(prefix)
#[0 "\n\203 [LONG STRING THAT CANNOT BE COPY]
company--begin-new()
company-begin()
#[0 "\300 \207" [company-begin] 1 "\n\n(fn)"]()
company-auto-begin()
company-manual-begin()
company-complete-common()
call-interactively(company-complete-common record nil)
command-execute(company-complete-common record)
execute-extended-command(nil "company-complete-common")
call-interactively(execute-extended-command nil nil)发布于 2014-05-07 20:48:33
我的水晶球告诉我,您在没有预先加载cl的情况下遇到了一个case表达式。如果问题出在字节编译的文件中,则必须重新编译该文件,否则将添加
(require 'cl)~/.emacs文件中较早的某个位置可能会有所帮助。
发布于 2014-05-07 13:33:25
M-x toggle-debug-on-error,然后引发错误。这将为您提供一个回溯跟踪,不仅显示错误消息,还显示引发错误时正在计算的表达式。
在本例中,一些函数期望一个函数作为它的参数之一,而不是传递给一个函数,而是传递给您看到的列表:(java-mode javascript-mode js-mode ruby-mode php-mode c-mode c++-mode)。
然后,您可以更深入地查看回溯,以查看函数是如何传递该列表参数的,等等。您可以单击回溯( backtrace )左侧的函数名称,以查看其Lisp定义。
https://stackoverflow.com/questions/23508795
复制相似问题