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

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

Re: Need help with macros


From: Cecil Westerhof
Subject: Re: Need help with macros
Date: Wed, 06 Jan 2010 20:48:56 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Cecil Westerhof <Cecil@decebal.nl> writes:

>> gnus-group-jump-bind has no need to be a macro.  As a macro it is
>> wrong.  Use defun!
>
> I could not get the defun working, that is why I thought it had to be
> done with a macro. The macro first also did not work. The macro works
> now. I'll rewrite the macro to a defun.

And this is without a macro:
    (defun gnus-group-jump-bind ()
      "Define the key bindings for jumping to groups;"
      (dolist (this-jump gnus-group-jump-list)
        (let ((this-description (second this-jump))
              (this-group       (third  this-jump))
              (this-key         (concat "vj" (first this-jump))))
          (define-key gnus-group-mode-map this-key
            `(lambda ()
              ,this-description
              (interactive)
              (gnus-group-jump-to-group ,this-group))))))

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


reply via email to

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