From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu 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 18:29:08 +0800 Message-ID: <87o7k95x8r.fsf@yahoo.com> References: Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33196"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64699-done@debbugs.gnu.org To: uzibalqa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 18 12:30:21 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 1qLhyG-0008RZ-Ie for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jul 2023 12:30:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLhy2-0006RB-6z; Tue, 18 Jul 2023 06:30:06 -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 1qLhxz-0006Qn-Tn for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 06:30:03 -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 1qLhxz-0006eO-F0 for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 06:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLhxz-0004z5-4A for bug-gnu-emacs@gnu.org; Tue, 18 Jul 2023 06:30:03 -0400 Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jul 2023 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 64699 X-GNU-PR-Package: emacs Mail-Followup-To: 64699@debbugs.gnu.org, luangruo@yahoo.com, uzibalqa@proton.me Original-Received: via spool by 64699-done@debbugs.gnu.org id=D64699.168967616919086 (code D ref 64699); Tue, 18 Jul 2023 10:30:02 +0000 Original-Received: (at 64699-done) by debbugs.gnu.org; 18 Jul 2023 10:29:29 +0000 Original-Received: from localhost ([127.0.0.1]:51623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLhxQ-0004xl-SW for submit@debbugs.gnu.org; Tue, 18 Jul 2023 06:29:29 -0400 Original-Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]:34654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLhxN-0004xS-Ho for 64699-done@debbugs.gnu.org; Tue, 18 Jul 2023 06:29:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1689676159; bh=7CmutRjlnETMZZxQZ3rbJ6aUH6Tr40kDu0fjWemBgQ4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=h7c8tk1rCqnYT8kwuRuYy9aISbWNJYEH3XnGk8tMC1TndAIjWodk26GG3ugyoPD7S5x4QbohgrlMDJVJTVMKKAUCM03uVzU+S4oFAOrn/lflWZbOWbXdMP3AkQv6rL/ZUj/smvlMoDBA1cVNSdjK+XgCRIgr+q6yLB7U7Uhf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k0prCHjI5tV1IaS1J92kl8lIZiYkVcJuCQ5z2girq39Mh148b6Opw vrRto7_2yizNmtEH1n2b5bIFncGmueQFqHC_1kOyZ5oim6u.4du6eYbRlnraYv.wUPQOVRtALxee TA8Gz0OuJHWMH2nBsacSteMksiRGpdzs40BwvIqt2SqIx5brHsxWGPUlPC8SOwC7y8cBvHo.lx2n DNZqfOFzC31AwA5BxCwdVI0HSHgLQWLXvaJ1OlxwdkURu_2QOwRr6SPk3WiqeQgkWUbc1pNEFrZI GZ2gP7AF_tyC5_Hl0E24aYupABpBmuuKXYy3A3Z9vsgu4vBT41W8APEoJYC1NakD5VFiNd7.4nWG mPGRdD97Yq1lh9D4PeLtAPzokIuEHohOsnmoEjvHPcZMk2qy4LGZ92.2o1tzvhlNGzx27BOcJxPT 3DDXskx9y_0sF_Fw91PuJMbN2igHmrmbYqSXzyBtKi X-Sonic-MF: X-Sonic-ID: 1ad001e9-046a-4f32-b6cf-7661c865f20f Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Tue, 18 Jul 2023 10:29:19 +0000 Original-Received: by hermes--production-sg3-9dc5f54fc-65zvp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID b001238d3d263b2b946cfdf6cc5fa9ad; Tue, 18 Jul 2023 10:29:13 +0000 (UTC) In-Reply-To: (uzibalqa@proton.me's message of "Tue, 18 Jul 2023 10:00:06 +0000") X-Mailer: WebService/1.1.21647 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:265432 Archived-At: uzibalqa writes: > It is recommended that 'keymap-set-after' is used instead of 'define-key-= after'. > > But replacing > > (defvar mcp-kdf (make-sparse-keymap "MCP")) > (define-key-after global-map > [menu-bar mcp-topm] (cons "MCP" mcp-kdf) 'tools) > > with=20 > > (defvar mcp-kdf (make-sparse-keymap "MCP")) > (keymap-set-after global-map > [menu-bar mcp-topm] (cons "MCP" mcp-kdf) 'tools) > > gives the following error > > (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=20 > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specif= ic-command-prefix delete-char move-end-of-line forward-char keyboard-quit h= elp-command indent-for-tab-command electric-newline-and-maybe-indent kill-l= ine recenter-top-bottom newline next-line open-line previous-line quoted-in= sert isearch-backward isearch-forward transpose-chars universal-argument sc= roll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefix = toggle-input-method abort-recursive-edit nil undo self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = ...] #^^[1 0 #^^[2 0=20 > #^^[3 0 set-mark-command move-beginning-of-line backward-char mode-specif= ic-command-prefix delete-char move-end-of-line forward-char keyboard-quit h= elp-command indent-for-tab-command electric-newline-and-maybe-indent kill-l= ine recenter-top-bottom newline next-line open-line previous-line quoted-in= sert isearch-backward isearch-forward transpose-chars universal-argument sc= roll-up-command kill-region Control-X-prefix yank suspend-frame ESC-prefix = toggle-input-method abort-recursive-edit nil undo self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = ...] self-insert-command self-insert-command self-insert-command self-inser= t-command self-insert-command self-insert-command self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = self-insert-command self-insert-command self-insert-command self-insert-com= mand self-insert-command self-insert-command self-insert-command self-inser= t-command self-insert-command self-insert-command self-insert-command self-= insert-command self-insert-command self-insert-command self-insert-command = self-insert-command self-insert-command self-insert-command self-insert-com= mand self-insert-command] self-insert-command self-insert-command self-inse= rt-command self-insert-command self-insert-command self-insert-command self= -insert-command self-insert-command self-insert-command self-insert-command= self-insert-command self-insert-command self-insert-command self-insert-co= mmand 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-ins= ert-command ...] (67108908 . text-scale-decrease) (67108910 . text-scale-in= crease) (f5 . modus-themes-toggle) (paste . clipboard-yank) (copy . clipboa= rd-kill-ring-save) (cut . clipboard-kill-region) (f18 . clipboard-yank) (f1= 6 . 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-do= wn . mouse-wheel-global-text-scale) (C-M-wheel-up . mouse-wheel-global-text= -scale) (C-M-mouse-5 . mouse-wheel-global-text-scale) (C-M-mouse-4 . mouse-= wheel-global-text-scale) (M-wheel-right . mwheel-scroll) (M-wheel-left . mw= heel-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-s= croll) (M-mouse-4 . mwheel-scroll) (S-wheel-right . mwheel-scroll) (S-wheel= -left . mwheel-scroll) (S-wheel-down . mwheel-scroll) (S-wheel-up . mwheel-= 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 mc= p-topm] ("MCP" keymap "MCP") tools) > mcp-menubar() > eval-buffer(# nil "/home/hagbard/Opstk/bin/gunga= din-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) The documentation does not mention or imply that `keymap-set-after' accepts the same key sequence format as `define-key-after'. And indeed it does not. Closing.