mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 02:50:26 -08:00
Avoid errors in ispell.el when Enchant returns empty extra chars
* lisp/textmodes/ispell.el (ispell--get-extra-word-characters): Handle the case of empty extra characters returned by the Enchant '-lsmod' command. (Bug#31344) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
d0d75f9b4e
commit
4590414265
1 changed files with 4 additions and 2 deletions
|
|
@ -1206,8 +1206,10 @@ Internal use.")
|
|||
(defun ispell--get-extra-word-characters (&optional lang)
|
||||
"Get the extra word characters for LANG as a character class.
|
||||
If LANG is omitted, get the extra word characters for the default language."
|
||||
(concat "[" (string-trim-right (apply 'ispell--call-enchant-lsmod
|
||||
(append '("-word-chars") (if lang `(,lang))))) "]"))
|
||||
(let ((extra (string-trim-right
|
||||
(apply 'ispell--call-enchant-lsmod
|
||||
(append '("-word-chars") (if lang `(,lang)))))))
|
||||
(if (string= extra "") "" (concat "[" extra "]"))))
|
||||
|
||||
(defun ispell-find-enchant-dictionaries ()
|
||||
"Find Enchant's dictionaries, and record in `ispell-enchant-dictionary-alist'."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue