diff options
| author | Eli Zaretskii | 2017-09-19 19:32:09 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-09-19 19:32:09 +0300 |
| commit | 74d7bb94988055a49ac8f1cbc5af43ac31255581 (patch) | |
| tree | ac47b78ec47699505809a72bd75b2dee80ac3c65 | |
| parent | 40fdbb01d0017e9e164a24aeb760056778975e65 (diff) | |
| download | emacs-74d7bb94988055a49ac8f1cbc5af43ac31255581.tar.gz emacs-74d7bb94988055a49ac8f1cbc5af43ac31255581.zip | |
Fix errors in flyspell-post-command-hook
* lisp/textmodes/ispell.el (ispell-get-decoded-string): Handle the
case of a nil Nth element of the language dictionary slot. This
avoids errors in 'flyspell-post-command-hook' when switching
dictionaries with some spell-checkers. (Bug#28501)
| -rw-r--r-- | lisp/textmodes/ispell.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0c0a51e7df0..6a169622f52 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1492,8 +1492,10 @@ This is passed to the Ispell process using the `-p' switch.") | |||
| 1492 | (assoc ispell-current-dictionary ispell-local-dictionary-alist) | 1492 | (assoc ispell-current-dictionary ispell-local-dictionary-alist) |
| 1493 | (assoc ispell-current-dictionary ispell-dictionary-alist) | 1493 | (assoc ispell-current-dictionary ispell-dictionary-alist) |
| 1494 | (error "No data for dictionary \"%s\" in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'" | 1494 | (error "No data for dictionary \"%s\" in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'" |
| 1495 | ispell-current-dictionary)))) | 1495 | ispell-current-dictionary))) |
| 1496 | (decode-coding-string (nth n slot) (ispell-get-coding-system) t))) | 1496 | (str (nth n slot))) |
| 1497 | (if (stringp str) | ||
| 1498 | (decode-coding-string str (ispell-get-coding-system) t)))) | ||
| 1497 | 1499 | ||
| 1498 | (defun ispell-get-casechars () | 1500 | (defun ispell-get-casechars () |
| 1499 | (ispell-get-decoded-string 1)) | 1501 | (ispell-get-decoded-string 1)) |