all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Herring, Davis" <herring@lanl.gov>
To: Tino Calancha <tino.calancha@gmail.com>,
	Emacs developers <emacs-devel@gnu.org>
Subject: RE: [PATCH] assq-delete-all, rassq-delete-all: Avoid duplication of code
Date: Mon, 28 Nov 2016 13:58:55 +0000	[thread overview]
Message-ID: <B393F5AD12955C48A84FFB08032CD04F6C6048E2@ECS-EXG-P-MB01.win.lanl.gov> (raw)
In-Reply-To: <87zikk9biz.fsf@gmail.com>

> +(defun assq-delete-all-1 (elt alist key)
> +  (let ((op (if key #'car #'cdr)))

I would just pass `op' instead.  It makes the callers clearer, and also avoids the confusion of "use the key, not the value?" vs. "this is the key" for the variable `key'.

Davis



  reply	other threads:[~2016-11-28 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28  9:52 [PATCH] assq-delete-all, rassq-delete-all: Avoid duplication of code Tino Calancha
2016-11-28 13:58 ` Herring, Davis [this message]
2016-11-28 14:35   ` Tino Calancha
2016-11-28 17:24 ` Eli Zaretskii
2016-11-28 18:17   ` Clément Pit--Claudel
2016-11-29  8:28     ` Tino Calancha

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=B393F5AD12955C48A84FFB08032CD04F6C6048E2@ECS-EXG-P-MB01.win.lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=tino.calancha@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.