From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Newsgroups: gmane.emacs.help Subject: Re: Do-you Aspell for French? Date: Thu, 31 Aug 2006 21:01:12 GMT Organization: Sebastien Vauban Message-ID: <87k64od3ho.fsf@missioncriticalit.com> References: <1156847461.171513.196210@75g2000cwc.googlegroups.com> <87r6yzicji.fsf@missioncriticalit.com> <87lkp6hutj.fsf@missioncriticalit.com> <63C312FA-4DE5-4E17-A0F5-21235DD33E6F@Web.DE> <87wt8q2bds.fsf@lrde.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1157060432 2545 80.91.229.2 (31 Aug 2006 21:40:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2006 21:40:32 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 31 23:40:30 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GIuGv-00037o-EO for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 23:40:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIuGu-0003Ni-Vc for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Aug 2006 17:40:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!xs4all!feeder3.cambrium.nl!feed.tweaknews.nl!213.132.189.1.MISMATCH!multikabel.net!feed10.multikabel.net!newsfeeder.wxs.nl!hoboe2bl2.telenet-ops.be!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Www-site: Under construction... User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:acBo76vI+nfrZTU8Fkgpn1B8EC0= Original-Lines: 226 Original-NNTP-Posting-Host: 84.195.176.134 Original-X-Complaints-To: abuse@telenet.be Original-X-Trace: phobos.telenet-ops.be 1157058072 84.195.176.134 (Thu, 31 Aug 2006 23:01:12 MEST) Original-NNTP-Posting-Date: Thu, 31 Aug 2006 23:01:12 MEST Original-Xref: shelby.stanford.edu gnu.emacs.help:141468 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37089 Archived-At: Hello everybody, >> Am 30.08.2006 um 22:53 schrieb Michaël Cadilhac: >>> Peter Dyballa 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 " | ;; (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