mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(ispell-maybe-find-aspell-dictionaries): New function, code extracted from
ispell-valid-dictionary-list. (ispell-valid-dictionary-list, ispell-accept-buffer-local-defs): Call it.
This commit is contained in:
parent
d74a5c919c
commit
999f7d6519
2 changed files with 19 additions and 7 deletions
|
|
@ -1,3 +1,10 @@
|
|||
2005-09-24 Magnus Henoch <mange@freemail.hu>
|
||||
|
||||
* textmodes/ispell.el (ispell-maybe-find-aspell-dictionaries): New
|
||||
function, code extracted from ispell-valid-dictionary-list.
|
||||
(ispell-valid-dictionary-list, ispell-accept-buffer-local-defs):
|
||||
Call it.
|
||||
|
||||
2005-09-24 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* subr.el (version-regexp-alist): Extend valid syntax for version
|
||||
|
|
|
|||
|
|
@ -880,6 +880,16 @@ and added as a submenu of the \"Edit\" menu.")
|
|||
(defvar ispell-have-aspell-dictionaries nil
|
||||
"Non-nil if we have queried Aspell for dictionaries at least once.")
|
||||
|
||||
(defun ispell-maybe-find-aspell-dictionaries ()
|
||||
"Find Aspell's dictionaries, unless already done."
|
||||
(when (and (not ispell-have-aspell-dictionaries)
|
||||
(condition-case ()
|
||||
(progn (ispell-check-version) t)
|
||||
(error nil))
|
||||
ispell-really-aspell
|
||||
ispell-aspell-supports-utf8)
|
||||
(ispell-find-aspell-dictionaries)))
|
||||
|
||||
(defun ispell-find-aspell-dictionaries ()
|
||||
"Find Aspell's dictionaries, and record in `ispell-dictionary-alist'."
|
||||
(interactive)
|
||||
|
|
@ -976,13 +986,7 @@ Assumes that value contains no whitespace."
|
|||
"Returns a list of valid dictionaries.
|
||||
The variable `ispell-library-directory' defines the library location."
|
||||
;; If Ispell is really Aspell, query it for the dictionary list.
|
||||
(when (and (not ispell-have-aspell-dictionaries)
|
||||
(condition-case ()
|
||||
(progn (ispell-check-version) t)
|
||||
(error nil))
|
||||
ispell-really-aspell
|
||||
ispell-aspell-supports-utf8)
|
||||
(ispell-find-aspell-dictionaries))
|
||||
(ispell-maybe-find-aspell-dictionaries)
|
||||
(let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist))
|
||||
(dict-list (cons "default" nil))
|
||||
name load-dict)
|
||||
|
|
@ -3573,6 +3577,7 @@ You can bind this to the key C-c i in GNUS or mail by adding to
|
|||
|
||||
(defun ispell-accept-buffer-local-defs ()
|
||||
"Load all buffer-local information, restarting Ispell when necessary."
|
||||
(ispell-maybe-find-aspell-dictionaries)
|
||||
(ispell-buffer-local-dict) ; May kill ispell-process.
|
||||
(ispell-buffer-local-words) ; Will initialize ispell-process.
|
||||
(ispell-buffer-local-parsing))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue