]> git.eshelyaron.com Git - emacs.git/commitdiff
(symbol-file): Fix `C-h v pcase` where `cl-struct` lacks file info
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 18 Oct 2024 18:51:13 +0000 (14:51 -0400)
committerEshel Yaron <me@eshelyaron.com>
Tue, 22 Oct 2024 18:54:26 +0000 (20:54 +0200)
* 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

index 36489a07e6089604f9032cd4d967e09de9c6be05..86ffa21a1cbf7328b903872f6499e25a2cf06140 100644 (file)
@@ -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)