On Wed, 06 Jan 2010 12:36:03 +0100 Cecil Westerhof <[email protected]> wrote: 

CW> I am trying my first stab at macro's. I want to define key bindings to a
CW> jump to a group. I tried something like:
CW>     (defmacro gnus-group-jump-bind (key-binding group-to-jump-to)
CW>       (define-key gnus-group-mode-map key-binding
CW>         (lambda ()
CW>           (interactive)
CW>           (gnus-group-jump-to-group group-to-jump-to))))

CW>     (gnus-group-jump-bind "vjd" "nndraft:drafts")

CW> The key binding is okay, but the lambda function not. This becomes:
CW>     (lambda nil (interactive) (gnus-group-jump-to-group group-to-jump-to))

CW> instead of:
CW>     (lambda nil (interactive) (gnus-group-jump-to-group "nndraft:drafts"))

CW> What do I need to do to get the value of group-to-jump-to instead of the
CW> string?

Read the manual section on macros again, and again, and again.  It
really takes a while.  You are trying to find the , interpolation
marker, e.g. ",group-to-jump-to" will become "nndraft:drafts" but again
you should read the manual very thoroughly.

Ted
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to