From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Kaushal <kaushal.modi@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Update assq-delete-all to support keys of string type
Date: Wed, 13 May 2015 09:13:16 +0900 [thread overview]
Message-ID: <87d2252v37.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <CAFyQvY2Mp8YCjYam1gL+w5sicx5L1BLgPaAQmsZMKOcaL_megw@mail.gmail.com>
Kaushal writes:
> I wanted to use assq-delete-all to remove all elements in an alist whose
> car matched a string.
Aside: "assq" means to use the test `eq' when comparing keys. You
would name this function `assoc-delete-all' if you just want to permit
strings as well as symbols and numbers (as the suggestion to use
cl-remove does).
> (defun assq-delete-all-string (key-str alist)
In this version, where you restrict to string, I would name it
`string-assoc-delete-all' or `assoc-string-delete-all'.
I don't know if it makes sense to perpetuate the traditional names
with the availabilty of cl-lib.
prev parent reply other threads:[~2015-05-13 0:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 14:57 Update assq-delete-all to support keys of string type Kaushal
2015-05-12 17:02 ` John Mastro
2015-05-12 17:09 ` Kaushal
2015-05-13 0:13 ` Stephen J. Turnbull [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2252v37.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
--cc=kaushal.modi@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.