From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: diff-goto-source hi-jacks my M-o Date: Sun, 27 Dec 2020 16:09:22 +0100 Message-ID: <87blef70bh.fsf@posteo.net> References: <87imf2gdnp.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <87y2nx5472.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> <87pn985rwz.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> 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="20589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Dmitry Alexandrov Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 27 16:10:35 2020 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 1ktXgo-0005IP-Tt for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 16:10:34 +0100 Original-Received: from localhost ([::1]:55326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktXgo-0005eJ-0Q for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 27 Dec 2020 10:10:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktXfl-0005dV-8z for help-gnu-emacs@gnu.org; Sun, 27 Dec 2020 10:09:29 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:34591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktXfi-0004yQ-R1 for help-gnu-emacs@gnu.org; Sun, 27 Dec 2020 10:09:28 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 7B99E2400FD for ; Sun, 27 Dec 2020 16:09:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1609081763; bh=hoDlc8mPTSWSBtxMBXJBPqPCqUHLSC8MqUWyh68oz2k=; h=From:To:Cc:Subject:Date:From; b=nnZN0lv43H9u6OEVvQZRm1FS7xt3hnOENd7/ifUZa7EGdXY/YW628SELTW9oJlfoP IKXlu8WFCqGMZ2QNRI4be2tjaPCpzn/Gcd6hXYhriukz5qGcRYFUFPOC02+LVQVUgk VSoIBTZ6Rr4R9u3F7OdfyfTCgzpXcL+33AQ84mn0yLosEu3LwjJ2WldJJkTB39w6fW +lAN0PrPFO0QwTPNEUeY23ASS1XGWlCxSIdpnYTBmiALCqm7gVvi1iA0JtBWAFN96h rk8+TD/t36XPIm+QoqIZrsMJ0dVrS7P28AcfmaTdk76f8uroGfbAJKx4MXLPRP967m 9alugnbG1r4rg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4D3kc25cbBz6tmJ; Sun, 27 Dec 2020 16:09:22 +0100 (CET) In-Reply-To: Received-SPF: pass client-ip=185.67.36.66; envelope-from=tomasn@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:126808 Archived-At: Dmitry Alexandrov writes: > Tomas Nordin wrote: >> Dmitry Alexandrov writes: >>> I am not sure, what =E2=80=98dummy=E2=80=99 is supposed to mean here? = Minor mode is fully functional, that is you are free to disable and reenabl= e it at will: >> >> I think I sort of tried to be funny, based on that the mode was made up = just to keep a key binding available in all situations. > > No, it=CA=BCs not required there, you are free to enable =E2=80=98my-prec= ious-keys-map=E2=80=99 unconditionally as well: > > (add-to-list 'emulation-mode-map-alists > (list (cons t my-precious-keys-map))) > > if you feel that you will never need to suspend it. Alright, then we know the way to go if we have a set of bindings that must never be "hi-jacked" > >> And that the trickery with the key-maps is hard to follow for me. > > There is no any trickery, just a hardcoded priority order in Emacs itself= : global map is overridden by major mode map, which in turn is overridden b= y minor mode maps, which can be overridden by emulation mode maps. > > That is, using a minor mode map would suffice in your specific case =E2= =80=94 about M-o in diff-mode. But so would a mere: > > (with-eval-after-load 'diff-mode > (define-key diff-mode-map > (kbd "M-o") nil)) ; also on RET, o, C-c C-c, which is more than enou= gh That's the way I go about it. It is rare enough this binding is used anywhere (apart from the original binding about setting face of course) Thanks -- Tomas