From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: michael-franzese@gmx.com Newsgroups: gmane.emacs.help Subject: Changing outline-minor-mode keybindings for texinfo files Date: Sat, 15 May 2021 08:07:06 +0200 Message-ID: References: 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="27710"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs , Jean Louis To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 08:08:43 2021 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 1lhnTf-00071X-Bg for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 08:08:43 +0200 Original-Received: from localhost ([::1]:40332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhnTd-0001OI-JK for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 02:08:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhnSe-0001O4-Gn for help-gnu-emacs@gnu.org; Sat, 15 May 2021 02:07:40 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:53087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhnSc-0006WQ-W5 for help-gnu-emacs@gnu.org; Sat, 15 May 2021 02:07:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621058826; bh=GUtlQ4JjOib5dbguaRK4C3augX+rua/iLrsrkwHwuF0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=f2SHg66ykOoCliJgEw6WyJPghu/BaqMG9XoWT9QmOZfXEF3395DCpYNXmwv8D4pt7 Up/O2VPfTr3dbz2YLCU8ar4h0HVURTmqt2WCDTK0auF46yPzQto+SsgdJ982g7VFie P2hRJNhR3quAXS/RqY1uR2udM0s7TS3hHIoM6OuA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs04.server.lan [172.19.170.170]) (via HTTP); Sat, 15 May 2021 08:07:06 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:oS4VYkWk3sI0MSbrhd+DSLceZ5gp0Yf/lox1pleeCeFcuSFNEnMBvvbXJ5UskA1l+odeX WgUkj87vMNERAhC3meq+r22lyj/ZVj44XE18Ym4/WMKBSLsGKOOc1cRnDkRz4E4UxFMHpcGYR6EP NrA7gdSVMMiATEurCS+OShJDT3g5AR5y9BULs8eQFKXvla4xZQwpQ3nozXKSZzSbdk354FR3IDgs VfoO5UlabXRVgHgE2vZO0o5KykaJ773ggviq9eD/ta0lxV9CSPXRBvFu640mgbVjoxJqOQc5NuaN 1w= X-UI-Out-Filterresults: notjunk:1;V03:K0:vaGHxieVOHw=:NbLkAkVERqIjaiaEQthnHF f9cLIwKoI1IQ1zylUl0CB+7HVoJOlYdB1SQkJVqqERV5tIyFyD1CUUZ84x+TFWGJ4aZqo2Mso TX0QNK9EA+INZwE3ov9SEkgSrVSvWJVav7iVLHjGjcYD48n/vX0RgeOteVgJzr94u2nO7olGR QXnIH0VQ+/mldGU7PCsjqwSEscy0KDSNpcJRUtrlcEVYGq+ZHGGPJbqpdg/yrW4Rm8S4muWyx /vkflcL0Cc3jECDWZG6aV1mtskG6QwkU/VV86nSSapn9AUSFyik4JItpI/DkltsjDlcpgSqak By5yg4IfpNVhDOsKnygE8vUhtbDS8FW414VvBUo44aBIM1Lylt905GHkoGNdjhk8tDZCqrOCv 0Q43KRmPNGT30lj8OtkHPOwiMT7C97qSSSgcpXbuOta3YuD7FIKN4VOYHDb2OSzLuvH59TCue vN8JrQxk2DlzTZyfhd9SD8JGVLS1d2FrYaAMCRkHAZSONS6WZSZBrQRFyq1o+FuGtQoKQ8I7v BzwUuxgXGN+8kG1bZkrFQknUXw2GyUKcFTjr8r1w5CkWsN+F1/7dcMwBUhXJAEK/2SurkXe4l 1B000AljwcFr1u11Xty3lW7Cl0tDbpXl7fevDorxXQUVR+Vkh/rX5oD59ZTSSrGh4uilGbM57 ZN0G43qZBkh0iaz0vhLDDTIJUKlwkrXk4Hx/lf2wL6tdq6qpwbDembutlt96zHifvcSbp/m7X nlNsm36PM2Lu0PyB6nV/zT0INi4zB0+Wu/g3oRPJ5YhOq2AOjPJMKNvgVyTGO24lZ0AH2vI7 Received-SPF: pass client-ip=212.227.15.18; envelope-from=michael-franzese@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:129784 Archived-At: > Sent: Saturday, May 15, 2021 at 5:58 PM > From: "Yuri Khan" > To: michael-franzese@gmx.com > Cc: "Help Gnu Emacs" , "Jean Louis" > Subject: Re: Changing outline-minor-mode keybindings for texinfo files > > On Sat, 15 May 2021 at 12:25, wrote: > > > I would need some implementation examples about how the function can b= e > > invoked as you describe. > > > > Currently I got the following > > > > (defun show-keytrigger () > > (with-eval-after-load 'texinfo > > (define-key texinfo-mode-map > > (kbd "H-s") #'outline-show-subtree) )) > > > > (add-hook 'texinfo-mode-hook 'show-keytrigger) > > Again, you are using a hook that runs in each new texinfo-mode buffer, > but it is sufficient to define a key once per session. You can replace > the above with just this: > > (with-eval-after-load 'texinfo > (define-key texinfo-mode-map > (kbd "H-s") #'outline-show-subtree)) My difficulty is to have a function that defines some keybindings, so I ca= n easily switch them off by commenting the function call. So the difficulty is how to call the function after texinfo has loaded. I= s there some condition to check? My code automatically assign the major made beca= use I use auto-mode-alist at the beginning of my init file. (add-to-list 'auto-mode-alist '("\\.texi\\'" . texinfo-mode))