(flyspell-last-buffer): New var.
(flyspell-accept-buffer-local-defs): Use it to avoid silly redundant work. (flyspell-mode-on): Use add-hook for after-change-functions. (flyspell-mode-off): Use remove-hook for after-change-functions. (flyspell-changes): Make it buffer-local. (flyspell-after-change-function): Make it non-interactive. Use push. (flyspell-post-command-hook): Check input-pending-p while processing the potentially long list of buffer changes.
Showing with 39 additions and 24 deletions