From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: brennan@umanwizard.com Newsgroups: gmane.emacs.devel Subject: [PATCH] Set help mode data for major mode function. Date: Tue, 2 Jul 2024 11:51:00 -0400 Message-ID: <20240702155100.2150717-1-brennan@umanwizard.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Brennan Vincent To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 02 17:52:11 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sOfnf-0001VA-F8 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jul 2024 17:52:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOfmw-00053n-IA; Tue, 02 Jul 2024 11:51:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOfmu-00050q-74 for emacs-devel@gnu.org; Tue, 02 Jul 2024 11:51:24 -0400 Original-Received: from smtp.umanwizard.com ([54.203.248.109]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOfmr-0001ee-CC for emacs-devel@gnu.org; Tue, 02 Jul 2024 11:51:23 -0400 Original-Received: from localhost ([172.254.204.170]) by smtp.umanwizard.com ; 2 Jul 2024 15:51:17 +0000 X-Fes-Received-For: emacs-devel@gnu.org X-Fes-Received-From: X-Mailer: git-send-email 2.41.0 X-Fes-Encrypted: true X-Fes-Ehlo-Domain: localhost Received-SPF: pass client-ip=54.203.248.109; envelope-from=brennan@umanwizard.com; helo=smtp.umanwizard.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321182 Archived-At: From: Brennan Vincent This ensures that e.g. (help-view-source) will work the same way in describe-mode as it does in describe-function. * lisp/help-fns.el: Set help mode data for major mode function --- lisp/help-fns.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 1ffe1b16588..f3d5bba7d4c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -2200,7 +2200,9 @@ describe-mode (help-fns-short-filename file-name) (lambda (_) (help-function-def--button-function - major file-name)))))) + major file-name))))) + (setq help-mode--current-data (list :symbol major + :file file-name))) (insert (help-split-fundoc (documentation major) nil 'doc) (with-current-buffer buffer (help-fns--list-local-commands))) -- 2.41.0