From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64699: Invalid key definition for keymap-set-after Date: Tue, 18 Jul 2023 12:37:33 +0000 Message-ID: References: <87o7k95x8r.fsf@yahoo.com> Reply-To: uzibalqa 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="14709"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64699-done@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 18 14:38:22 2023 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 1qLjy9-0003dr-RK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jul 2023 14:38:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLjxt-0002FJ-4W; Tue, 18 Jul 2023 08:38:05 -0400 Original-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 1qLjxq-0002BG-Ri for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:38:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qLjxq-00037r-K5 for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLjxq-0002nW-CV for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 08:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: uzibalqa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jul 2023 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64699 X-GNU-PR-Package: emacs Original-Received: via spool by 64699-done@debbugs.gnu.org id=D64699.168968388110747 (code D ref 64699); Tue, 18 Jul 2023 12:38:02 +0000 Original-Received: (at 64699-done) by debbugs.gnu.org; 18 Jul 2023 12:38:01 +0000 Original-Received: from localhost ([127.0.0.1]:52003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLjxo-0002nG-Cb for submit@debbugs.gnu.org; Tue, 18 Jul 2023 08:38:00 -0400 Original-Received: from mail-4027.protonmail.ch ([185.70.40.27]:32101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLjxj-0002n0-Tk for 64699-done@debbugs.gnu.org; Tue, 18 Jul 2023 08:37:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=trdd2m4zubg2zlkgcattzer264.protonmail; t=1689683868; x=1689943068; bh=mlOX8lYqGjGNrood9yX+vj79sjXPhQs0a2rYcl1eOOc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=f+6hI/HsH49Jqa4KQ2rs8OAcC+w2q6jXWvkLDprIDIUNQO83XnD4AcIrz24mnpmhc uSesh8Cog9U0L3p6SjZOfgvHk5Rg4sZr4dPTsKXyLxoujI8dv4YQKHwPYZPhwk5Ael Is60utxtPkWmC9B2Gi8n5dE7hiKPQMurwt8mOtzcLjl1TUcYq2tQKNJQBMioyY4Ds7 yZlTGKpNHKo+/tw2TAH7F3pzYcFAqDqdBAU/qqGwrg5dUDNwlYouuD4XIyAw4O8fw2 GttAyGpgw2JEumBV9AY+3f6gNRF8IrMGrbiwJxJRcUad1TSLk3TLqVtIvkr8nwn9S6 SbvnYXexJ1xeQ== In-Reply-To: <87o7k95x8r.fsf@yahoo.com> Feedback-ID: 52887082:user:proton 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265452 Archived-At: ------- Original Message ------- On Tuesday, July 18th, 2023 at 10:29 PM, Po Lu wrote: > uzibalqa uzibalqa@proton.me writes: >=20 > > It is recommended that 'keymap-set-after' is used instead of 'define-ke= y-after'. > >=20 > > But replacing > >=20 > > (defvar mcp-kdf (make-sparse-keymap "MCP")) > > (define-key-after global-map > > [menu-bar mcp-topm] (cons "MCP" mcp-kdf) 'tools) > >=20 > > with > >=20 > > (defvar mcp-kdf (make-sparse-keymap "MCP")) > > (keymap-set-after global-map > > [menu-bar mcp-topm] (cons "MCP" mcp-kdf) 'tools) > >=20 > > gives the following error > >=20 > > (error "[menu-bar mcp-topm] is not a valid key definition;...") > > signal(error ("[menu-bar mcp-topm] is not a valid key definition;...")) > > error("%S is not a valid key definition; see `key-valid-p..." [menu-bar= mcp-topm]) > > keymap--check([menu-bar mcp-topm]) > > keymap-set-after((keymap #^[nil nil keymap > > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-spec= ific-command-prefix delete-char move-end-of-line forward-char keyboard-quit= help-command indent-for-tab-command electric-newline-and-maybe-indent kill= -line recenter-top-bottom newline next-line open-line previous-line quoted-= insert isearch-backward isearch-forward transpose-chars universal-argument = scroll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefi= x toggle-input-method abort-recursive-edit nil undo self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d ...] #^^[1 0 #^^[2 0 > > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-spec= ific-command-prefix delete-char move-end-of-line forward-char keyboard-quit= help-command indent-for-tab-command electric-newline-and-maybe-indent kill= -line recenter-top-bottom newline next-line open-line previous-line quoted-= insert isearch-backward isearch-forward transpose-chars universal-argument = scroll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefi= x toggle-input-method abort-recursive-edit nil undo self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d ...] self-insert-command self-insert-command self-insert-command self-ins= ert-command self-insert-command self-insert-command self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d self-insert-command self-insert-command self-insert-command self-insert-c= ommand self-insert-command self-insert-command self-insert-command self-ins= ert-command self-insert-command self-insert-command self-insert-command sel= f-insert-command self-insert-command self-insert-command self-insert-comman= d self-insert-command self-insert-command self-insert-command self-insert-c= ommand self-insert-command] self-insert-command self-insert-command self-in= sert-command self-insert-command self-insert-command self-insert-command se= lf-insert-command self-insert-command self-insert-command self-insert-comma= nd self-insert-command self-insert-command self-insert-command self-insert-= command self-insert-command] self-insert-command self-insert-command self-i= nsert-command self-insert-command self-insert-command self-insert-command s= elf-insert-command self-insert-command self-insert-command self-insert-comm= and self-insert-command self-insert-command self-insert-command self-insert= -command self-insert-command self-insert-command self-insert-command self-i= nsert-command self-insert-command self-insert-command self-insert-command s= elf-insert-command self-insert-command self-insert-command self-insert-comm= and self-insert-command self-insert-command self-insert-command self-insert= -command self-insert-command self-insert-command self-insert-command self-i= nsert-command ...] (67108908 . text-scale-decrease) (67108910 . text-scale-= increase) (f5 . modus-themes-toggle) (paste . clipboard-yank) (copy . clipb= oard-kill-ring-save) (cut . clipboard-kill-region) (f18 . clipboard-yank) (= f16 . clipboard-kill-ring-save) (f20 . clipboard-kill-region) (C-wheel-down= . mouse-wheel-text-scale) (C-wheel-up . mouse-wheel-text-scale) (C-mouse-5= . mouse-wheel-text-scale) (C-mouse-4 . mouse-wheel-text-scale) (C-M-wheel-= down . mouse-wheel-global-text-scale) (C-M-wheel-up . mouse-wheel-global-te= xt-scale) (C-M-mouse-5 . mouse-wheel-global-text-scale) (C-M-mouse-4 . mous= e-wheel-global-text-scale) (M-wheel-right . mwheel-scroll) (M-wheel-left . = mwheel-scroll) (M-wheel-down . mwheel-scroll) (M-wheel-up . mwheel-scroll) = (M-mouse-7 . mwheel-scroll) (M-mouse-6 . mwheel-scroll) (M-mouse-5 . mwheel= -scroll) (M-mouse-4 . mwheel-scroll) (S-wheel-right . mwheel-scroll) (S-whe= el-left . mwheel-scroll) (S-wheel-down . mwheel-scroll) (S-wheel-up . mwhee= l-scroll) (S-mouse-7 . mwheel-scroll) (S-mouse-6 . mwheel-scroll) (S-mouse-= 5 . mwheel-scroll) (S-mouse-4 . mwheel-scroll) (wheel-right . mwheel-scroll= ) (wheel-left . mwheel-scroll) (wheel-down . mwheel-scroll) ...) [menu-bar = mcp-topm] ("MCP" keymap "MCP") tools) > > mcp-menubar() > > eval-buffer(# nil "/home/hagbard/Opstk/bin/gungadin= -1.0/typex/oktant/..." nil t) ; Reading at buffer position 10068 > > load-with-code-conversion("/home/hagbard/Opstk/bin/gungadin-1.0/typex/o= ktant/..." "/home/hagbard/Opstk/bin/gungadin-1.0/typex/oktant/..." nil t) > > require(mcp) >=20 >=20 > The documentation does not mention or imply that `keymap-set-after' accep= ts the same key sequence format as` define-key-after'. And indeed > it does not. How is it supposed to be used then. You request people to change but do ne= t help them=20 move forward. What declaration would `keymap-set-after' use ? =20 > Closing.