emacs-diffs
[Top][All Lists]
Advanced

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

master 3fe2fb5: Present C source files as absolute file names too when p


From: Dmitry Gutov
Subject: master 3fe2fb5: Present C source files as absolute file names too when possible
Date: Wed, 17 Feb 2021 18:41:10 -0500 (EST)

branch: master
commit 3fe2fb5794715b075fc1dd6d5d84bf10eae24c73
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    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).
---
 lisp/progmodes/elisp-mode.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 3121530..c14b184 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)



reply via email to

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