GNU bug report logs -
#47427
26.3; 1. Please define a built-in predicate `plistp', 2. wrong type wrong-type-argument error
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 26 Mar 2021 22:28:02 UTC
Severity: wishlist
Found in version 26.3
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
(plist-put (list 'a 'b 'c) "a" 42)
Debugger entered--Lisp error: (wrong-type-argument plistp (a b c))
plist-put((a b c) "abc" 42)
eval((plist-put (list (quote a) (quote b) (quote c)) "abc" 42))
That's all fine and dandy, except that there is no predicate `plistp'.
See (elisp) Type Predicates:
All built-in functions do check the types of their actual arguments
when appropriate, and signal a 'wrong-type-argument' error if an
argument is of the wrong type.
It makes no sense to refer to `plistp' in the error message if it
doesn't exist. If it won't exist then the error message should say that
the arg isn't a plist - not mention `plistp'. Even just saying "plist"
in the error message would be an improvement in this regard. But the
right fix is to define a `plistp' primitive.
Not only that, but the error is _not_, apparently that the first
arg isn't a proper plist. For example, this raises no error:
(plist-put (list 'a 'b 'c) "a" 42)
And it returns the list (a 42 c). Clearly the error was raised
not because of an improper plist but because the key to look up
is a string and the keys in the almost-plist are symbols.
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''
This bug report was last modified 2 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.