* bug#38375: 26.3.50; map-contains-key can't detect nil
@ 2019-11-25 17:15 Damien Cassou
2019-11-25 23:22 ` Juanma Barranquero
2019-11-25 23:34 ` Michael Heerdegen
0 siblings, 2 replies; 5+ messages in thread
From: Damien Cassou @ 2019-11-25 17:15 UTC (permalink / raw)
To: 38375; +Cc: Nicolas Petton
The code below inserts the pair (nil, 'value) in a hash table. I expect
`map-contains-key' to return t when passed the key nil as argument.
(ert-deftest test-map-contains-key-with-nil-has-key-in-hashtable ()
(let ((map (make-hash-table :test 'equal)))
(puthash nil 'value map)
(should (map-contains-key map nil))))
--
Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#38375: 26.3.50; map-contains-key can't detect nil
2019-11-25 17:15 bug#38375: 26.3.50; map-contains-key can't detect nil Damien Cassou
@ 2019-11-25 23:22 ` Juanma Barranquero
2019-11-25 23:34 ` Michael Heerdegen
1 sibling, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2019-11-25 23:22 UTC (permalink / raw)
To: Damien Cassou; +Cc: Nicolas Petton, 38375
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
On Mon, Nov 25, 2019 at 10:38 PM Damien Cassou <damien@cassou.me> wrote:
> The code below inserts the pair (nil, 'value) in a hash table. I expect
> `map-contains-key' to return t when passed the key nil as argument.
It does in 27.0.50:
ELISP> (let ((map (make-hash-table :test 'equal)))
(puthash nil 'value map)
(map-contains-key map nil))
t
ELISP>
[-- Attachment #2: Type: text/html, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#38375: 26.3.50; map-contains-key can't detect nil
2019-11-25 17:15 bug#38375: 26.3.50; map-contains-key can't detect nil Damien Cassou
2019-11-25 23:22 ` Juanma Barranquero
@ 2019-11-25 23:34 ` Michael Heerdegen
2019-11-26 15:12 ` Damien Cassou
1 sibling, 1 reply; 5+ messages in thread
From: Michael Heerdegen @ 2019-11-25 23:34 UTC (permalink / raw)
To: Damien Cassou; +Cc: Nicolas Petton, 38375
Damien Cassou <damien@cassou.me> writes:
> The code below inserts the pair (nil, 'value) in a hash table. I expect
> `map-contains-key' to return t when passed the key nil as argument.
>
> (ert-deftest test-map-contains-key-with-nil-has-key-in-hashtable ()
> (let ((map (make-hash-table :test 'equal)))
> (puthash nil 'value map)
> (should (map-contains-key map nil))))
This should have been fixed in master with commit 1691a5109
"*lisp/emacs-lisp/map.el: Make the functions generic". Could you please
check?
Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#38375: 26.3.50; map-contains-key can't detect nil
2019-11-25 23:34 ` Michael Heerdegen
@ 2019-11-26 15:12 ` Damien Cassou
2019-11-26 15:44 ` Michael Heerdegen
0 siblings, 1 reply; 5+ messages in thread
From: Damien Cassou @ 2019-11-26 15:12 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: Nicolas Petton, 38375
Michael Heerdegen <michael_heerdegen@web.de> writes:
> This should have been fixed in master with commit 1691a5109
> "*lisp/emacs-lisp/map.el: Make the functions generic". Could you please
> check?
I agree, it is fixed in master.
--
Damien Cassou
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-26 15:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-25 17:15 bug#38375: 26.3.50; map-contains-key can't detect nil Damien Cassou
2019-11-25 23:22 ` Juanma Barranquero
2019-11-25 23:34 ` Michael Heerdegen
2019-11-26 15:12 ` Damien Cassou
2019-11-26 15:44 ` Michael Heerdegen
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.