# HG changeset patch # User Agustin martin # Date 1283957640 -7200 # Node ID 737d37e262a116dbe859b729efdcbbd6cf19e4ee # Parent ec526909f60be2dfb76eb1fddf446453cc743db1 textmodes/ispell.el (ispell-valid-dictionary-list): Simplify logic. diff -r ec526909f60b -r 737d37e262a1 lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 08 16:42:54 2010 +0200 +++ b/lisp/ChangeLog Wed Sep 08 16:54:00 2010 +0200 @@ -1,3 +1,8 @@ +2010-09-08 Agustín Martín + + * textmodes/ispell.el (ispell-valid-dictionary-list): + Simplify logic. + 2010-09-08 Michael Albinus Migrate to Tramp 2.2. Rearrange load dependencies. diff -r ec526909f60b -r 737d37e262a1 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Wed Sep 08 16:42:54 2010 +0200 +++ b/lisp/textmodes/ispell.el Wed Sep 08 16:54:00 2010 +0200 @@ -1116,26 +1116,24 @@ (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist)) (dict-list (cons "default" nil)) - name load-dict) + name dict-bname) (dolist (dict dicts) (setq name (car dict) - load-dict (car (cdr (member "-d" (nth 5 dict))))) + dict-bname (or (car (cdr (member "-d" (nth 5 dict)))) + name)) ;; Include if the dictionary is in the library, or dir not defined. (if (and name - ;; include all dictionaries if lib directory not known. ;; For Aspell, we already know which dictionaries exist. (or ispell-really-aspell + ;; Include all dictionaries if lib directory not known. + ;; Same for Hunspell, where ispell-library-directory is nil. (not ispell-library-directory) (file-exists-p (concat ispell-library-directory - "/" name ".hash")) - (file-exists-p (concat ispell-library-directory "/" name ".has")) - (and load-dict - (or (file-exists-p (concat ispell-library-directory - "/" load-dict ".hash")) - (file-exists-p (concat ispell-library-directory - "/" load-dict ".has")))))) - (setq dict-list (cons name dict-list)))) + "/" dict-bname ".hash")) + (file-exists-p (concat ispell-library-directory + "/" dict-bname ".has")))) + (push name dict-list))) dict-list)) ;;; define commands in menu in opposite order you want them to appear.