--- ispell.el.orig 2006-10-19 13:20:09.000000000 +0100 +++ ispell.el 2006-10-19 13:39:53.000000000 +0100 @@ -496,140 +496,15 @@ ;;;###autoload (setq ispell-dictionary-alist-1 - '((nil ; default (English.aff) - "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) - ("american" ; Yankee English - "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) - ("brasileiro" ; Brazilian mode - "[A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" - "[^A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]" - "[']" nil ("-d" "brasileiro") nil iso-8859-1) - ("british" ; British version - "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british") nil iso-8859-1) - ("castellano" ; Spanish mode - "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" - "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" - "[-]" nil ("-B" "-d" "castellano") "~tex" iso-8859-1) - ("castellano8" ; 8 bit Spanish mode - "[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" - "[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]" - "[-]" nil ("-B" "-d" "castellano") "~latin1" iso-8859-1))) - - -;;; Second part of dictionary, shortened for loaddefs.el -;;;###autoload -(setq - ispell-dictionary-alist-2 - '(("czech" - "[A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" - "[^A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]" - "" nil ("-B" "-d" "czech") nil iso-8859-2) - ("dansk" ; Dansk.aff - "[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]" - "[']" nil ("-C") nil iso-8859-1) - ("deutsch" ; Deutsch.aff - "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1) - ("deutsch8" - "[a-zA-Z\304\326\334\344\366\337\374]" - "[^a-zA-Z\304\326\334\344\366\337\374]" - "[']" t ("-C" "-d" "deutsch") "~latin1" iso-8859-1) - ("english" ; make English explicitly selectable - "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1))) - - -;;; Third part of dictionary, shortened for loaddefs.el -;;;###autoload -(setq - ispell-dictionary-alist-3 - '(("esperanto" - "[A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" - "[^A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]" - "[-']" t ("-C") "~latin3" iso-8859-1) - ("esperanto-tex" - "[A-Za-z^\\]" "[^A-Za-z^\\]" - "[-'`\"]" t ("-C" "-d" "esperanto") "~tex" iso-8859-1) - ("francais7" - "[A-Za-z]" "[^A-Za-z]" "[`'^---]" t nil nil iso-8859-1) - ("francais" ; Francais.aff - "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" - "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]" - "[-']" t nil "~list" iso-8859-1))) - - -;;; Fourth part of dictionary, shortened for loaddefs.el -;;;###autoload -(setq - ispell-dictionary-alist-4 - '(("francais-tex" ; Francais.aff - "[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" - "[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]" - "[-'^`\"]" t nil "~tex" iso-8859-1) - ("german" ; german.aff - "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1) - ("german8" - "[a-zA-Z\304\326\334\344\366\337\374]" - "[^a-zA-Z\304\326\334\344\366\337\374]" - "[']" t ("-C" "-d" "german") "~latin1" iso-8859-1) - ("italiano" ; Italian.aff - "[A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" - "[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" - "[-]" nil ("-B" "-d" "italian") "~tex" iso-8859-1))) - - -;;; Fifth part of dictionary, shortened for loaddefs.el -;;;###autoload -(setq - ispell-dictionary-alist-5 - '(("nederlands" ; Nederlands.aff - "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[']" t ("-C") nil iso-8859-1) - ("nederlands8" ; Dutch8.aff - "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[']" t ("-C") nil iso-8859-1) - ("norsk" ; 8 bit Norwegian mode - "[A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" - "[^A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]" - "[\"]" nil ("-d" "norsk") "~list" iso-8859-1) - ("norsk7-tex" ; 7 bit Norwegian TeX mode - "[A-Za-z{}\\'^`]" "[^A-Za-z{}\\'^`]" - "[\"]" nil ("-d" "norsk") "~plaintex" iso-8859-1))) - - -;;; Sixth part of dictionary, shortened for loaddefs.el -;;;###autoload -(setq - ispell-dictionary-alist-6 - ;; include Russian iso character set too? - ;; "[']" t ("-d" "russian") "~latin1" iso-8859-1 - '(("polish" ; polish mode - "[A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" - "[^A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]" - "" nil ( "-d" "polish") nil iso-8859-2) - ("russian" ; Russian.aff (KOI8-R charset) - "[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" - "[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]" - "" nil ("-d" "russian") nil koi8-r) - ("svenska" ; Swedish mode - "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" - "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" - "[']" nil ("-C") "~list" iso-8859-1) - ("portugues" - "[a-zA-Z\301\302\311\323\340\341\342\351\352\355\363\343\372]" - "[^a-zA-Z\301\302\311\323\340\341\342\351\352\355\363\343\372]" - "[']" t ("-C" "-d" "portugues") "~latin1" iso-8859-1) - ("slovak" - "[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" - "[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]" - "" nil ("-B" "-d" "slovak") nil iso-8859-2))) + '(("espa~nol" ; Spanish mode + "[A-Za-z\\\\'\\\\\"]" + "[^A-Za-z\\\\'\\\\\"]" + "[-]" nil ("-B" "-TTeX") "~tex" iso-8859-1))) ;;;###autoload (defcustom ispell-dictionary-alist (append ispell-local-dictionary-alist ; dictionary customizations - ispell-dictionary-alist-1 ispell-dictionary-alist-2 - ispell-dictionary-alist-3 ispell-dictionary-alist-4 - ispell-dictionary-alist-5 ispell-dictionary-alist-6) + ispell-dictionary-alist-1) "An alist of dictionaries and their associated parameters. Each element of this list is also a list: @@ -699,9 +574,7 @@ ;;; update the dictionaries at load time (setq ispell-dictionary-alist (append ispell-local-dictionary-alist ; dictionary customizations - ispell-dictionary-alist-1 ispell-dictionary-alist-2 - ispell-dictionary-alist-3 ispell-dictionary-alist-4 - ispell-dictionary-alist-5 ispell-dictionary-alist-6)) + ispell-dictionary-alist-1)) @@ -2266,7 +2139,7 @@ (setq ispell-filter nil) ; Discard version ID line (let ((extended-char-mode (ispell-get-extended-character-mode))) (if extended-char-mode ; ~ extended character mode - (ispell-send-string (concat extended-char-mode "\n")))) + (ispell-send-string "\n"))) (if ispell-async-processp (process-kill-without-query ispell-process)))) @@ -2762,7 +2635,6 @@ (setq ispell-filter (cdr ispell-filter))) shift)) - ;;;###autoload (defun ispell-comments-and-strings () "Check comments and strings in the current buffer for spelling errors." @@ -3111,7 +2983,7 @@ (defun ispell-non-empty-string (string) (if (or (not string) (string-equal string "")) - "\\'\\`" ; An unmatchable string if string is null. + "\\\'\\`" ; An unmatchable string if string is null. (regexp-quote string))) @@ -3119,7 +2991,6 @@ ;;; Buffer Local Functions ;;; ********************************************************************** - (defun ispell-accept-buffer-local-defs () "Load all buffer-local information, restarting Ispell when necessary." (ispell-buffer-local-dict) ; May kill ispell-process. @@ -3139,12 +3010,13 @@ (or (and (eq ispell-parser 'use-mode-name) (string-match "[Tt][Ee][Xx]-mode" (symbol-name major-mode))) - (eq ispell-parser 'tex))) + (eq ispell-parser 'tex) +)) (progn (ispell-send-string "+\n") ; set ispell mode to tex (if (not (eq ispell-parser 'tex)) (set (make-local-variable 'ispell-parser) 'tex))) - (ispell-send-string "-\n")) ; set mode to normal (nroff) +;(ispell-send-string "-\n")) ; set mode to normal (nroff) ;; If needed, test for SGML & HTML modes and set a buffer local nil/t value. (if (and ispell-skip-html (not (eq ispell-skip-html t))) (set (make-local-variable 'ispell-skip-html) @@ -3153,7 +3025,8 @@ ;; Set default extended character mode for given buffer, if any. (let ((extended-char-mode (ispell-get-extended-character-mode))) (if extended-char-mode - (ispell-send-string (concat extended-char-mode "\n")))) + (ispell-send-string "")))) +;(concat extended-char-mode "\n")))) ;; Set buffer-local parsing mode and extended character mode, if specified. (save-excursion (goto-char (point-max)) @@ -3168,7 +3041,8 @@ (match-beginning 1) (match-end 1)))) (cond ((and (string-match "latex-mode" string) (not (eq 'exclusive ispell-check-comments))) - (ispell-send-string "+\n~tex\n")) +;(ispell-send-string "+\n~tex\n") + ) ((string-match "nroff-mode" string) (ispell-send-string "-\n~nroff\n")) ((string-match "~" string) ; Set extended character mode.