【发布时间】:2009-11-18 12:53:24
【问题描述】:
在 Ubuntu 上的 Emacs23 上使用 php-mode 时,我不断收到此错误和类似错误:
Debugger entered--Lisp error: (void-function php-template-if-hook)
php-template-if-hook()
abbrev-insert(if #("if" 0 2 (fontified t face font-lock-keyword-face)) 414 416)
#[(G73404 funs global) "[Byte Code]"
apply(#[(G73404 funs global "[Byte Code]"
(lambda (&rest --cl-rest--) (apply #[... "[Byte Code]"
expand-abbrev()
self-insert-command(1)
c-electric-paren(nil)
call-interactively(c-electric-paren nil nil)
当我输入if( 时,以及当我输入array( 或以array( 结尾的任何内容时出现以下错误,例如is_array(:
Debugger entered--Lisp error: (void-function php-template-if-hook)
php-template-if-hook()
abbrev-insert(if #("if" 0 2 (fontified t face font-lock-keyword-face)) 414 416)
#[(G73404 funs global) "[Byte code]"
apply(#[(G73404 funs global "[Byte Code]"
(lambda (&rest --cl-rest--) (apply #[... "[Byte Code]"
expand-abbrev()
self-insert-command(1)
c-electric-paren(nil)
call-interactively(c-electric-paren nil nil)
即使我使用 emacs 入门工具包也会引发此错误。 有人解决过类似的问题吗?
我使用的 php-mode.el 来自 emacs starter kit,它捆绑了 nxhtml 的一个版本。我尝试使用php-mode-1.5.0 仍然没有成功。我什至尝试使用最新版本的 nxhtml(2.2),但仍然存在相同的错误。我不得不复制和粘贴 mewde 中缺少的所有函数定义使其能够相对健全地工作。我不得不说它确实增加了一些价值。 :)
有趣的是,这个问题对我来说似乎是 Ubuntu Karmic 唯一的问题,我在 opensuse 11.0 和 11.1 的 emacs 上使用相同的东西,没有任何问题。
谢谢。
【问题讨论】: