From unknown Fri Jun 20 07:22:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67700 <67700@debbugs.gnu.org> To: bug#67700 <67700@debbugs.gnu.org> Subject: Status: 29.1; Minor keymap- commands documention issues Reply-To: bug#67700 <67700@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:22:12 +0000 retitle 67700 29.1; Minor keymap- commands documention issues reassign 67700 emacs submitter 67700 Howard Melman severity 67700 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 16:54:14 2023 Received: (at submit) by debbugs.gnu.org; 7 Dec 2023 21:54:14 +0000 Received: from localhost ([127.0.0.1]:43279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBMJy-0004c6-9N for submit@debbugs.gnu.org; Thu, 07 Dec 2023 16:54:14 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBMJs-0004bg-Uy for submit@debbugs.gnu.org; Thu, 07 Dec 2023 16:54:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBMJa-0004Ov-R2 for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 16:53:50 -0500 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBMJZ-0006yw-BG for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 16:53:50 -0500 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5b383b4184fso12087077b3.1 for ; Thu, 07 Dec 2023 13:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701986026; x=1702590826; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=RGQIdosTCtsTEXCLR1cYpW95dLj++u69fKYWl9zENjY=; b=e/HpvPG4g2k0a5byj59Dxkv+Cou/yab2F5jWmqn/2n4pyHtXCZAZji3X0+w0x6SQh0 f2b35IJpj3bk8vEaXA5UjdMz8xpMhBz2Famd6+QKNLXZicR4aYYBZeYNMCJj3ufemjRj cGng4YRIBcu08PgU0rQF4AlPLtaDqX5HIlh51v1ek/PNUlaC0nPLi0wMC+ZAmRygK46z 8Y51FWj4sNW18ZW2k1TDIVn/Avnw/OmGAN9AYf6rxT540bgX5YYImWLF0ZWBlPYzvsZE tL1BxHWFR1Qc4fkZ3ZzyF+mCljdIsJHLerL2nPOQ5X8Slpc2zeBkgZSvDeqq/VetQasU C8rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701986026; x=1702590826; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RGQIdosTCtsTEXCLR1cYpW95dLj++u69fKYWl9zENjY=; b=TlKUT7N9CYIqcvO6l0q57MYqx4gNnoyq9p2ajRowXwgOCxSTX2sDS/fjeWTJj1D/lz 6JgA7LR2f8lOpOOzlq6ir/LIy49qNOcQP63fxKKiSS63O4X+i80LR9Mye/6YKpUmuZLd fHpMYsCy1ndXpG5qlSkz9p0YbMjLavF+IfcscOShhT7badEcJyq0SXIWCSoPzkSue/Yn OyizuxAHBYWDt0h7Zjyp7YQvwnP6VStHOVlTqqIF+cQSe0gY7DmP/SDwF0nlt0O1PPHo +gPpBpGpfdntBlmXn4RBBNua8EQxo2YYcXT1h8kv4kCufeW5dc8fXoPgTP7c36qDPr24 B3ew== X-Gm-Message-State: AOJu0YzIeqaQtC7vHzyU8ef/mpSG6eWuvAcnGdqGEWWvPwpRTTIDFL7/ r8EZKTPMPMHMV45Oujh570ee8Un+7Ag= X-Google-Smtp-Source: AGHT+IFz94fEPmkZzT2tszQ6R5xqIb/wxsfhjKGPwPEhnTSt7c9kXWwMFtLHxhNgfyedhfPNCQnYbQ== X-Received: by 2002:a81:9f11:0:b0:5d7:1940:7d8f with SMTP id s17-20020a819f11000000b005d719407d8fmr2919271ywn.102.1701986026278; Thu, 07 Dec 2023 13:53:46 -0800 (PST) Received: from smtpclient.apple (pool-108-26-231-137.bstnma.fios.verizon.net. [108.26.231.137]) by smtp.gmail.com with ESMTPSA id p15-20020a0cf68f000000b0066d12d1351fsm226650qvn.143.2023.12.07.13.53.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2023 13:53:45 -0800 (PST) From: Howard Melman Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: 29.1; Minor keymap- commands documention issues Message-Id: <5320A546-FCE6-4131-B3F9-AFC8513D034D@gmail.com> Date: Thu, 7 Dec 2023 16:53:34 -0500 To: GNU Emacs X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=hmelman@gmail.com; helo=mail-yw1-x1130.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Is there an advantage to calls to keymap-set (and keymap-global-set) using #' for the command definition? IIUC it is a compiler hint that the symbol is a function. Most examples in the emacs manual (e.g., 50.3.6 Rebinding Keys in Your Init File) just use ' not #', but the 50.3.7 Modifier Keys section says: (keymap-global-set "C-S-n" #'previous-line) Grepping the emacs sources shows both styles are used in code. If #' is preferred with the keymap commands, the examples should use it and if not, IMHO it's worth mentioning in the manual that using #' is unnecessary as this was a common question of newbies copying config snippets before the keymap commands. Also, I found the following idiom useful in my init for defining several bindings at once in an existing map: (define-keymap :keymap (current-global-map) "M-u" #'upcase-dwim ; was upcase-word "M-l" #'downcase-dwim ; was downcase-word "M-/" #'hippie-expand ; was dabbrev-expand "M-$" #'lookup-word-at-point) I didn't see anywhere in the emacs manual on keybinding customization an example of how to define multiple bindings at once in the same keymap. This terse style is IMHO cleaner than repeated calls to keymap-global-set. When reading the docs on the new keymap commands, how to do this on an existing keymap wasn't obvious to me. It is mentioned in the elisp manual but just in the description of :keymap which is the 3rd keyword in a list of 6, without any example. I think it would be useful to have an example of doing this some place (maybe section 50.3.6 in the emacs manual); that is calling define-keymap with :keymap and perhaps specifically using (current-global-map) as that wasn't on my radar before either. In GNU Emacs 29.1 (build 1, x86_64-apple-darwin21.6.0, Carbon Version 165 AppKit 2113.6) of 2023-08-08 built on Mac-1691500888998.local -- Howard From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 01:27:35 2023 Received: (at 67700) by debbugs.gnu.org; 8 Dec 2023 06:27:36 +0000 Received: from localhost ([127.0.0.1]:43642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBUKl-00079V-9b for submit@debbugs.gnu.org; Fri, 08 Dec 2023 01:27:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBUKj-00079H-G2 for 67700@debbugs.gnu.org; Fri, 08 Dec 2023 01:27:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBUKR-0006Za-C8; Fri, 08 Dec 2023 01:27:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xKTfMOApw1rjuPe1bn0ybjdjIg6FzJL7itW7IiteAco=; b=anJXEMM8VR8m eCi6FBykaK61Y8yb9dA0+vO7aHHHUMtVliTJQuMe/EgDIYocBAUhFYnJPs86sZxzuwUxoW1/vEjPX sfVpIZVGj1C3haYBr96QeMjy8dDtbpRFBw8LzVQAJnsLpf4VIrzUPN5YDU+qPcQwoYpByB4A0PYjf jNPKCETn4bmcPfO0nC5J6tIgIeQyPnbJ+Ck+tQJOOqBzRtOVq8MK/3gkIg7Y8k0YldCL9rVN7iWL/ GU1ArMFL1VeS/5ezIm+UdOyPTdYlwmh/N7n16W/Y7frM75/y1XBZtDl5UrupNXHhkkCJ5dtK4iyn4 s5kfyfgfqIel9vI2ZANhIQ==; Date: Fri, 08 Dec 2023 08:27:29 +0200 Message-Id: <83msul1a5q.fsf@gnu.org> From: Eli Zaretskii To: Howard Melman In-Reply-To: <5320A546-FCE6-4131-B3F9-AFC8513D034D@gmail.com> (message from Howard Melman on Thu, 7 Dec 2023 16:53:34 -0500) Subject: Re: bug#67700: 29.1; Minor keymap- commands documention issues References: <5320A546-FCE6-4131-B3F9-AFC8513D034D@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67700 Cc: 67700@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Howard Melman > Date: Thu, 7 Dec 2023 16:53:34 -0500 > > Is there an advantage to calls to keymap-set (and > keymap-global-set) using #' for the command definition? > IIUC it is a compiler hint that the symbol is a > function. Most examples in the emacs manual (e.g., 50.3.6 > Rebinding Keys in Your Init File) just use ' not #', but the > 50.3.7 Modifier Keys section says: > > (keymap-global-set "C-S-n" #'previous-line) > > Grepping the emacs sources shows both styles are used in > code. If #' is preferred with the keymap commands, the > examples should use it and if not, IMHO it's worth > mentioning in the manual that using #' is unnecessary as > this was a common question of newbies copying config > snippets before the keymap commands. > > > Also, I found the following idiom useful in my init for > defining several bindings at once in an existing map: > > (define-keymap :keymap (current-global-map) > "M-u" #'upcase-dwim ; was upcase-word > "M-l" #'downcase-dwim ; was downcase-word > "M-/" #'hippie-expand ; was dabbrev-expand > "M-$" #'lookup-word-at-point) > > I didn't see anywhere in the emacs manual on keybinding > customization an example of how to define multiple bindings > at once in the same keymap. This terse style is IMHO > cleaner than repeated calls to keymap-global-set. > > When reading the docs on the new keymap commands, how to do > this on an existing keymap wasn't obvious to me. It is > mentioned in the elisp manual but just in the description of > :keymap which is the 3rd keyword in a list of 6, without any > example. > > I think it would be useful to have an example of doing this > some place (maybe section 50.3.6 in the emacs manual); that > is calling define-keymap with :keymap and perhaps > specifically using (current-global-map) as that wasn't on my > radar before either. Thanks. Patches for the manual to improve these parts will be very welcome. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 22 10:00:58 2023 Received: (at control) by debbugs.gnu.org; 22 Dec 2023 15:00:58 +0000 Received: from localhost ([127.0.0.1]:47574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGh1G-0006Fw-Cf for submit@debbugs.gnu.org; Fri, 22 Dec 2023 10:00:58 -0500 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:51546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGh1E-00062P-Er for control@debbugs.gnu.org; Fri, 22 Dec 2023 10:00:56 -0500 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso2436339a12.3 for ; Fri, 22 Dec 2023 07:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703257246; x=1703862046; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=VBgtKDBRwkdGORmN1+tbRoulpntVMsow2wsyEavcMWw=; b=CkKFuC9X0Uxxd859qT4I1Wl3yvb6wvLCpgI6oV8rlLWOy8c2MypcgQelFONL0Wknmv ilk+GnBHEZAyZf89arAdkOekhsxxCw66bxonk/N5WldnaZW2ohsemgWzerhnL1CC/hs7 iY3srom2orZZhSdqs4RDu2if9RTXpCmsY3k4NyrOoiCQ9tpHlmfXsx4K6kMJ8ubbHcIZ rBCkmmcAo/teg5IOn7Az4yzTi8ulf856OTI1dViLCTs77yJpxSWKEUhRtXziByBdXZRG OZ208AvL6Q04mtpjsnbC5WpAOZWmmMPn39hiYXw1RjnhmrmEIN7xGaAcr19hD1ZJ1aSs PmQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257246; x=1703862046; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=VBgtKDBRwkdGORmN1+tbRoulpntVMsow2wsyEavcMWw=; b=L70rUW50Ml2PVUK1jQ/BEjS/MbWF+SH0SYCbrUKb6rj70uKwN444A0PczePgMvkMHV A/6zzNaAMu6KKL/Bh6P7iPrcKFbepeuXjQJi47QqJ/Pv1Cwm2FKujCFSCX3REJYgCHWb j2Bx+xgTtoJimONmLbZWxaqd/1XLTbl2AjPUm3OB3FonwzlLB4/Ms3w9ym+9UhILuEMf uKwI7NvdGQrlOe+rQbP+1baIy6jkfGLc3myzBLXYwyk/kgbbQw5t4GTwUghNtBI0Lroi S7MZ7jz8mHW6goRR+hrCYHL1AqTKveboRyXYNfzQwvDjRY3cVGtcYkV2aFco02Sbx2oO 50EQ== X-Gm-Message-State: AOJu0YzjgyTc6mAY+hJ2mba5oZRIkEch/zNm+sI5CtJTtu9QH5Zm6Has n/Omw8uCNOkUDcme/sDQZIyJCgK+DoXBbL0aFIhK0wmdCgGIPQ== X-Google-Smtp-Source: AGHT+IHkCczxC66mwEMnuh/zkiOB/A6H0j8atTyn3Xi1fv0YIKOSKfeToX5WErk70nVnDT0j2bTGP5icNs9dTgUskvo= X-Received: by 2002:a50:a414:0:b0:54c:4837:8b6e with SMTP id u20-20020a50a414000000b0054c48378b6emr764691edb.60.1703257246014; Fri, 22 Dec 2023 07:00:46 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Dec 2023 07:00:45 -0800 From: Stefan Kangas MIME-Version: 1.0 Date: Fri, 22 Dec 2023 07:00:45 -0800 Message-ID: Subject: control message for bug #67700 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 67700 minor quit