comparison lisp/cedet/semantic/db.el @ 104492:8db96f200ac8

Synch to Eric 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
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 19 Sep 2009 17:25:30 +0000
parents fd44b6a10640
children 8c44231178fc
comparison
equal deleted inserted replaced
104491:ee206d5b836f 104492:8db96f200ac8
271 (defmethod semanticdb-get-buffer ((obj semanticdb-table)) 271 (defmethod semanticdb-get-buffer ((obj semanticdb-table))
272 "Return a buffer associated with OBJ. 272 "Return a buffer associated with OBJ.
273 If the buffer is in memory, return that buffer. 273 If the buffer is in memory, return that buffer.
274 If the buffer is not in memory, load it with `find-file-noselect'." 274 If the buffer is not in memory, load it with `find-file-noselect'."
275 (or (semanticdb-in-buffer-p obj) 275 (or (semanticdb-in-buffer-p obj)
276 (find-file-noselect (semanticdb-full-filename obj) t))) 276 ;; Save match data to protect against odd stuff in mode hooks.
277 (save-match-data
278 (find-file-noselect (semanticdb-full-filename obj) t))))
277 279
278 (defmethod semanticdb-set-buffer ((obj semanticdb-table)) 280 (defmethod semanticdb-set-buffer ((obj semanticdb-table))
279 "Set the current buffer to be a buffer owned by OBJ. 281 "Set the current buffer to be a buffer owned by OBJ.
280 If OBJ's file is not loaded, read it in first." 282 If OBJ's file is not loaded, read it in first."
281 (set-buffer (semanticdb-get-buffer obj))) 283 (set-buffer (semanticdb-get-buffer obj)))