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

Mode: http://www.emacswiki.org/emacs/CSharpMode

Magazine:

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 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 function definition is void: make-local-hook

      

Why? And how can I fix this?

+3


source to share


1 answer


make-local-hook

has been deprecated for many years and has been completely retired in Emacs 24.

You should try to find 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/

Otherwise, there is a pretty good chance that the code only includes these function calls in order to maintain backward compatibility with Emacs 20, and assuming there is an appropriate call add-hook

, all you have to do is remove all instances (make-local-hook HOOK)

from the code.



Here's the relevant bits of his old docstring:

(make-local-hook HOOK)

This function has been deprecated since 21.1; is no longer required.

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

You no longer need to call this function when add-hook does it for you if its LOCAL argument is nonzero.

see also C-h f add-hook

RET

+9


source







All Articles