From e774ebf4781c29ae249fa33d73e40b8b50ca7cf7 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Thu, 23 May 2024 15:02:05 +0200 Subject: [PATCH] (help-function-def--button-function): Handle C-defined variables --- 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 -- 2.39.5