bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function


From: Drew Adams
Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function
Date: Fri, 26 Mar 2021 22:13:42 +0000

Please consider adding a TEST comparer arg for plist keys.

In Elisp, a plist key need not be a symbol:

(plist-put (list "aaa" 1 "bbb" 2 "ccc" 3) "bbb" 42)

That "works" (and no error), but it doesn't do what's expected, since
the keys should be compared with `equal' or `string=', not `eq'.

And if it were not intended that that work then Elisp would raise a
wrong-type-argument error saying that the first arg isn't a plist.

And note that the Elisp manual says:

  A "property list" ("plist" for short) is a list of
  paired elements.  Each of the pairs associates a
  property name (usually a symbol) with a property or value.
                 ^^^^^^^

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19041
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






reply via email to

[Prev in Thread] Current Thread [Next in Thread]