[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 4590414: Avoid errors in ispell.el when Enchant r
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 4590414: Avoid errors in ispell.el when Enchant returns empty extra chars |
Date: |
Fri, 4 May 2018 10:38:03 -0400 (EDT) |
branch: emacs-26
commit 45904142652a11ad48cb365f0c1530dc013bee20
Author: Daniel Pittman <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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
---
lisp/textmodes/ispell.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 88ab7fe..3674a70 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -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'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 4590414: Avoid errors in ispell.el when Enchant returns empty extra chars,
Eli Zaretskii <=