From: Burton Samograd <burton@samograd.ca>
To: emacs-devel@gnu.org
Subject: Re: Programmatic let
Date: Wed, 05 Dec 2012 13:39:55 -0700 [thread overview]
Message-ID: <kgh8v9cb5d0.fsf@CDW764-BURTONS.QFTI.COM> (raw)
In-Reply-To: 87sj7kqm59.fsf@fimbulvetr.bsc.es
Lluís <xscript@gmx.net> 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
prev parent reply other threads:[~2012-12-05 20:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 20:28 Programmatic let Lluís
2012-12-05 20:37 ` Grégoire Jadi
2012-12-05 20:48 ` Lluís
2012-12-05 20:39 ` Burton Samograd [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=kgh8v9cb5d0.fsf@CDW764-BURTONS.QFTI.COM \
--to=burton@samograd.ca \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).