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: Fri, 14 May 2021 18:19:04 +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="14814"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 14 18:39:38 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 1lhaqg-0003dB-5C for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 18:39:38 +0200 Original-Received: from localhost ([::1]:38856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhaqf-0001mw-5k for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 12:39:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhaWt-0008Hg-5e for help-gnu-emacs@gnu.org; Fri, 14 May 2021 12:19:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:37503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhaWp-0005kk-1V for help-gnu-emacs@gnu.org; Fri, 14 May 2021 12:19:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621009144; bh=zTH4vO/SiUGpiODrTKDBAhs4xOhHbRYm4CZKPdMcjbc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YQK4OCUL7omXtAhHQgvN1V9oz9BIZWSL7iY+LQYBNjt7VYKJB8mIkMCLT/BJtUt/4 aP8VAjmC9d2WEb4OBovO0zq7etLA0yI9CJzu0L3DIBcGFT0O1IebX7UA6qgeyorO4s ONivGiISwQCM7iNwcA2xusM+gg1Jp5WL9XiB285E= 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); Fri, 14 May 2021 18:19:04 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:YZGPBrqPcvC7cqGKSR5vtzSY5T6SObdftv2nnVvFmAT08kLqhIrEXVQKRF8TvTEGpepc1 cNl6gk4ay+px2m5NZcDt2MGp+Oc8a3As1T8owYopgQZ54Wz/Wti1Li2O7pe9z5li9vtSqL1ubGj8 f5ZLoOg++uaPnSYhov8cXIKqV5P+LKeXmXD2TNI1LULdCHSZ7AXrcJSvNhZkELu3cgXHrf9dVESU jDzYH2gX/o2qfa9v+Abjq+XssDspXWDe2ayuRJkGtdA5QLfDGjiW1JSPX0qZnfTnSz/HpWwZQxYV ww= X-UI-Out-Filterresults: notjunk:1;V03:K0:/gzTylrGcO8=:6afsie9/eQEBYPskVr1zw/ 1gvHnbMTZRDA+/Thn8WvRXmp1bQRin+SxnIm8BAmRXRugDeiMowcZcxrruAdKqAKXPPVa+zlg j3f9OQCuUBFbG5YA07kH04Aal9UWUKMpwzKA5NqxVWsDLM68OAMc4JOznucOVeAvzhncGcPoj gc+T3hC7ymhhdE9CO8KFxM4GOadQIah55JfiEwahARF+bhM9l2gGm7d0g/CjwDuJ5SGOAd4y3 OwivGgCcgM+3YSxIEpOWT468GH+lt8bKQBL9fICKszLEEtL8VKOwsdYZm/xLcoPvX9TK90RVY Y/be/JXgNHCOKiKTule5y7NDox7QQ0hvHQKYXcFNYytABCu57K6tDQt/HR4n4M0SEQaAErSEj jv4XTjXYs2Txhj71EoCXd83IQ73vFa5K59luw9JSbVFUidt21e/S4fy9vo9bUoI6ewsCCz4FH ZPMBeaUaMQo4dZVlsep0K2bzjGL5vfORSO6A9oHiQrFoZEUZrTsvuzN8rW9HPxmDaciA9vi+2 OVYbxtCdLaG/xnx+X9ZXIYqOydQkCbtlGcPqTiLaAGQb31GkgIXRrKKaAWVFMfOJ7dEM2LwMs 4aLU0MwAqyrWoTVKRDLPPgO4M9Cfx+bGqu78sJNA6hyWOYmFWGZlR2ip8HDJ7pu8sRaTjhLh2 1jsK4d3/rhuRgf10/xLbc8VIv2gBXBVHQ6RZ362vlRNajyH+IR5Lsy4wHr5Nk7OJXOYQDh51k DjDZG7IB4rdtKM3smQXhImY6Pbto81nsuBVk2yjwDWH+IEs+L9JAvHfNgo40jFxOPeRcwA+U Received-SPF: pass client-ip=212.227.15.19; 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_H2=-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:129774 Archived-At: > Sent: Saturday, May 15, 2021 at 4:00 AM > From: "Yuri Khan" > To: michael-franzese@gmx=2Ecom, "Help Gnu Emacs" > Subject: Re: Changing outline-minor-mode keybindings for texinfo files > > On Fri, 14 May 2021 at 21:06, Jean Louis wrote: >=20 > > > (defun vmove-keytrigger () > > > "Visualises outline and moves texinfo code=2E" > > > > > > (let ( (map texinfo-mode-map) ) > > > (define-key map (kbd "H-q") #'outline-hide-sublevels) > > > (define-key map (kbd "H-b") #'outline-hide-body) > > > (define-key map (kbd "H-") #'outline-move-subtree-up) > > > (define-key map (kbd "H-") #'outline-move-subtree-down) )= ) > > > > > > (add-hook 'texinfo-mode-hook 'vmove-keytrigger) > > > > In my opinion that hook, when it runs, internally get that all > > defined, but once function finishes, nothing yields out of it, because > > it is within `let' enclosure and because you are working on a > > temporary variable `map'=2E >=20 > No, because =E2=80=98map=E2=80=99 is a reference to the same object that > =E2=80=98texinfo-mode-map=E2=80=99 refers to=2E Within the functions, th= ey are two names > of the same data structure=2E Changes made through one name within the > function are then visible through the other name after the function > returns=2E So it is good?