diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2016-04-12 21:08:22 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2016-04-12 21:08:56 +0300 |
commit | cc0b713210a4ae3e273571f8c829122db2b143cf (patch) | |
tree | e511f08acafd5d691a4943b2c90163213fa828c6 /lisp/emacs-lisp/byte-run.el | |
parent | 50455754b558d1689bbbb596e05631f2789b1350 (diff) | |
download | emacs-cc0b713210a4ae3e273571f8c829122db2b143cf.tar.gz emacs-cc0b713210a4ae3e273571f8c829122db2b143cf.tar.bz2 emacs-cc0b713210a4ae3e273571f8c829122db2b143cf.zip |
Perform xref searches without visiting unopened files
* lisp/progmodes/xref.el (xref-collect-references): Instead of
calling `semantic-symref-find-references-by-name', use
`semantic-symref-instantiate' and `semantic-symref-perform-search'
directly. Ask for `line-and-text' results (bug#23223).
(xref-collect-matches): Include the line text in the "hit"
structure.
(xref--convert-hits): New function, split off from
`xref-collect-references' and `xref-collect-matches', to convert
"hits" to xref instance list. Create a temporary buffer here, to
use it for post-processing all hit lines.
(xref--collect-matches): Use a different approach for non-visited
files. Insert the line text into the temp buffer, apply the
file's major mode the best we can without reading its whole
contents, syntax-propertize, and search in the result.
(xref--collect-matches-1): Extract, to handle the common logic
between two cases.
(xref--find-buffer-visiting): New function, a wrapper around
`find-buffer-visiting' to amortize its cost.
* lisp/cedet/semantic/symref/idutils.el
(semantic-symref-idutils--line-re): New constant.
(semantic-symref-parse-tool-output-one-line): Support result type
`line-and-text'.
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep--line-re)
(semantic-symref-parse-tool-output-one-line): Same.
* lisp/cedet/semantic/symref/cscope.el
(semantic-symref-cscope--line-re)
(semantic-symref-parse-tool-output-one-line): Same.
* lisp/cedet/semantic/symref/global.el
(semantic-symref-global--line-re)
(semantic-symref-parse-tool-output-one-line): Same.
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
0 files changed, 0 insertions, 0 deletions