Cecil Westerhof <[email protected]> writes:
> Found it:
> (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))))
>
> When you know it, it is not difficult.
>
> But I am still not out of the woods.
> Instead of using:
> (gnus-group-jump-bind "vjd" "nndraft:drafts")
>
> I want to do something like:
> (gnus-group-jump-bind this-key this-group)
>
> But that does not work because the macro then does not receive a string,
> but a symbol. I tried to work with symbol-value, but that did not work.
> If you -or someone else- has another pointer ...
And solved this problem also:
(setq gnus-group-jump-list
(list
'("d" "nndraft:drafts")
))
(defmacro gnus-group-jump-bind (key-binding group-to-jump-to)
`(define-key gnus-group-mode-map ,(symbol-value key-binding)
(lambda ()
(interactive)
(gnus-group-jump-to-group ,(symbol-value group-to-jump-to)))))
(defun gnus-group-do-jump-bind ()
(dolist (this-jump gnus-group-jump-list)
(let ((this-group (second this-jump))
(this-key (concat "vj" (first this-jump))))
(gnus-group-jump-bind this-key this-group))))
(gnus-group-do-jump-bind)
And this does what I want. A problem could be that:
(gnus-group-jump-bind "vjd" "nndraft:drafts")
does not work anymore, but just always use variables solves that
'problem'.
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english