GNU bug report logs -
#49407
Request: Specify default values in `map-let` in Map.el
Previous Next
Reported by: Okam <okamsn <at> protonmail.com>
Date: Sun, 4 Jul 2021 23:10:01 UTC
Severity: wishlist
Fixed in version 30.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello,
`map-let` allows one to conveniently bind variables using `map-elt`, but
does not provide a way specify a default value if a key is missing.
With `map-elt`, one can use the optional third argument to specify this
value. It would be good to have this in `map-let` as well.
For example, maybe it could look something like
;; As just a third value in the list:
(let ((map '(:a 1 :b 2)))
(map-let ((:a a)
(:b b)
(:c c 3))
map
(+ a b c)))
or
;; More like Common Lisp arg-list for `&key'.
(let ((map '(:a 1 :b 2)))
(map-let ((:a a)
(:b b)
(:c (c 3)))
map
(+ a b c)))
Please consider adding this feature.
Thank you.
This bug report was last modified 2 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.