[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Programmatic let
From: |
Burton Samograd |
Subject: |
Re: Programmatic let |
Date: |
Wed, 05 Dec 2012 13:39:55 -0700 |
User-agent: |
Gnus/5.1299999999999999 (Gnus v5.13) Emacs/24.2.90 (cygwin) |
Lluís <address@hidden> writes:
> My elisp foo is quite poor, so this might well be a completely stupid approach
> to the problem.
>
> I have a callback that gets automatically called, and uses some
> orgmode-specific
> routines whose behaviour can be tuned through some customizable variables.
>
> The usual approach in orgmode is:
>
> (let ((org-v1 ...) (org-v2 ...)) (org-func ...))
>
> As my function is automatically called (as a response to the D-Bus message),
> I'd
> like to let the user specify a let-like form to let her temporarily override
> the
> behaviour of the `org-func' that my package invokes:
>
> (setq my-cb-org-vars '((org-v1 ...) (org-v2 ...)))
> (defun my-cb (...)
> (programmatic-let my-cb-org-vars
> (org-func ...)))
This should work:
(defmacro programmatic-let (vars &rest body)
`(let ,vars
,@body))
--
Burton Samograd