Closed arnested closed 11 years ago
Does a Drupal specific dictionary exist somewhere? Because that will probably be the hard part...
Maybe a dictionary could be build based on http://drupal.org/glossary.
I scraped http://drupal.org/glossary manually: https://gist.github.com/4160351.
Convert the wordlist to an aspell dictionary:
aspell --lang en create master drupal.aspell < drupal.wordlist
Dump dictionary in the same folder as drupal/ispell.el
and add
(defvar drupal/ispell-aspell-extra-dict (concat (file-name-directory
(or load-file-name buffer-file-name))
"drupal.aspell"))
to drupal/ispell.el
and add the following code snippet to the function drupal/ispell-enable
:
(when ispell-really-aspell
(add-to-list (make-local-variable 'ispell-extra-args) "--extra-dicts" t)
(add-to-list (make-local-variable 'ispell-extra-args) drupal/ispell-aspell-extra-dict t))
The code needs some cleaning and we probably don't want to scrape http://drupal.org/glossary manually to keep it up to date.
See my drupal-spell project which integrates nicely with drupal-mode.
Create a dictionary of Drupal specific words and add the follwing to drupal/ispell.el:
Would enable aspell users to have better spell checking in comments and strings.