help-global
[Top][All Lists]
Advanced

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

gtags.el relative paths


From: Edwin Stearns
Subject: gtags.el relative paths
Date: Thu, 27 Apr 2006 14:40:40 -0400
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

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
--- /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))

reply via email to

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