Stephan Schmitt <[email protected]> writes:
> Hi Nathan,
>
> when the lambda form is evaluated (when you press f6) the variable
> shortcut-def doesn't exist any more.
>
> The problem is that elisp doesn't support closures. See
> this info page:
> (elisp) Top > Variables > Variable Scoping > Extent
>
> As a workaraound you can save the table in a global variable with setq
> and access that variable in the lambda form.
Another way would be to use `lexical-let' from the CL package, i.e.:
(global-set-key (read-kbd-macro (second shortcut-def))
(lexical-let ((shortcut-def shortcut-def))
(lambda ()
(interactive)
(org-id-goto (third shortcut-def)))))
should do what you want.
Štěpán
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode