branch: externals/gtags-mode
commit ba893f67626bd636e87fd377fcb74509c5cb4c83
Author: Jimmy Aguilar Mena <kratsbinov...@gmail.com>
Commit: Jimmy Aguilar Mena <kratsbinov...@gmail.com>

    Improve imenu integration
---
 global-xref.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/global-xref.el b/global-xref.el
index 52092e0f4a..e245200271 100644
--- a/global-xref.el
+++ b/global-xref.el
@@ -234,13 +234,12 @@ any additional command line arguments to pass to GNU 
Global."
 
 (defun global-xref-imenu-create-index-function ()
   "Make imenu use gtags."
-  (when-let ((commandfile (or (file-remote-p buffer-file-name 'localname)
-                             buffer-file-name)))
+  (when buffer-file-name
     (global-xref--filter-find-symbol
      (lambda (name _code _file line)
        (list name line #'global-xref--imenu-goto-function))
      '("--file")
-     commandfile)))
+     (file-name-nondirectory buffer-file-name))))
 
 ;;;###autoload
 (define-minor-mode global-xref-mode

Reply via email to