From 2ae9b6cd854e34b4072d4d7ff13758e532b32c5e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 18 Oct 2024 14:51:13 -0400 Subject: [PATCH] (symbol-file): Fix `C-h v pcase` where `cl-struct` lacks file info * lisp/subr.el (symbol-file): Return an actual (and absolute) file name for the autoload case, as is done for other cases. (cherry picked from commit 0886ef01a8d7144771b5834c3ef6c3d44666ea76) --- lisp/subr.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 36489a07e60..86ffa21a1cb 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3074,7 +3074,8 @@ instead." (if (and (or (null type) (eq type 'defun)) (symbolp symbol) (autoloadp (symbol-function symbol))) - (nth 1 (symbol-function symbol)) + (locate-library + (nth 1 (symbol-function symbol))) (if (and native-p (or (null type) (eq type 'defun)) (symbolp symbol) (native-comp-available-p) -- 2.39.5