[code] [ctags][PATCH 2/4] Make Ctags executable configurable

From: Jens Remus <jens.remus.att.gmail.com>
Date: Thu, 27 Jul 2017 13:59:49 +0200

Intruduce a module variable CTAGS to allow the user to specify the
location of the Ctags executable.

---
 init.lua | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/init.lua b/init.lua
index 0a8b5a6..12197e0 100644
--- a/init.lua
+++ b/init.lua
@@ -28,6 +28,9 @@ module('_M.ctags')]]
 
 local M = {}
 
+-- Default Ctags executable.
+M.CTAGS = 'ctags'
+
 -- Searches all available tags files tag *tag* and returns a table of tags
 -- found.
 -- All Ctags in tags files must be sorted.
@@ -79,7 +82,7 @@ local function find_tags(tag)
   if #tags == 0 and buffer.filename and not tmpfile then
     -- If no matches were found, try the current file.
     tmpfile = os.tmpname()
-    spawn('ctags -o "'..tmpfile..'" "'..buffer.filename..'"'):wait()
+    spawn(M.CTAGS..' -o "'..tmpfile..'" "'..buffer.filename..'"'):wait()
     tag_files = {tmpfile}
     goto retry
   end
-- 
2.1.4
-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 27 Jul 2017 - 07:59:49 EDT

This archive was generated by hypermail 2.2.0 : Fri 28 Jul 2017 - 06:36:48 EDT