emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt.


From: Nicolas Petton
Subject: Re: [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt.
Date: Sat, 25 Apr 2015 11:56:00 +0200

Artur Malabarba writes:

>>    "Perform a lookup in MAP of KEY and return its associated value.
>>  If KEY is not found, return DEFAULT which defaults to nil.
>>
>> -If MAP is a list, `assoc' is used to lookup KEY."
>> +If MAP is a list, `equal' is used to lookup KEY."
>>    (map--dispatch map
>>      :list (or (cdr (assoc key map)) default)
>
> Won't this give false negatives if a key's value is nil?

You mean answer `default' if the associated value is nil?
It will indeed... I'll fix it, thanks!

Nico
-- 
Nicolas Petton
http://nicolas-petton.fr

Attachment: signature.asc
Description: PGP signature


reply via email to

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