gtags.el relative paths

Edwin Stearns <[email protected]>
Newsgroups gmane.comp.gnu.global.general
Message-ID <[email protected]>
I'm a novice at lisp hacking, but these small changes seem to allow
gtags.el to use relative paths, making the *GTAGS SELECT* display lines
shorter.  This is using gtags version 5.0.

I hope this is helpful.

Edwin Stearns

_______________________________________________
Help-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-global
gtags.patch (text/plain, 1.1 KB)
--- /usr/local/src/global-5.0/gtags.el	2006-04-20 22:35:15.000000000 -0400
+++ /root/elisp/gtags.el	2006-04-27 14:37:39.000000000 -0400
@@ -411,7 +411,7 @@
     (setq buffer (generate-new-buffer (generate-new-buffer-name (concat "*GTAGS SELECT* " prefix tagname))))
     (set-buffer buffer)
     (message "Searching %s ..." tagname)
-    (if (not (= 0 (call-process "global" nil t nil (concat "-ax" flag) tagname)))
+    (if (not (= 0 (call-process "global" nil t nil (concat "-x" flag) tagname)))
 	(progn (message (buffer-substring (point-min)(1- (point-max))))
                (gtags-pop-context))
       (goto-char (point-min))
@@ -447,7 +447,7 @@
     (if (not (looking-at "[^ \t]+[ \t]+\\([0-9]+\\)[ \t]\\([^ \t]+\\)[ \t]"))
         (gtags-pop-context)
       (setq line (string-to-number (gtags-match-string 1)))
-      (setq file (gtags-match-string 2))
+      (setq file (expand-file-name (gtags-match-string 2)))
       (if delete (kill-buffer (current-buffer)))
       ;; move to the context
       (if gtags-read-only (find-file-read-only file) (find-file file))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.