2

模式:http ://www.emacswiki.org/emacs/CSharpMode

日志:

Loading /.emacs.d/contrib/dev/csharp-mode.el
Done loading /.emacs.d/contrib/dev/csharp-mode.el
File mode specification error: (void-function make-local-hook)
Loading vc-git...done
When done with a buffer, type C-x #
(No files need saving)
File mode specification error: (void-function make-local-hook)
When done with a buffer, type C-x #
Making completion list... [2 times]
goto-history-element: End of history; no default available [3 times]
or: Symbol's function definition is void: make-local-hook
mouse-minibuffer-check: Minibuffer window is not active
(No files need saving)
When done with a buffer, type C-x #
(No files need saving)
File mode specification error: (void-function make-local-hook)
When done with a buffer, type C-x #
Making completion list... [2 times]
or: Symbol's function definition is void: make-local-hook

为什么?我该如何解决?

4

1 回答 1

8

make-local-hook已经过时多年,并在 Emacs 24 中完全删除。

您应该尝试找到该库的更新版本。根据您链接到的 Wiki 页面,最新版本在这里:
http ://code.google.com/p/csharpmode/

如果做不到这一点,代码很可能只包含那些函数调用以保持与 Emacs 20 的向后兼容性,并且只要有适当的调用add-hook呈现,您需要做的就是(make-local-hook HOOK)从代码中删除所有实例.

这是其旧文档字符串的相关位:

(make-local-hook HOOK)

This function is obsolete since 21.1; not necessary any more.

Make the hook HOOK local to the current buffer. The return value is HOOK.

You never need to call this function now that `add-hook' does it for you if its LOCAL argument is non-nil.

See also C-hf add-hook RET

于 2012-04-06T08:20:24.657 回答