can't load C# mode for emacs because of "make-local-hook"

c#, elisp, emacs

Solution

`make-local-hook` has been obsolete for years, and was removed entirely in Emacs 24.

You should try to locate an updated version of the library. According to the Wiki page you linked to, the latest version is here: http://code.google.com/p/csharpmode/

Failing that, there's a pretty good chance that the code only includes those function calls to retain backwards-compatibility with Emacs 20, and that provided there is an appropriate call to `add-hook` present, all you would need to do is delete all instances of `(make-local-hook HOOK)` from the code.

Here's the relevant bits of its old docstring:

(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

Problem

Mode : http://www.emacswiki.org/emacs/CSharpMode log: ``` 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 ``` Why that? And how can I fix it?

Original source