From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Uberti Newsgroups: gmane.emacs.devel Subject: New define-key syntax with custom keymap Date: Tue, 19 Oct 2021 07:53:38 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24478"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 19 07:54:37 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mci57-0006Ch-C0 for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Oct 2021 07:54:37 +0200 Original-Received: from localhost ([::1]:49066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mci56-0006Ik-3U for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Oct 2021 01:54:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mci4I-0005c1-2X for emacs-devel@gnu.org; Tue, 19 Oct 2021 01:53:46 -0400 Original-Received: from devianza.investici.org ([198.167.222.108]:25321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mci4F-0000Mt-CF for emacs-devel@gnu.org; Tue, 19 Oct 2021 01:53:45 -0400 Original-Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4HYNGC51X0z6v6L for ; Tue, 19 Oct 2021 05:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1634622819; bh=L141a0HQ7wdxNHg0Ymro7mjPB1XScBmL0PwrbLsiSvY=; h=To:From:Subject:Date:From; b=fzET1t08O6sctr+6kFP9BUY0U+8bckhMuFTk85fPiajh8SiUYC6y6Ok4+ps/2Nwo3 whwNRJTDyPY3qKQO0aE5xfe4V7EhqC6wuy9qdYyPesd54dHiEqaBYcQ/SfKmqjrc4g RY/YpjMDNI2ynUyFGxxDPv880l5MuUC8wLsHXSIg= Original-Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: manuel.uberti@inventati.org) by localhost (Postfix) with ESMTPSA id 4HYNGC4FXZz6v3d for ; Tue, 19 Oct 2021 05:53:39 +0000 (UTC) Content-Language: en-GB Received-SPF: pass client-ip=198.167.222.108; envelope-from=manuel.uberti@inventati.org; helo=devianza.investici.org 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277336 Archived-At: Hi, following the recent changes on master, I am trying to use the new syntax to define key bindings. The following works as expected: (global-set-key ["C-M-z"] #'mu-indent-defun) But these do not work: (define-key mu-keys-mode-map ["C-"] #'mu-open-line-below) (define-key mu-keys-mode-map ["C-c C-n"] #'mu-cleanup-buffer) Whereas these work as expected: (define-key mu-keys-mode-map (kbd "C-") #'mu-open-line-below) (define-key mu-keys-mode-map "\C-c\C-n" #'mu-cleanup-buffer) For reference, mu-keys-mode-map comes from this code in my init.el: (defvar mu-keys-mode-map (make-keymap) "Keymap for command `mu-keys-mode'.") (define-minor-mode mu-keys-mode "Minor mode for my personal key bindings." :init-value t :global t :keymap mu-keys-mode-map :group 'local) (push `((mu-keys-mode . ,mu-keys-mode-map)) emulation-mode-map-alists) I am probably missing something, but I don't know what. -- Manuel Uberti www.manueluberti.eu