From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Okam via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#49407: Request: Specify default values in `map-let` in Map.el Date: Sun, 04 Jul 2021 23:08:55 +0000 Message-ID: Reply-To: Okam Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34148"; mail-complaints-to="usenet@ciao.gmane.io" To: 49407@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 05 01:10:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m0BFe-0008aS-I3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jul 2021 01:10:14 +0200 Original-Received: from localhost ([::1]:60710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0BFd-0007AM-JK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jul 2021 19:10:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0BFS-00079z-57 for bug-gnu-emacs@gnu.org; Sun, 04 Jul 2021 19:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0BFR-0002yP-St for bug-gnu-emacs@gnu.org; Sun, 04 Jul 2021 19:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0BFR-0000GV-LS for bug-gnu-emacs@gnu.org; Sun, 04 Jul 2021 19:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Okam Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jul 2021 23:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49407 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1625440184989 (code B ref -1); Sun, 04 Jul 2021 23:10:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jul 2021 23:09:44 +0000 Original-Received: from localhost ([127.0.0.1]:43370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0BFA-0000Ft-5W for submit@debbugs.gnu.org; Sun, 04 Jul 2021 19:09:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0BF8-0000Fl-HF for submit@debbugs.gnu.org; Sun, 04 Jul 2021 19:09:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0BF8-00079i-11 for bug-gnu-emacs@gnu.org; Sun, 04 Jul 2021 19:09:42 -0400 Original-Received: from mail-0201.mail-europe.com ([51.77.79.158]:53591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0BF5-0002jo-PY for bug-gnu-emacs@gnu.org; Sun, 04 Jul 2021 19:09:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1625440142; bh=wcaKqNwwgwsj1RdEFdAqMUHyiqXoWBqNzmUNEG83wg8=; h=Date:To:From:Reply-To:Subject:From; b=Rij8S2pOkxKVNX3V8JYsSKXarTZwXSS0LORGJKVqMp+rkRXZgPW5m9kVHpbWfyx3w 6ltR3e1SO+hhyy0vsVPsh3k5T0BziqAjd8BxZsRwNjKvXnaqNN40CSFSOzEsXZy2KF 96Vg2hYbS122XvV1MSxmj5VTiVObEJZRuzTX6zkw= Received-SPF: pass client-ip=51.77.79.158; envelope-from=okamsn@protonmail.com; helo=mail-0201.mail-europe.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" X-ACL-Warn: , Okam Xref: news.gmane.io gmane.emacs.bugs:209432 Archived-At: 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.