Fix Enchant dictionary finding routine
* lisp/textmodes/ispell.el (ispell-find-enchant-dictionaries): Don’t pass `buffer-string' to enchant-lsmod. Remove zero-length substrings from the split output of `enchant-lsmod`, as the output ends with a separator. Pass the current language to `ispell--get-extra-word-characters', so we get the result for the current language, not the default language. (Patch from Jorge P. de Morais Neto.)
This commit is contained in:
parent
0ebe267800
commit
151486931c
1 changed files with 2 additions and 2 deletions
|
@ -1236,11 +1236,11 @@ If LANG is omitted, get the extra word characters for the default language."
|
|||
"Find Enchant's dictionaries, and record in `ispell-enchant-dictionary-alist'."
|
||||
(let* ((dictionaries
|
||||
(split-string
|
||||
(ispell--call-enchant-lsmod "-list-dicts" (buffer-string)) " ([^)]+)\n"))
|
||||
(ispell--call-enchant-lsmod "-list-dicts") " ([^)]+)\n" t))
|
||||
(found
|
||||
(mapcar #'(lambda (lang)
|
||||
`(,lang "[[:alpha:]]" "[^[:alpha:]]"
|
||||
,(ispell--get-extra-word-characters) t nil nil utf-8))
|
||||
,(ispell--get-extra-word-characters lang) t nil nil utf-8))
|
||||
dictionaries)))
|
||||
;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist
|
||||
;; which have no element in FOUND at all.
|
||||
|
|
Loading…
Add table
Reference in a new issue