diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2009-09-19 17:25:30 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2009-09-19 17:25:30 +0000 |
commit | 1eac105a705a5d055f38e2734c16101d0f550112 (patch) | |
tree | 313c91156edf5eb96d21325c442808aff82957ed /lisp/cedet/semantic/util.el | |
parent | 5c5bbb19dc7bc92fef91a761ece153b5c1230f9b (diff) | |
download | emacs-1eac105a705a5d055f38e2734c16101d0f550112.tar.gz |
Synch to Eric M. Ludlam's upstream CEDET repository.
* cedet/semantic/db.el (semanticdb-get-buffer): Wrap find-file in
save-match-data.
* cedet/semantic/db-global.el (semanticdb-test-gnu-global): Wrap
find-file in save-match-data.
* cedet/semantic/util.el (semantic-file-tag-table)
(semantic-recursive-find-nonterminal-by-name): Wrap find-file in
save-match-data.
* cedet/semantic/tag.el (semantic-tag-buffer): Wrap find-file in
save-match-data.
* cedet/semantic/tag-file.el (semantic-go-to-tag): Wrap the "goto"
part with save-match-data.
* cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Save match data around calling the major mode to enable.
* cedet/semantic/format.el (semantic-format-tag-short-doc-default):
Wrap find-file in save-match-data.
* cedet/semantic/fw.el (semantic-find-file-noselect): Wrap
find-file in save-match-data
Diffstat (limited to 'lisp/cedet/semantic/util.el')
-rw-r--r-- | lisp/cedet/semantic/util.el | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index a70b086f78d..7981f75c30c 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -68,19 +68,20 @@ If FILE is not loaded, check to see if `semanticdb' feature exists, and use it to get tags from files not in memory. If FILE is not loaded, and semanticdb is not available, find the file and parse it." - (if (find-buffer-visiting file) - (save-excursion - (set-buffer (find-buffer-visiting file)) - (semantic-fetch-tags)) - ;; File not loaded - (if (and (require 'semantic/db-mode) - (semanticdb-minor-mode-p)) - ;; semanticdb is around, use it. - (semanticdb-file-stream file) - ;; Get the stream ourselves. - (save-excursion - (set-buffer (find-file-noselect file)) - (semantic-fetch-tags))))) + (save-match-data + (if (find-buffer-visiting file) + (save-excursion + (set-buffer (find-buffer-visiting file)) + (semantic-fetch-tags)) + ;; File not loaded + (if (and (require 'semantic/db-mode) + (semanticdb-minor-mode-p)) + ;; semanticdb is around, use it. + (semanticdb-file-stream file) + ;; Get the stream ourselves. + (save-excursion + (set-buffer (find-file-noselect file)) + (semantic-fetch-tags)))))) (semantic-alias-obsolete 'semantic-file-token-stream 'semantic-file-tag-table) @@ -161,7 +162,8 @@ THIS ISN'T USED IN SEMANTIC. DELETE ME SOON." (let ((fn (semantic-dependency-tag-file (car includelist)))) (if (and fn (not (member fn unfound))) (save-excursion - (set-buffer (find-file-noselect fn)) + (save-match-data + (set-buffer (find-file-noselect fn))) (message "Scanning %s" (buffer-file-name)) (setq stream (semantic-fetch-tags)) (setq found (semantic-find-first-tag-by-name name stream)) |