aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engster2016-02-21 17:11:01 +0100
committerDavid Engster2016-02-21 17:21:20 +0100
commit2d8b2fd034ccc61f949b408373342b5f9f8ba592 (patch)
treedc8f183b18a1c650ddbb805ca1507914a7e2af52
parent27d343070d02210316e69e4f7da1faeea2d87608 (diff)
downloademacs-2d8b2fd034ccc61f949b408373342b5f9f8ba592.tar.gz
emacs-2d8b2fd034ccc61f949b408373342b5f9f8ba592.zip
Restore point when writing semantic table to disk
* lisp/cedet/semantic/db-file.el (object-write): Wrap call to `semantic-fetch-tags' in `save-excursion', since it might move point in current buffer. (Bug #22287)
-rw-r--r--lisp/cedet/semantic/db-file.el32
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index d9dd1f94d33..0ae433fecb5 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -287,22 +287,22 @@ Argument OBJ is the object to write."
287 (when (semanticdb-live-p obj) 287 (when (semanticdb-live-p obj)
288 (when (semanticdb-in-buffer-p obj) 288 (when (semanticdb-in-buffer-p obj)
289 (with-current-buffer (semanticdb-in-buffer-p obj) 289 (with-current-buffer (semanticdb-in-buffer-p obj)
290 290 (save-excursion
291 ;; Make sure all our tag lists are up to date. 291 ;; Make sure all our tag lists are up to date.
292 (semantic-fetch-tags) 292 (semantic-fetch-tags)
293 293
294 ;; Try to get an accurate unmatched syntax table. 294 ;; Try to get an accurate unmatched syntax table.
295 (when (and (boundp semantic-show-unmatched-syntax-mode) 295 (when (and (boundp semantic-show-unmatched-syntax-mode)
296 semantic-show-unmatched-syntax-mode) 296 semantic-show-unmatched-syntax-mode)
297 ;; Only do this if the user runs unmatched syntax 297 ;; Only do this if the user runs unmatched syntax
298 ;; mode display entries. 298 ;; mode display entries.
299 (oset obj unmatched-syntax 299 (oset obj unmatched-syntax
300 (semantic-show-unmatched-lex-tokens-fetch)) 300 (semantic-show-unmatched-lex-tokens-fetch))
301 ) 301 )
302 302
303 ;; Make sure pointmax is up to date 303 ;; Make sure pointmax is up to date
304 (oset obj pointmax (point-max)) 304 (oset obj pointmax (point-max))
305 )) 305 )))
306 306
307 ;; Make sure that the file size and other attributes are 307 ;; Make sure that the file size and other attributes are
308 ;; up to date. 308 ;; up to date.