emacs-devel
[Top][All Lists]
Advanced

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

Re: Replacement for `aput' from obsolete assoc.el?


From: Stephen J. Turnbull
Subject: Re: Replacement for `aput' from obsolete assoc.el?
Date: Sun, 10 Jun 2012 21:53:18 +0900

Vitalie Spinu writes:

 > There is no way to associate multiple values at once. What is the
 > canonical way to do that?

I don't see such a great need for it.  The loop idiom you propose is
fine (except that I suppose in GNU Emacs you need to use `cl-loop', at
least in core).  In XEmacs, the canonical destructive idiom is

    (setq plist (canonicalize-lax-plist (nconc plist-new plist)))

which gives preference to entries in plist-new, and would be more
efficient (all of the functions are primitives implemented in C).

 > I find reasonable that this sort of functionality be in the core for all
 > available containers.

Reasonable, in some sense, yes.  That probably would pass in Common
Lisp, but as you're probably aware Emacs Lisp prefers simplicity over
generality for generality's sake.




reply via email to

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