opensubscriber
   Find in this group all groups
 
Unknown more information…

e : emacs-devel@gnu.org 5 June 2012 • 12:46AM -0400

Replacement for `aput' from obsolete assoc.el?
by Michael Heerdegen

REPLY TO AUTHOR
 
REPLY TO GROUP




Hello,

I make much use of `aput' from assoc.el in my .emacs.  It lets me modify
the value associated with a certain key in an alist, where keys are
compared with `equal'.

I often saw people reinventing this function who didn't yet know
assoc.el.  Now, assoc.el is obsolete.  I'm not against that, since there
were not many useful things in assoc.el besides `aput'.

But I wonder if there is a simple replacement for `aput' in vanilla
Emacs?  I don't think so, but maybe I have overseen something.

If not, can we add a new function `assoc-delete-all' to subr.el (which
would be like `assq-delete-all', but would compare keys with `equal'
instead of `eq')?  Dunno why this function does not exist yet, but it
would ease handling alists e.g. if its keys are strings.


Thanks,

Michael.


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.