From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Deprecation of define-key? Date: Sun, 31 Jul 2022 09:48:27 +0300 Message-ID: References: <875yjgszm4.fsf@posteo.net> <87mtcr99mx.fsf@igel.home> <871qu2lt68.fsf@fau.de> <87sfmizump.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8220"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-06-11) Cc: Philip Kaludercic , Andreas Schwab , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 31 09:07:20 2022 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 1oI32l-0001vE-Id for ged-emacs-devel@m.gmane-mx.org; Sun, 31 Jul 2022 09:07:19 +0200 Original-Received: from localhost ([::1]:39378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oI32k-0002c4-Ac for ged-emacs-devel@m.gmane-mx.org; Sun, 31 Jul 2022 03:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI31U-0001Xr-Sx for emacs-devel@gnu.org; Sun, 31 Jul 2022 03:06:00 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:58797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oI31S-0004jG-Vg for emacs-devel@gnu.org; Sun, 31 Jul 2022 03:06:00 -0400 Original-Received: from localhost ([::ffff:154.231.113.136]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000A5AF5.0000000062E629AE.000028A4; Sun, 31 Jul 2022 00:05:17 -0700 Mail-Followup-To: Lars Ingebrigtsen , Philip Kaludercic , Andreas Schwab , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <87sfmizump.fsf@gnus.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:292896 Archived-At: * Lars Ingebrigtsen [2022-07-30 14:51]: > Philip Kaludercic writes: > > > That is obvious, the question is should package developers avoid using > > `define-key' if possible or not? > > As the doc string says -- `keymap-set' is the recommended function to > use. However, `define-key' is not (and won't be) obsoleted, so it's up > to them to follow the recommendation (or not). After replacing `define-key' with `keymap-set' I got following: Debugger entered--Lisp error: (error "[8388710] is not a valid key definition; see ‘key-valid-p’") signal(error ("[8388710] is not a valid key definition; see ‘key-...")) error("%S is not a valid key definition; see `key-valid-p..." [8388710]) keymap--check([8388710]) for this definition: (keymap-set dired-mode-map (kbd "s-f") 'cf-file-for-person) So how I am supposed to make it work? I need to use the super key and F to file files under person's directory. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/