summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/symref/idutils.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-04-18 14:05:31 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-04-18 14:05:31 -0700
commitdd92b5f5047931f6020045ce47360b62d1c2cb72 (patch)
tree336a9b31454bbf0f9c888ea6169c852e7eae9462 /lisp/cedet/semantic/symref/idutils.el
parentd11abb25428e9a468a5525c462489eb5a854798f (diff)
parent32364bbbaa8bda68228a3b0191c0b340c252d2a2 (diff)
downloademacs-dd92b5f5047931f6020045ce47360b62d1c2cb72.tar.gz
emacs-dd92b5f5047931f6020045ce47360b62d1c2cb72.tar.bz2
emacs-dd92b5f5047931f6020045ce47360b62d1c2cb72.zip
Merge from origin/emacs-25
32364bb substitute-command-keys keeps quotes’ text props 567ab52 * src/xwidget.c (x_draw_xwidget_glyph_string): More clipping ... 24b87a1 Add semantic-symref-filepattern-alist entry for lisp-interact... cc0b713 Perform xref searches without visiting unopened files 5045575 Revert "Prevent bootstrap autoload backup files"
Diffstat (limited to 'lisp/cedet/semantic/symref/idutils.el')
-rw-r--r--lisp/cedet/semantic/symref/idutils.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/cedet/semantic/symref/idutils.el b/lisp/cedet/semantic/symref/idutils.el
index 4127d7ae4ea..db3e9a0dddb 100644
--- a/lisp/cedet/semantic/symref/idutils.el
+++ b/lisp/cedet/semantic/symref/idutils.el
@@ -49,6 +49,9 @@ See the function `cedet-idutils-search' for more details.")
(semantic-symref-parse-tool-output tool b)
))
+(defconst semantic-symref-idutils--line-re
+ "^\\(\\(?:[a-zA-Z]:\\)?[^:\n]+\\):\\([0-9]+\\):")
+
(cl-defmethod semantic-symref-parse-tool-output-one-line ((tool semantic-symref-tool-idutils))
"Parse one line of grep output, and return it as a match list.
Moves cursor to end of the match."
@@ -59,8 +62,13 @@ Moves cursor to end of the match."
((eq (oref tool :searchtype) 'tagcompletions)
(when (re-search-forward "^\\([^ ]+\\) " nil t)
(match-string 1)))
- (t
- (when (re-search-forward "^\\(\\(?:[a-zA-Z]:\\)?[^:\n]+\\):\\([0-9]+\\):" nil t)
+ ((eq (oref tool :resulttype) 'line-and-text)
+ (when (re-search-forward semantic-symref-idutils--line-re nil t)
+ (list (string-to-number (match-string 2))
+ (expand-file-name (match-string 1) default-directory)
+ (buffer-substring-no-properties (point) (line-end-position)))))
+ (t ; resulttype is line
+ (when (re-search-forward semantic-symref-idutils--line-re nil t)
(cons (string-to-number (match-string 2))
(expand-file-name (match-string 1) default-directory))
))))