From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: define-key upon common-lisp-mode and inferior-lisp-mode Date: Tue, 30 Aug 2022 12:26:42 +0000 Message-ID: <7W8YIKpAyrHUHX3SntrisHnwBBj7wgmuFM_7SxKRuyyo1SeYNsqCgL4QAqmVoJ2n0YivGF1mUvpcaZi6mCDhD_6-O7Yzwj1WSBgriV2FQHI=@proton.me> References: <83o7w2ufa6.fsf@gnu.org> 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="32851"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 30 14:32:31 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 1oT0Pv-0008M9-4N for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 30 Aug 2022 14:32:31 +0200 Original-Received: from localhost ([::1]:42124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oT0Pu-0004hW-44 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 30 Aug 2022 08:32:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT0KX-00011Y-C3 for help-gnu-emacs@gnu.org; Tue, 30 Aug 2022 08:26:57 -0400 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:40121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oT0KU-0001vu-4d for help-gnu-emacs@gnu.org; Tue, 30 Aug 2022 08:26:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1661862404; x=1662121604; bh=+jrEFxacny1jcKlMEGzEuXuzbxUq7fh9NEqtiGHCsPU=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=I3Kbki5/0r/dqGYmpfOXG8Dnyex2UOKSnedQT1SxI5OCxQocm9G3PBSrMaziR4a+O 6i8pNhw2VFHFUlcfDVeH3QzFDjT1VbDtXamnESVxunWezQMh2P1W++chbk7som0i8o CKQC3woVMlX4bay+aUf3xS74hD5CxMvkUj1oPr+jMOQFhXPJcr7Uw82EC0pOGcbcDV bwJbM53E8lYpptVkBcwSIgEhfvkCmgieknB/w3rW8J8WldlMl74bnj0gOI6TWAjH9Y zQ2gUeYnZmpaT2MbGfeNWNevrFmAUxUF+/vtoXdjsvsYme/SGN3RpHBnuHbuwlzWRT 8opyW5rrLduag== In-Reply-To: <83o7w2ufa6.fsf@gnu.org> Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.40.140; envelope-from=uzibalqa@proton.me; helo=mail-40140.protonmail.ch 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, 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: 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:139161 Archived-At: ------- Original Message ------- On Tuesday, August 30th, 2022 at 11:44 AM, Eli Zaretskii wro= te: > > Date: Tue, 30 Aug 2022 06:59:01 +0200 (CEST) > > From: wilnerthomas--- via Users list for the GNU Emacs text editor help= -gnu-emacs@gnu.org > >=20 > > Have encountered "common-lisp-mode" but there does not exist "common-li= sp-mode-map". > >=20 > > Thusly (define-key common-lisp-mode-map KEY DEF) fails >=20 >=20 > Its doc string says: >=20 > In addition to any hooks its parent mode =E2=80=98lisp-data-mode=E2=80= =99 might have > run, this mode runs the hook =E2=80=98lisp-mode-hook=E2=80=99, as the fin= al or > penultimate step during initialization. >=20 > So this mode inherits the keymap from its parent, lisp-data-mode. >=20 > As for binding keys, it is better to use local-define-key, I think. > It will figure out the keymap for you. Like below? (local-define-key common-lisp-mode-map (kbd "H-e") #'eval-last-sexp) A bit non-standard compared to other modes.