From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Changing outline-minor-mode keybindings for texinfo files Date: Sat, 15 May 2021 12:58:25 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24072"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs , Jean Louis To: michael-franzese@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 15 07:58:59 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 1lhnKF-00066D-1L for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 07:58:59 +0200 Original-Received: from localhost ([::1]:37712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhnKE-0007eD-3k for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 15 May 2021 01:58:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhnJv-0007e1-G0 for help-gnu-emacs@gnu.org; Sat, 15 May 2021 01:58:39 -0400 Original-Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]:46695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhnJt-0000Er-Sw for help-gnu-emacs@gnu.org; Sat, 15 May 2021 01:58:39 -0400 Original-Received: by mail-vs1-xe32.google.com with SMTP id t6so578071vsp.13 for ; Fri, 14 May 2021 22:58:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UEA+k48jNtYP+2G6e5o9xj7RmXjpsgJ/frckHOmp8/g=; b=JHyOF/4g7KuoVEClwzrhdg1QS2f50yKiaN+/D7FJqPQm9CrdqY8NxBtAOVOHCcERaa Ic7v+C5szVvX8uwi4N2DJMifJr/e9k6xdsDmWIPVTWjKpNFrM09pznBbsXiztdcmbROj 173pgzoOwidOJZaXaluv6RHG+jbxOkRDhLnqCstnBgxJTIQGYAZnsltmIq3gYh5bGAlh OoFZnYfYqSGzUKpB5LyEcYY3CrvDuOHT1nNC/w+N/xWR45xUrsozI2SoK+Dzv2bpsaFj nFOB7VUqHd5nNG7hauO1dv9NlpOx3G2EqEPvCa2p/0tzoCtERx6IgLXsIuqVtr8zKkz0 jwGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UEA+k48jNtYP+2G6e5o9xj7RmXjpsgJ/frckHOmp8/g=; b=aeHh3Jo2vpxz7qG4rNDIzu8u96ima5mXkZwlMUUMBg5GetTOvCHYbmQUO8nXRMeqwR +NOvjJDEOmB2Ti8Q6ONta+Ge4fgXVEQ/L24i2coaGEdhYs1YosrQPNQ4c5U80Pe+gA1y opsmNxpDvxSYBeIZMtxoUSlTbMBiFZPeLWo72Tcyy6q3RhEuzin0VnvPry2EBWdARj4W ouwDwrPRk8LjbraGF66ni1SzV5PPxblaa9R5YPePOb5hxnSps1o5nvfA5c1mXjIFpsbg s7MlV/GhN4Mb18KUS35O5Ib7PA5G26knvsWc7kzqxyP+CuK30fykwooxuzdCYhBCxmmy 84sA== X-Gm-Message-State: AOAM533vRfpR8XSFch6j7eFs32jQKYGCjA+rUVNt0TCrxLzWEYs041h8 QC7eCnQr9x1C5tN/dZCprpZSY20EXUup3KR9LjU= X-Google-Smtp-Source: ABdhPJx/E+IDQsqW0bxIsL0h46PM4zh15CfIQ+i9S2Kp4JxKCuZCqOQerTjIK+UGmzTnD4R9T8GiRUr/1QTd5Mp/pHU= X-Received: by 2002:a67:1087:: with SMTP id 129mr2415559vsq.42.1621058316833; Fri, 14 May 2021 22:58:36 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e32; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe32.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:129781 Archived-At: On Sat, 15 May 2021 at 12:25, wrote: > I would need some implementation examples about how the function can be > 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))