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)
This commit is contained in:
parent
27d343070d
commit
2d8b2fd034
1 changed files with 14 additions and 14 deletions
|
@ -287,7 +287,7 @@ Argument OBJ is the object to write."
|
||||||
(when (semanticdb-live-p obj)
|
(when (semanticdb-live-p obj)
|
||||||
(when (semanticdb-in-buffer-p obj)
|
(when (semanticdb-in-buffer-p obj)
|
||||||
(with-current-buffer (semanticdb-in-buffer-p obj)
|
(with-current-buffer (semanticdb-in-buffer-p obj)
|
||||||
|
(save-excursion
|
||||||
;; Make sure all our tag lists are up to date.
|
;; Make sure all our tag lists are up to date.
|
||||||
(semantic-fetch-tags)
|
(semantic-fetch-tags)
|
||||||
|
|
||||||
|
@ -302,7 +302,7 @@ Argument OBJ is the object to write."
|
||||||
|
|
||||||
;; Make sure pointmax is up to date
|
;; Make sure pointmax is up to date
|
||||||
(oset obj pointmax (point-max))
|
(oset obj pointmax (point-max))
|
||||||
))
|
)))
|
||||||
|
|
||||||
;; Make sure that the file size and other attributes are
|
;; Make sure that the file size and other attributes are
|
||||||
;; up to date.
|
;; up to date.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue