gpt4 book ai didi

java - Emacs-公司 : An error occurred in auto-begin Invalid function

转载 作者:行者123 更新时间:2023-12-02 14:45:20 24 4
gpt4 key购买 nike

我正在使用全新配置的 GNU Emacs 24.3.1。我想与公司一起使用 emacs-eclim 。公司工作正常,但如果我打开一个 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)

和我的钩子(Hook):

(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-jump-mode、自动缩进模式、autopair、company、dash、dired+、emacs-eclim、epl、f、flycheck、fringe-helper、helm、helm-company、helm-flycheck、helm-projectile -all、hexrgb、java-snippets、javadoc-lookup、多术语、多光标、pkg-info、powerline、pretty-mode、projectile、recentf-ext、s、sublime-themes、视觉正则表达式、视觉正则表达式-类固醇和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)

最佳答案

我的 Crystal 球说您在没有事先加载 cl 的情况下遇到了 case 表达式。如果问题出在字节编译文件中,则必须重新编译该文件,否则添加

(require 'cl)

~/.emacs 文件早期的某个位置可能会有所帮助。

关于java - Emacs-公司 : An error occurred in auto-begin Invalid function,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23508795/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com