* Re: [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt.
[not found] ` <E1YlhaV-00046m-Qq@vcs.savannah.gnu.org>
@ 2015-04-25 9:49 ` Artur Malabarba
2015-04-25 9:56 ` Nicolas Petton
0 siblings, 1 reply; 3+ messages in thread
From: Artur Malabarba @ 2015-04-25 9:49 UTC (permalink / raw)
To: emacs-devel, Nicolas Petton; +Cc: emacs-diffs
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
> "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?
[-- Attachment #2: Type: text/html, Size: 496 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt.
2015-04-25 9:49 ` [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt Artur Malabarba
@ 2015-04-25 9:56 ` Nicolas Petton
2015-04-25 10:27 ` Artur Malabarba
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Petton @ 2015-04-25 9:56 UTC (permalink / raw)
To: bruce.connor.am; +Cc: Nicolas Petton, emacs-diffs, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: map f37e265 1/4: Minor improvement in map-elt.
2015-04-25 9:56 ` Nicolas Petton
@ 2015-04-25 10:27 ` Artur Malabarba
0 siblings, 0 replies; 3+ messages in thread
From: Artur Malabarba @ 2015-04-25 10:27 UTC (permalink / raw)
To: Nicolas Petton; +Cc: emacs-diffs, emacs-devel
👍
_______________________________________________
Emacs-diffs mailing list
Emacs-diffs@gnu.org
https://lists.gnu.org/mailman/listinfo/emacs-diffs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-25 10:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150424174027.15728.66048@vcs.savannah.gnu.org>
[not found] ` <E1YlhaV-00046m-Qq@vcs.savannah.gnu.org>
2015-04-25 9:49 ` [Emacs-diffs] map f37e265 1/4: Minor improvement in map-elt Artur Malabarba
2015-04-25 9:56 ` Nicolas Petton
2015-04-25 10:27 ` Artur Malabarba
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.