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

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

[elpa] 03/14: Fix #56: Restore variable ggtags-completing-read-function


From: Leo Liu
Subject: [elpa] 03/14: Fix #56: Restore variable ggtags-completing-read-function
Date: Sun, 22 Jun 2014 09:41:39 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit 9182e3478b7b8376f266988b6f40513838f4c102
Author: Leo Liu <address@hidden>
Date:   Thu May 15 11:16:07 2014 +0800

    Fix #56: Restore variable ggtags-completing-read-function
---
 README.rst |    4 +++-
 ggtags.el  |   24 ++++++++++++++++++------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/README.rst b/README.rst
index 864f66e..794e1cc 100644
--- a/README.rst
+++ b/README.rst
@@ -279,7 +279,8 @@ Integration with other packages
 
 * helm
 
-  If ``helm-mode`` is enabled ``ggtags`` will use it for completion.
+  If ``helm-mode`` is enabled ``ggtags`` will use it for completion if
+  ``ggtags-completing-read-function`` is nil.
 
 NEWS
 ~~~~
@@ -288,6 +289,7 @@ NEWS
 +++++++++++++
 
 #. New command ``ggtags-find-tag-mouse`` for mouse support.
+#. Variable ``ggtags-completing-read-function`` restored.
 
 [2014-05-06 Tue] 0.8.4
 ++++++++++++++++++++++
diff --git a/ggtags.el b/ggtags.el
index fa53843..97ba132 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -102,9 +102,11 @@
 
 (defcustom ggtags-oversize-limit (* 10 1024 1024)
   "The over size limit for the  GTAGS file.
-For large source trees, running 'global -u' can be expensive.
-Thus when GTAGS file is larger than this limit, ggtags
-automatically switches to 'global --single-update'."
+When the size of the GTAGS file is below this limit, ggtags
+always maintains up-to-date tags for the whole source tree by
+running `global -u'. For projects with GTAGS larger than this
+limit, only files edited in Ggtags mode are updated (via `global
+--single-update')."
   :safe 'numberp
   :type '(choice (const :tag "None" nil)
                  (const :tag "Always" t)
@@ -286,6 +288,13 @@ properly update `ggtags-mode-map'."
   :type 'key-sequence
   :group 'ggtags)
 
+(defcustom ggtags-completing-read-function nil
+  "Ggtags specific `completing-read-function' (which see).
+Nil means using the value of `completing-read-function'."
+  :type '(choice (const :tag "Use completing-read-function" nil)
+                 function)
+  :group 'ggtags)
+
 (defcustom ggtags-highlight-tag-delay 0.25
   "Time in seconds before highlighting tag at point."
   :set (lambda (sym value)
@@ -769,9 +778,12 @@ Do nothing if GTAGS exceeds the oversize limit unless 
FORCE."
     (setq ggtags-current-tag-name
           (cond (confirm
                  (ggtags-update-tags)
-                 (completing-read
-                  (format (if default "%s (default %s): " "%s: ") prompt 
default)
-                  ggtags-completion-table nil require-match nil nil default))
+                 (let ((completing-read-function
+                        (or ggtags-completing-read-function
+                            completing-read-function)))
+                   (completing-read
+                    (format (if default "%s (default %s): " "%s: ") prompt 
default)
+                    ggtags-completion-table nil require-match nil nil 
default)))
                 (default (substring-no-properties default))
                 (t (ggtags-read-tag type t prompt require-match default))))))
 



reply via email to

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