From: "Sébastien Vauban" <ewgeocaufsfb@spammotel.com>
Subject: Re: Do-you Aspell for French?
Date: Thu, 31 Aug 2006 21:01:12 GMT [thread overview]
Message-ID: <87k64od3ho.fsf@missioncriticalit.com> (raw)
In-Reply-To: mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org
Hello everybody,
>> Am 30.08.2006 um 22:53 schrieb Michaël Cadilhac:
>>> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>>>> Am 30.08.2006 um 21:44 schrieb Sébastien Vauban:
>>>>
>>>>>> (defun ispell-get-otherchars ()
>>>>>> (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3)))
>>>>>
>>>>> I did add your function, but... no, it does not work... I still
>>>>> got the coumpound words underlined...
>>>
>>> Strange... I use CVS Emacs, what version are you running?
>>
>> 21.3.50, 22.0.50, 23.0.0.
GNU Emacs 21.4.1, and other verions... On Ubuntu and on Windows.
>>> Where did you put it? If it's in your .emacs, did you put a (require
>>> 'ispell) before?
Yes, now I did (I already had autoloads), but no change.
> However, I've made a big mistake so far, you guys were talking about
> ispell, will I had flyspell in mind.
No, figure out I meant flyspell as well... I use it mainly for
my mails...
I even have since long ago the following in my .emacs:
;; dash character (`-') is considered as a word delimiter
(setq flyspell-consider-dash-as-word-delimiter-flag t)
but it does seem not to do anything...
Here interesting parts of my config, if it can help.
,----
| ;;; .emacs --- my Emacs Init File
|
| (require 'ispell)
|
| ;; use GNU Aspell instead of (port of) ispell
| (setq ispell-program-name
| (if running-ms-windows
| "C:/Program Files/Aspell/bin/aspell.exe"
| "/usr/bin/aspell"))
|
| (when (and ispell-program-name
| (file-executable-p ispell-program-name))
|
| ;; aspell extensions should be used
| (setq ispell-really-aspell t)
|
| ;; remove uninstalled dictonaries from the default list
| (setq ispell-dictionary-alist
| '((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)
| ("british" ; British version
| "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british") nil iso-8859-1)
| ("english" ; make English explicitly selectable
| "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") 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)))
|
| ;; ispell
| (autoload 'ispell-word "ispell" "Check the spelling of word in buffer." 't)
| (autoload 'ispell-region "ispell" "Check the spelling of region." 't)
| (autoload 'ispell-buffer "ispell" "Check the spelling of buffer." t)
|
| ;; save the personal dictionary without confirmation
| (setq ispell-silently-savep t)
|
| (defun ispell-get-otherchars ()
| (replace-regexp-in-string "-" "" (ispell-get-decoded-string 3)))
|
|
| ;; ;; consider using the `ispell-parser' to check your text
| ;; ;; Warning! Assignment to free variable ispell-parser!!
| ;; (add-hook 'tex-mode-hook
| ;; '(lambda ()
| ;; (setq ispell-parser 'tex)))
|
| ;; ;; TODO Problems in *mail*: checking all the headers!!
| ;; ;; turn on flyspell for all text modes
| ;; (add-hook 'text-mode-hook
| ;; '(lambda ()
| ;; (flyspell-mode 1)))
|
| ;; ;; start Flyspell when editing LaTeX source files
| ;; (add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
| ;; ;; ignore the \citep and \citet commands of the NatBib bibliography style
| ;; (eval-after-load "ispell"
| ;; '(let ((list (car ispell-tex-skip-alists)))
| ;; (add-to-list 'list '("\\\\cite[tp]" ispell-tex-arg-end))
| ;; (setcar ispell-tex-skip-alists list)))
|
| ;; on-the-fly spelling checking
| (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checking" t)
|
| ;; enable the likeness criteria
| (setq flyspell-sort-corrections nil)
|
| ;;
| (setq flyspell-auto-correct-previous-word t)
|
| ;; dash character (`-') is considered as a word delimiter
| (setq flyspell-consider-dash-as-word-delimiter-flag t)
|
| (defun my-turn-on-flyspell-french ()
| "Unconditionally turn on Flyspell mode (in French)."
| (interactive)
| (flyspell-mode 1) ;; extra
| (ispell-change-dictionary "francais")
| (flyspell-buffer)) ;; extra
|
| (global-set-key [(shift f7)] 'my-turn-on-flyspell-french)
|
| (defun my-turn-on-flyspell-english ()
| "Unconditionally turn on Flyspell mode (in English)."
| (interactive)
| (flyspell-mode 1)
| (ispell-change-dictionary "english")
| (flyspell-buffer))
|
| (global-set-key [(control f7)] 'my-turn-on-flyspell-english)
|
| ;; turn flyspell-mode on [instead of just toggling the mode
| ;; by calling it like: (add-hook 'text-mode-hook 'flyspell-mode)]
| (add-hook 'message-mode-hook 'my-turn-on-flyspell-french)
|
|
| ;; (defun activate-flyspell ()
| ;; "Turn on flyspell-mode and call flyspell-buffer."
| ;; (interactive)
| ;; ;; This next line REALLY slows buffer switching.
| ;; (flyspell-mode)
| ;; (flyspell-buffer))
|
| ;; (defvar customised-hooks-alist
| ;; '(emacs-lisp-mode-hook
| ;; nxml-mode-hook
| ;; python-mode-hook
| ;; sh-mode-hook
| ;; text-mode-hook)
| ;; "An alist of hooks that require customisations.")
|
| ;; (unless noninteractive
| ;; ;; Activate flyspell for various major modes.
| ;; (add-hook-list customised-hooks-alist 'activate-flyspell))
|
| ;; turn on flyspell-prog-mode instead, in emacs-lisp-mode, python-mode,
| ;; and sh-mode?
|
| (defun my-turn-off-flyspell ()
| "Unconditionally turn off Flyspell mode."
| (interactive)
| (flyspell-mode -1))
|
| ;; from Alex Schroeder
| (defun my-change-dictionary ()
| "Change the dictionary."
| (interactive)
| (let ((dict (or ispell-local-dictionary ispell-dictionary)))
| (setq dict (if (string= dict "francais") "american" "francais"))
| (message "Switched to %S" dict)
| (sit-for 0.4)
| (ispell-change-dictionary dict)
| (when flyspell-mode
| (flyspell-delete-all-overlays))))
|
| ;; key bindings
| (global-set-key [(meta $)] 'ispell-word)
| (global-set-key [(f7)] 'ispell-word)
| (global-set-key [(shift f7)] 'my-change-dictionary)
| (global-set-key [(control f7)] 'ispell-change-dictionary)
|
| ;; ;;* flyspell comments and strings in programming modes
| ;; ;; From: "Stefan Monnier <foo @ acm.com>"
| ;; (defun flyspell-generic-progmode-verify ()
| ;; "Used for `flyspell-generic-check-word-p' in programming modes."
| ;; (let ((f (get-text-property (point) 'face)))
| ;; (memq f '(font-lock-comment-face font-lock-string-face))))
| ;; (defun flyspell-prog-mode ()
| ;; "Turn on `flyspell-mode' for comments and strings."
| ;; (interactive)
| ;; (setq flyspell-generic-check-word-p 'flyspell-generic-progmode-verify)
| ;; (flyspell-mode 1))
| ;; (add-hook 'c-mode-common-hook 'flyspell-prog-mode t)
| ;; (add-hook 'java-mode-common-hook 'flyspell-prog-mode t)
|
|
| ;;; ----[ The Syntax Table
|
| ;; change word constituent syntax for `text-mode-syntax-table'
| (defun my-change-word-constituent ()
| (map nil
| (function
| (lambda (char)
| (modify-syntax-entry char "w" text-mode-syntax-table)))
| ;; accented characters
| "áéíóúàèìòùâêîôûäëïöüñåç"))
|
| (my-change-word-constituent)
|
| ;; now '-' is not considered a word-delimiter
| ;; (add-hook 'emacs-lisp-mode-hook
| ;; '(lambda ()
| ;; (modify-syntax-entry ?- "w")))
|
| ;;; .emacs ends here
`----
Thanks for all in advance,
Seb
--
Sébastien Vauban
next prev parent reply other threads:[~2006-08-31 21:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 10:31 cc mode, c offset alist Florian Kaufmann
2006-08-29 19:09 ` Do-you Aspell for French? Sébastien Vauban
2006-08-29 20:29 ` Michaël Cadilhac
[not found] ` <mailman.5961.1156884196.9609.help-gnu-emacs@gnu.org>
2006-08-30 19:44 ` Sébastien Vauban
2006-08-30 20:30 ` Peter Dyballa
2006-08-30 20:53 ` Michaël Cadilhac
2006-08-30 21:42 ` Peter Dyballa
2006-08-30 22:27 ` Michaël Cadilhac
[not found] ` <mailman.6056.1156976889.9609.help-gnu-emacs@gnu.org>
2006-08-31 21:01 ` Sébastien Vauban [this message]
2006-09-22 10:25 ` Sébastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k64od3ho.fsf@missioncriticalit.com \
--to=ewgeocaufsfb@spammotel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.