[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 04/14: Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-fu
From: |
Leo Liu |
Subject: |
[elpa] 04/14: Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-function |
Date: |
Sun, 30 Mar 2014 07:02:39 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit d2f293a458bedf2f856c67b2c8dd202ee2b648c5
Author: Leo Liu <address@hidden>
Date: Thu Mar 27 07:46:13 2014 +0800
Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-function
---
ggtags.el | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 81d807a..e31b45f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1192,7 +1192,7 @@ commands `next-error' and `previous-error'.
(defvar ggtags-global-error-regexp-alist-alist
(append
`((path "^\\(?:[^\"'\n]*/\\)?[^ )\t\n]+$" 0)
- ;; ACTIVE_ESCAPE src/dialog.cc 172
+ ;; ACTIVE_ESCAPE src/dialog.cc 172
(ctags "^\\([^ \t\n]+\\)[ \t]+\\(.*?\\)[ \t]+\\([0-9]+\\)$"
2 3 nil nil 2 (1 font-lock-function-name-face))
;; ACTIVE_ESCAPE 172 src/dialog.cc #undef ACTIVE_ESCAPE
@@ -1850,25 +1850,23 @@ to nil disables displaying this information.")
;;;###autoload
(defun ggtags-try-complete-tag (old)
"A function suitable for `hippie-expand-try-functions-list'."
- (with-no-warnings ; to avoid loading hippie-exp
- (unless old
- (he-init-string (if (looking-back "\\_<.*" (line-beginning-position))
- (match-beginning 0)
- (point))
- (point))
- (setq he-expand-list
- (and (not (equal he-search-string ""))
- (ggtags-find-project)
- (sort (all-completions he-search-string
- ggtags-completion-table)
- #'string-lessp))))
- (if (null he-expand-list)
- (progn
- (if old (he-reset-string))
- nil)
- (he-substitute-string (car he-expand-list))
- (setq he-expand-list (cdr he-expand-list))
- t)))
+ (eval-and-compile (require 'hippie-exp))
+ (unless old
+ (he-init-string (or (car (funcall ggtags-bounds-of-tag-function)) (point))
+ (point))
+ (setq he-expand-list
+ (and (not (equal he-search-string ""))
+ (ggtags-find-project)
+ (sort (all-completions he-search-string
+ ggtags-completion-table)
+ #'string-lessp))))
+ (if (null he-expand-list)
+ (progn
+ (if old (he-reset-string))
+ nil)
+ (he-substitute-string (car he-expand-list))
+ (setq he-expand-list (cdr he-expand-list))
+ t))
(defun ggtags-reload (&optional force)
(interactive "P")
- [elpa] branch master updated (b8924f8 -> 3dc7169), Leo Liu, 2014/03/30
- [elpa] 03/14: Change ggtags-read-tag to completing-read when no default, Leo Liu, 2014/03/30
- [elpa] 02/14: Fix #12: Remove ggtags-completing-read-function, Leo Liu, 2014/03/30
- [elpa] 04/14: Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-function,
Leo Liu <=
- [elpa] 05/14: Fix #42: Clear ggtags-project-root in non-file buffers, Leo Liu, 2014/03/30
- [elpa] 01/14: Enhance ggtags-view-tag-history to use next-/previous-error, Leo Liu, 2014/03/30
- [elpa] 06/14: New user variable ggtags-global-use-color, Leo Liu, 2014/03/30
- [elpa] 08/14: Fix warning: Making variable buffer-local while let-bound!, Leo Liu, 2014/03/30
- [elpa] 10/14: Disable ggtags-navigation-mode at the right time, Leo Liu, 2014/03/30
- [elpa] 13/14: Fix #44: New variable ggtags-enable-navigation-keys, Leo Liu, 2014/03/30
- [elpa] 09/14: Use compilation-auto-jump in ggtags-global-filter, Leo Liu, 2014/03/30
- [elpa] 11/14: Rename ggtags-handle-single-match to ggtags-global-handle-exit, Leo Liu, 2014/03/30
- [elpa] 12/14: Fix ggtags-navigation-mode-abort when pop-tag-mark errs, Leo Liu, 2014/03/30
- [elpa] 14/14: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2014/03/30