emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 25946d3 07/11: Implement #162: New variable ggtags-extra-a


From: Leo Liu
Subject: [elpa] master 25946d3 07/11: Implement #162: New variable ggtags-extra-args
Date: Wed, 25 Jul 2018 12:34:47 -0400 (EDT)

branch: master
commit 25946d3cf174a32addd773ccee396982894c7d97
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>

    Implement #162: New variable ggtags-extra-args
---
 README.rst |  1 +
 ggtags.el  | 23 +++++++++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/README.rst b/README.rst
index e10affb..e133235 100644
--- a/README.rst
+++ b/README.rst
@@ -320,6 +320,7 @@ NEWS
 #. Don't choke on tag names start with ``-`` (`#156
    <https://github.com/leoliu/ggtags/issues/156>`_).
 #. ``ggtags-show-definition`` supports ``ggtags-sort-by-nearness``.
+#. New variable ``ggtags-extra-args``.
 
 [2016-10-02 Sun] 0.8.12
 +++++++++++++++++++++++
diff --git a/ggtags.el b/ggtags.el
index 8a970a1..e312fcc 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -218,6 +218,12 @@ isn't built with sqlite3 support."
   :safe 'booleanp
   :group 'ggtags)
 
+(defcustom ggtags-extra-args nil
+  "Extra arguments to pass to `gtags' in `ggtags-create-tags'."
+  :type '(repeat string)
+  :safe #'ggtags-list-of-string-p
+  :group 'ggtags)
+
 (defcustom ggtags-sort-by-nearness nil
   "Sort tags by nearness to current directory.
 GNU Global 6.5+ required."
@@ -735,14 +741,15 @@ source trees. See Info node `(global)gtags' for details."
           (setenv "GTAGSLABEL" "ctags"))
         (ggtags-with-temp-message "`gtags' in progress..."
           (let ((default-directory (file-name-as-directory root))
-                (args (cl-remove-if
-                       #'null
-                       (list (and ggtags-use-idutils "--idutils")
-                             (and ggtags-use-sqlite3
-                                  (ggtags-process-succeed-p "gtags" 
"--sqlite3" "--help")
-                                  "--sqlite3")
-                             (and conf "--gtagsconf")
-                             (and conf (ggtags-ensure-localname conf))))))
+                (args (append (cl-remove-if
+                               #'null
+                               (list (and ggtags-use-idutils "--idutils")
+                                     (and ggtags-use-sqlite3
+                                          (ggtags-process-succeed-p "gtags" 
"--sqlite3" "--help")
+                                          "--sqlite3")
+                                     (and conf "--gtagsconf")
+                                     (and conf (ggtags-ensure-localname 
conf))))
+                              ggtags-extra-args)))
             (condition-case err
                 (apply #'ggtags-process-string "gtags" args)
               (error (if (and ggtags-use-idutils



reply via email to

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