From: Reuben Thomas Date: Fri, 16 Mar 2018 10:50:21 +0000 (+0000) Subject: Call enchant-lsmod correctly when Enchant is installed with a suffix X-Git-Tag: emacs-27.0.90~5481 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a402d9aacbecf4bf0b9afde592a3b90c71f96832;p=emacs.git Call enchant-lsmod correctly when Enchant is installed with a suffix * lisp/textmodes/ispell.el (ispell--call-enchant-lsmod): Cope with a version suffix on the binary name, so enchant-2 is converted to enchant-lsmod-2, not enchant-2-lsmod. --- diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 512dfcfa6a7..ba98ea55199 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1200,8 +1200,9 @@ Internal use.") (with-output-to-string (with-current-buffer standard-output - (apply 'ispell-call-process - (concat ispell-program-name "-lsmod") nil t nil args)))) + (apply 'ispell-call-process + (replace-regexp-in-string "enchant\\(-[0-9]\\)?$" "enchant-lsmod\\1" + ispell-program-name) nil t nil args)))) (defun ispell--get-extra-word-characters (&optional lang) "Get the extra word characters for LANG as a character class.