From: Tassilo Horn <tsdh@gnu.org>
To: emacs-devel@gnu.org
Subject: Adding assoc-delete-all / rassoc-delete-all
Date: Thu, 17 Apr 2014 13:39:41 +0200 [thread overview]
Message-ID: <87a9bkjibm.fsf@gnu.org> (raw)
Hi all,
I've just got aware of `assq-delete-all' which could be a convenient
function to get rid of some entry in an alist. However, if the alist
entries start with a string, you need to use something awkward like
(assq-delete-all
(car (assoc "Biber" TeX-command-list))
TeX-command-list)
so that the string "Biber" is not only equal but identical.
So I'm voting for adding a function `assoc-delete-all' which is just
like `assq-delete-all' except that it does the comparison with `equal'
instead of `eq'. Then the above becomes just
(assoc-delete-all "Biber" TeX-command-list)
For symmetry, I'd also add `rassoc-delete-all' to the existing
`rassq-delete-all'.
Would that be ok?
Bye,
Tassilo
next reply other threads:[~2014-04-17 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 11:39 Tassilo Horn [this message]
2014-04-17 11:55 ` Adding assoc-delete-all / rassoc-delete-all Thorsten Jolitz
2014-04-17 12:29 ` Stefan Monnier
2014-04-17 13:36 ` Thorsten Jolitz
2014-04-17 12:35 ` Tassilo Horn
2014-04-17 13:15 ` Stefan Monnier
2014-04-17 13:40 ` Thorsten Jolitz
2014-04-17 15:17 ` Teemu Likonen
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=87a9bkjibm.fsf@gnu.org \
--to=tsdh@gnu.org \
--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).