help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp macros problem


From: David Kastrup
Subject: Re: elisp macros problem
Date: 25 Jul 2004 01:41:28 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

[Prev in Thread] Current Thread [Next in Thread]