emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 52acabcbe8e 1/2: Fix 'help-view-source' for variables defined in


From: Eshel Yaron
Subject: master 52acabcbe8e 1/2: Fix 'help-view-source' for variables defined in C
Date: Thu, 23 May 2024 16:15:53 -0400 (EDT)

branch: master
commit 52acabcbe8eeb688640e18884ba8a15635ca7062
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>

    Fix 'help-view-source' for variables defined in C
    
    This fixes an issue that Juri Linkov mentioned in Bug#71117.
    
    * lisp/help-mode.el (help-function-def--button-function): When
    searching for the definition of a variable, make sure to call
    'help-C-file-name' with KIND argument set to 'var'.
---
 lisp/help-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 48433d899ab..e16408be7b0 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -265,7 +265,9 @@ The format is (FUNCTION ARGS...).")
     (require 'find-func)
     (when (eq file 'C-source)
       (setq file
-            (help-C-file-name (indirect-function fun) 'fun)))
+            (if (memq type '(variable defvar))
+                (help-C-file-name fun 'var)
+              (help-C-file-name (indirect-function fun) 'fun))))
     ;; Don't use find-function-noselect because it follows
     ;; aliases (which fails for built-in functions).
     (let* ((location



reply via email to

[Prev in Thread] Current Thread [Next in Thread]