From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: define-key upon common-lisp-mode and inferior-lisp-mode Date: Tue, 30 Aug 2022 14:44:33 +0300 Message-ID: <83o7w2ufa6.fsf@gnu.org> References: 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="27346"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 30 13:53:05 2022 Return-path: Envelope-to: geh-help-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 1oSznk-0006zp-V8 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 30 Aug 2022 13:53:04 +0200 Original-Received: from localhost ([::1]:38966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSznk-0002f5-18 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 30 Aug 2022 07:53:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSzf9-0006tX-77 for help-gnu-emacs@gnu.org; Tue, 30 Aug 2022 07:44:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSzf8-00017G-Sf for help-gnu-emacs@gnu.org; Tue, 30 Aug 2022 07:44:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=4/eKvpePgFNCnNx+cJytILYnsQVcLD2siyCFg8Iv+cQ=; b=asbCUt3OTV/c/geat1Wm XyWpYQuzYlaAigAsyy2tx8gOqG6vUTokcHHM6+k+TGWUitMNZ/KG0mhQVI5lEFif8Mob3TWBR3bw0 dW3hr/i+OT6o+QDsHdCqeQO0x2Myo9d0uKPbvBBDierhDo33utcDBIDxOSFRhTCZAMqJEPPqnautK odAVPhftz7n1i/Z90IyCF6uf/ucCwFVlZeY2n3VOS4H1+HQ1vWPMG4tNdx5pnGMXu/lHv3StHO8Ca nc9/A0yuIfKKKedq0296FU4NxrYlwEEpJqYr0Fsq3x0E9ybFzUFZiTG/AFGYEgQhLYUl+ANu/hphz C53QZfa3AiygHA==; Original-Received: from [87.69.77.57] (port=3113 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSzf7-0007gO-A3 for help-gnu-emacs@gnu.org; Tue, 30 Aug 2022 07:44:09 -0400 In-Reply-To: (message from wilnerthomas--- via Users list for the GNU Emacs text editor on Tue, 30 Aug 2022 06:59:01 +0200 (CEST)) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139160 Archived-At: > Date: Tue, 30 Aug 2022 06:59:01 +0200 (CEST) > From: wilnerthomas--- via Users list for the GNU Emacs text editor > > Have encountered "common-lisp-mode" but there does not exist "common-lisp-mode-map". > > Thusly  (define-key common-lisp-mode-map KEY DEF) fails Its doc string says: In addition to any hooks its parent mode ‘lisp-data-mode’ might have run, this mode runs the hook ‘lisp-mode-hook’, as the final or penultimate step during initialization. So this mode inherits the keymap from its parent, lisp-data-mode. As for binding keys, it is better to use local-define-key, I think. It will figure out the keymap for you.