all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: alist-get in Emacs 24?
Date: Fri, 02 Oct 2015 09:37:50 -0400	[thread overview]
Message-ID: <jwvr3ldmm3h.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 877fn5hgg8.fsf@web.de

> There was assoc.el in prior Emacsen (and it's still lying around in
> lisp/obsolete).  `aput' is its setter for alists.  Works great, but is
> obsolete.

"Works great" only if your needs are very modest.  E.g. it's
terribly inefficient, and it relies on dynamic scoping.

As for the (gv-define-expander alist-get ...), you could just blindly
copy that definition into your package.  Of course that'll only work for
Emacsen with gv.el.  For older Emacsen, you'll have to use
define-setf-expander, which indeed works a bit differently from
gv-define-expander.  For the very reason that I invented
gv-define-expander, I'd rather not try and come up with the equivalent
define-setf-expander.


        Stefan




  parent reply	other threads:[~2015-10-02 13:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02  6:32 alist-get in Emacs 24? Marcin Borkowski
2015-10-02  6:39 ` Dmitry Gutov
2015-10-02  6:54   ` Marcin Borkowski
2015-10-02  7:34 ` Michael Heerdegen
2015-10-02  8:49   ` Marcin Borkowski
2015-10-03  3:05     ` Michael Heerdegen
2015-10-02 13:37   ` Stefan Monnier [this message]
2015-10-07 19:15   ` Marcin Borkowski
2015-10-07 20:45     ` Drew Adams
2015-10-08  8:21     ` Michael Heerdegen
2015-10-08 15:53       ` Drew Adams
2015-10-08 16:14         ` Michael Heerdegen

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=jwvr3ldmm3h.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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 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.