branch: elpa/drupal-mode
commit ca93db3d20e0a6a037bc7ffc53e87a385aeac298
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>

    Only change dictionary to `american' if it exists.
---
 drupal/ispell.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drupal/ispell.el b/drupal/ispell.el
index f06a0d64b2..703404f13c 100644
--- a/drupal/ispell.el
+++ b/drupal/ispell.el
@@ -10,7 +10,8 @@
   "Set `ispell-local-dictionary' to `american'.
 Comments and names should use US English spelling (e.g., `color'
 not `colour') according to http://drupal.org/coding-standards.";
-  (setq ispell-local-dictionary "american"))
+  (when (member "american" (ispell-valid-dictionary-list))
+    (setq ispell-local-dictionary "american")))
 
 (add-hook 'drupal-mode-hook 'drupal/ispell-enable)
 

Reply via email to