Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

spell for emacs22
Monday, September 3rd, 2007 at 9:06:46am MDT 

  1. ;; spell-check
  2. ;; ###########
  3. (require 'flyspell)
  4. (require 'ispell)
  5.  
  6. (setq
  7.  ; i like aspel, and you?
  8.  ispell-program-name "aspell"
  9.  
  10.  ; my dictionary-alist, using for redefinition russian dictionary
  11.  ispell-dictionary-alist
  12.  '(("english"                       ; English
  13.     "[a-zA-Z]"
  14.     "[^a-zA-Z]"
  15.     "[']"
  16.     nil
  17.     ("-d" "en")
  18.     nil iso-8859-1)
  19.    ("russian"                       ; Russian
  20.     "[АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯабвгдеёжзийклмнопрстуфхцчшщьыъэюя]"
  21.     "[^АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯабвгдеёжзийклмнопрстуфхцчшщьыъэюя]"
  22.     "[-]"
  23.     nil
  24.     ("-C" "-d" "ru")
  25.     nil utf-8)
  26.    (nil                             ; Default
  27.     "[A-Za-z]"
  28.     "[^A-Za-z]"
  29.     "[']"
  30.     nil
  31.     ("-C")
  32.     nil iso-8859-1))
  33.  
  34.  ispell-russian-dictionary "russian"
  35.  ispell-english-dictionary "english"
  36.  flyspell-default-dictionary ispell-russian-dictionary
  37.  ispell-local-dictionary ispell-russian-dictionary
  38.  ispell-extra-args '("--sug-mode=ultra"))
  39.  
  40. (defun flyspell-russian ()
  41.   (interactive)
  42.   (flyspell-mode t)
  43.   (ispell-change-dictionary ispell-russian-dictionary)
  44.   (flyspell-buffer))
  45.  
  46. ; English
  47. (defun flyspell-english ()
  48.   (interactive)
  49.   (flyspell-mode t)
  50.   (ispell-change-dictionary ispell-english-dictionary)
  51.   (flyspell-buffer))
  52.  
  53. (global-set-key [f7] 'ispell-buffer)
  54. (global-set-key [f8] 'ispell-region)
  55. (global-set-key [f9] 'flyspell-english)
  56. (global-set-key [f10] 'flyspell-russian)
  57. (global-set-key [f11] 'flyspell-mode)

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
worth-right
worth-right