summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/lex-spp.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-09-19 17:25:30 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-09-19 17:25:30 +0000
commit1eac105a705a5d055f38e2734c16101d0f550112 (patch)
tree313c91156edf5eb96d21325c442808aff82957ed /lisp/cedet/semantic/lex-spp.el
parent5c5bbb19dc7bc92fef91a761ece153b5c1230f9b (diff)
downloademacs-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/lex-spp.el')
-rw-r--r--lisp/cedet/semantic/lex-spp.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index de0f6fa61d4..5ab74668a45 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -862,20 +862,21 @@ and variable state from the current buffer."
(erase-buffer)
;; Below is a painful hack to make sure everything is setup correctly.
(when (not (eq major-mode mode))
- (funcall mode)
- ;; Hack in mode-local
- (activate-mode-local-bindings)
- ;; CHEATER! The following 3 lines are from
- ;; `semantic-new-buffer-fcn', but we don't want to turn
- ;; on all the other annoying modes for this little task.
- (setq semantic-new-buffer-fcn-was-run t)
- (semantic-lex-init)
- (semantic-clear-toplevel-cache)
- (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook
- t)
- )
+ (save-match-data
+ (funcall mode)
+ ;; Hack in mode-local
+ (activate-mode-local-bindings)
+ ;; CHEATER! The following 3 lines are from
+ ;; `semantic-new-buffer-fcn', but we don't want to turn
+ ;; on all the other annoying modes for this little task.
+ (setq semantic-new-buffer-fcn-was-run t)
+ (semantic-lex-init)
+ (semantic-clear-toplevel-cache)
+ (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook
+ t)
+ ))
- ;; Second Cheat: copy key variables reguarding macro state from the
+ ;; Second Cheat: copy key variables regarding macro state from the
;; the originating buffer we are parsing. We need to do this every time
;; since the state changes.
(dolist (V important-vars)