diff options
| author | Agustín Martín | 2010-09-08 16:54:00 +0200 |
|---|---|---|
| committer | Agustín Martín | 2010-09-08 16:54:00 +0200 |
| commit | 73b4d51a0a70902c3c83c4938ec828ebd25fca13 (patch) | |
| tree | c936612691f0334bf5d93ea2268eedcc746105cc | |
| parent | 0f34aa7719df0621663d41defa5deaf79004c52c (diff) | |
| download | emacs-73b4d51a0a70902c3c83c4938ec828ebd25fca13.tar.gz emacs-73b4d51a0a70902c3c83c4938ec828ebd25fca13.zip | |
textmodes/ispell.el (ispell-valid-dictionary-list): Simplify logic.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 20 |
2 files changed, 14 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d967bbbd87e..ae54fcd784d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-09-08 Agustín Martín <agustin.martin@hispalinux.es> | ||
| 2 | |||
| 3 | * textmodes/ispell.el (ispell-valid-dictionary-list): | ||
| 4 | Simplify logic. | ||
| 5 | |||
| 1 | 2010-09-08 Michael Albinus <michael.albinus@gmx.de> | 6 | 2010-09-08 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | Migrate to Tramp 2.2. Rearrange load dependencies. | 8 | Migrate to Tramp 2.2. Rearrange load dependencies. |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0e853cc3ccd..21eeba1a87a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1116,26 +1116,24 @@ The variable `ispell-library-directory' defines the library location." | |||
| 1116 | 1116 | ||
| 1117 | (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist)) | 1117 | (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist)) |
| 1118 | (dict-list (cons "default" nil)) | 1118 | (dict-list (cons "default" nil)) |
| 1119 | name load-dict) | 1119 | name dict-bname) |
| 1120 | (dolist (dict dicts) | 1120 | (dolist (dict dicts) |
| 1121 | (setq name (car dict) | 1121 | (setq name (car dict) |
| 1122 | load-dict (car (cdr (member "-d" (nth 5 dict))))) | 1122 | dict-bname (or (car (cdr (member "-d" (nth 5 dict)))) |
| 1123 | name)) | ||
| 1123 | ;; Include if the dictionary is in the library, or dir not defined. | 1124 | ;; Include if the dictionary is in the library, or dir not defined. |
| 1124 | (if (and | 1125 | (if (and |
| 1125 | name | 1126 | name |
| 1126 | ;; include all dictionaries if lib directory not known. | ||
| 1127 | ;; For Aspell, we already know which dictionaries exist. | 1127 | ;; For Aspell, we already know which dictionaries exist. |
| 1128 | (or ispell-really-aspell | 1128 | (or ispell-really-aspell |
| 1129 | ;; Include all dictionaries if lib directory not known. | ||
| 1130 | ;; Same for Hunspell, where ispell-library-directory is nil. | ||
| 1129 | (not ispell-library-directory) | 1131 | (not ispell-library-directory) |
| 1130 | (file-exists-p (concat ispell-library-directory | 1132 | (file-exists-p (concat ispell-library-directory |
| 1131 | "/" name ".hash")) | 1133 | "/" dict-bname ".hash")) |
| 1132 | (file-exists-p (concat ispell-library-directory "/" name ".has")) | 1134 | (file-exists-p (concat ispell-library-directory |
| 1133 | (and load-dict | 1135 | "/" dict-bname ".has")))) |
| 1134 | (or (file-exists-p (concat ispell-library-directory | 1136 | (push name dict-list))) |
| 1135 | "/" load-dict ".hash")) | ||
| 1136 | (file-exists-p (concat ispell-library-directory | ||
| 1137 | "/" load-dict ".has")))))) | ||
| 1138 | (setq dict-list (cons name dict-list)))) | ||
| 1139 | dict-list)) | 1137 | dict-list)) |
| 1140 | 1138 | ||
| 1141 | ;;; define commands in menu in opposite order you want them to appear. | 1139 | ;;; define commands in menu in opposite order you want them to appear. |