[Top][All Lists]

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

Dumb elisp question

From: Eric Abrahamsen
Subject: Dumb elisp question
Date: Fri, 30 Sep 2011 17:15:36 +0800
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

I've made a function that takes as arguments an arbitrary format string
and a list of arguments to that string. The list of arguments is of
varying length, and the args need to be mapped through a function before
they're passed to the format string. So in the bowels of the function
there's something like:

(format fmt-str-var (mapcar (lambda (arg) (do-thing-with arg))

Obviously, the problem is that mapcar returns a single list of strings,
not the series of atomic strings that format requires.

I've tried to solve this problem many different ways, including turning
this into a macro and using ",@", and using ",@" even when it's not a
macro, and looking at other mapping functions, and trying to make some
sort of "splice" function of my own, and… and…

Nothing works quite right. This can't be a macro because elsewhere it
needs to pass `commandp'. I can't make any of the other fixes work

Can anyone provide an elegant solution?


GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-04-04 on rothera, modified by Debian

reply via email to

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