From: Dmitry Gutov Date: Wed, 17 Feb 2021 23:41:03 +0000 (+0200) Subject: Present C source files as absolute file names too when possible X-Git-Tag: emacs-28.0.90~3668 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3fe2fb5794715b075fc1dd6d5d84bf10eae24c73;p=emacs.git Present C source files as absolute file names too when possible * lisp/progmodes/elisp-mode.el (xref-location-group): Present C source files as absolute file names too when possible (bug#46514). --- diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 312153052d6..c14b18425f6 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -904,7 +904,13 @@ non-nil result supersedes the xrefs produced by (point-marker))))))) (cl-defmethod xref-location-group ((l xref-elisp-location)) - (xref-elisp-location-file l)) + (let ((file (xref-elisp-location-file l))) + (defvar find-function-C-source-directory) + (if (and find-function-C-source-directory + (string-match-p "\\`src/" file)) + (concat find-function-C-source-directory + (substring file 3)) + file))) (defun elisp-load-path-roots () (if (boundp 'package-user-dir)