[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Refer to List of Arguments in Emacs Lisp Function
From: |
Ted Zlatanov |
Subject: |
Re: Refer to List of Arguments in Emacs Lisp Function |
Date: |
Mon, 17 Nov 2014 06:04:38 -0500 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
On Thu, 13 Nov 2014 09:02:14 +0100 Alexander Shukaev <haroogan@gmail.com>
wrote:
AS> I can't find whether there is a possibility to refer to the whole list of
AS> arguments of a function in Emacs Lisp. For example:
AS> (defun move (x y z)
AS> (apply do-move (args))
AS> What I mean by (args) primitive here is a list (x y z). This use case
AS> illustrates usefulness of such a primitive, i.e. forwarding of arguments to
AS> another internal call without a need to rewrite them by hand.
I think `apply-partially' and function aliasing are more typical
solution for this use case in today's Emacs. Macros also help, depending
on the situation. Not to say your need is not valid, but it's definitely
not common.
AS> (length (args)) might be useful in some cases too. Is there anything
AS> like that in Emacs Lisp already?
Sorry... I'm not aware of such a thing.
Ted
Re: Refer to List of Arguments in Emacs Lisp Function, Barry Margolin, 2014/11/13
Re: Refer to List of Arguments in Emacs Lisp Function,
Ted Zlatanov <=