textmodes/flyspell.el: Don't check pre-word if buffer was switched.
[bpt/emacs.git] / lisp / ChangeLog
index cdb8fe5..ffa0c84 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-17  Michal Nazarewicz  <mina86@mina86.com>
+
+        * textmodes/flyspell.el (flyspell-check-pre-word-p): Return nil if
+        command changed buffer (ie. `flyspell-pre-buffer' is not current
+        buffer), which prevents making decisions based on invalid value of
+        `flyspell-pre-point' in the wrong buffer.  Most notably, this used to
+        cause an error when `flyspell-pre-point' was nil after switching
+        buffers
+        (flyspell-post-command-hook): No longer needs to change buffers when
+        checking pre-word.  While at it remove unnecessary progn.
+
 2013-04-17  Nicolas Richard  <theonewiththeevillook@yahoo.fr>  (tiny change)
 
        * textmodes/ispell.el (ispell-add-per-file-word-list):