Please don't copy me with Email to Usenet articles: it is a very bad
breach of netiquette to force the unwary to reply twice, once in
private and then again in public.
Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
> (defmacro my-add-hook (hook &rest body)
> `(add-hook ',(intern (concat (symbol-name hook) "-mode-hook"))
> (lambda () ,@body)))
>
I just tried it out and it doesn't seem to work. I tried both:
(my-add-hook 'emacs-lisp (keyboard-translate ?\( ?\[))
^
Which is wrong.
and
(my-add-hook emacs-lisp (keyboard-translate ?\( ?\[))
Which results here in:
emacs-lisp-mode-hook's value is
((lambda nil
(keyboard-translate 40 91)))
Hook run when entering Emacs Lisp mode.
You can customize this variable.
Defined in `emacs-lisp/lisp-mode'.
[back]
Looks fine to me.