diff options
Diffstat (limited to 'chess-file.el')
| -rw-r--r-- | chess-file.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chess-file.el b/chess-file.el index e22ede3..dfbd3b6 100644 --- a/chess-file.el +++ b/chess-file.el @@ -17,13 +17,14 @@ (current-buffer))) ((eq event 'rescan) - (goto-char (point-min)) - (setq chess-file-locations nil) - (while (search-forward "[Event " nil t) - (goto-char (match-beginning 0)) - (push (point) chess-file-locations) - (forward-char 1)) - (setq chess-file-locations (nreverse chess-file-locations))) + (save-excursion + (goto-char (point-min)) + (setq chess-file-locations nil) + (while (search-forward "[Event " nil t) + (goto-char (match-beginning 0)) + (push (point) chess-file-locations) + (forward-char 1)) + (setq chess-file-locations (nreverse chess-file-locations)))) ((eq event 'save) (save-buffer)) |
