info-gnus-english
[Top][All Lists]
Advanced

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

How to get value of parameter in macro


From: Cecil Westerhof
Subject: How to get value of parameter in macro
Date: Wed, 06 Jan 2010 12:36:03 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

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

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

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

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

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

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


reply via email to

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