diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2017-05-10 22:20:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-10 22:20:15 +0200 |
| commit | d1d6c2bdef67ffa1b3b14121e4a5b157840f48cb (patch) | |
| tree | 06f267177805e38a0008d0152d62311d344bfabc /evil-common.el | |
| parent | 1e9f57685e13561d7e975e7ab11ce96cd65d38c2 (diff) | |
| parent | 5912c22a2220ac394bd7cdc2379c0ffc7b18ea85 (diff) | |
Merge pull request #808 from emacs-evil/bugfix-ppss-use
Use `save-excursion` to preserve point
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/evil-common.el b/evil-common.el index 2768a10..e1768f4 100644 --- a/evil-common.el +++ b/evil-common.el @@ -1529,8 +1529,9 @@ backwards." (setq reset-parser t)) ;; global parser state is out of state, use local one (let* ((pnt (point)) - (state (progn (beginning-of-defun) - (parse-partial-sexp (point) pnt nil nil (syntax-ppss)))) + (state (save-excursion + (beginning-of-defun) + (parse-partial-sexp (point) pnt nil nil (syntax-ppss)))) (bnd (bounds-of-evil-string-at-point state))) (when (and bnd (< (point) (cdr bnd))) ;; currently within a string |
