diff options
| author | Agustín Martín | 2013-04-17 20:03:46 +0200 |
|---|---|---|
| committer | Agustín Martín | 2013-04-17 20:03:46 +0200 |
| commit | ffe54a139dddefdfd3f0837281ebb62d7cc0a912 (patch) | |
| tree | f17d3982c373193eb45cecf7f0e5cebe55834dad /lisp/ChangeLog | |
| parent | ec7e39f24707268201a444fc4bbc42b2dffae6c5 (diff) | |
| download | emacs-ffe54a139dddefdfd3f0837281ebb62d7cc0a912.tar.gz emacs-ffe54a139dddefdfd3f0837281ebb62d7cc0a912.zip | |
textmodes/flyspell.el: Don't check pre-word if buffer was switched.
If command changed the buffer, the decision may be made based on the
current buffer even though it should based on the previous one. This
may lead to false positives and more importantly to errors since
`flyspell-pre-point' is buffer local so it may have unsanitised value
(such as nil) in previous buffer.
To be honest, I'm not sure how this can happen since
`flyspell-pre-point' is set in previous buffer, but nonetheless, I've
been encountering the error for quite some time and finally decided to
fix it. Interestingly, line making `flyspell-pre-point'
a buffer-local variable has a very revealing "Why?? --Stef" comment.
To avoid the problem, change flyspell-check-pre-word-p so that it does
not allow checking of pre-word if command changed buffer
(ie. `flyspell-pre-buffer' is not current buffer).
Diffstat (limited to 'lisp/ChangeLog')
| -rw-r--r-- | lisp/ChangeLog | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdb8fe5d36c..ffa0c840554 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2013-04-17 Michal Nazarewicz <mina86@mina86.com> | ||
| 2 | |||
| 3 | * textmodes/flyspell.el (flyspell-check-pre-word-p): Return nil if | ||
| 4 | command changed buffer (ie. `flyspell-pre-buffer' is not current | ||
| 5 | buffer), which prevents making decisions based on invalid value of | ||
| 6 | `flyspell-pre-point' in the wrong buffer. Most notably, this used to | ||
| 7 | cause an error when `flyspell-pre-point' was nil after switching | ||
| 8 | buffers | ||
| 9 | (flyspell-post-command-hook): No longer needs to change buffers when | ||
| 10 | checking pre-word. While at it remove unnecessary progn. | ||
| 11 | |||
| 1 | 2013-04-17 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) | 12 | 2013-04-17 Nicolas Richard <theonewiththeevillook@yahoo.fr> (tiny change) |
| 2 | 13 | ||
| 3 | * textmodes/ispell.el (ispell-add-per-file-word-list): | 14 | * textmodes/ispell.el (ispell-add-per-file-word-list): |