From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: flyspell: local abbrev in different languages Date: Wed, 26 Sep 2007 18:28:30 +0200 Message-ID: <200709261828.31740.andreas.roehler@online.de> References: <873ax16d51.fsf@mat.ucm.es> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1190824192 6803 80.91.229.12 (26 Sep 2007 16:29:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Sep 2007 16:29:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Uwe Brauer Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 26 18:29:48 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IaZlc-00059O-JJ for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Sep 2007 18:29:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaZlZ-0006cJ-FH for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Sep 2007 12:29:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IaZkZ-00061x-1Y for help-gnu-emacs@gnu.org; Wed, 26 Sep 2007 12:28:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IaZkW-0005zo-I1 for help-gnu-emacs@gnu.org; Wed, 26 Sep 2007 12:28:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IaZkW-0005zj-7S for help-gnu-emacs@gnu.org; Wed, 26 Sep 2007 12:28:32 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IaZkV-0002MG-Oy for help-gnu-emacs@gnu.org; Wed, 26 Sep 2007 12:28:32 -0400 Original-Received: from [84.190.179.171] (helo=karton) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1IaZkS4Ahx-0007fF; Wed, 26 Sep 2007 18:28:29 +0200 User-Agent: KMail/1.8.2 In-Reply-To: <873ax16d51.fsf@mat.ucm.es> Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX1/jjbTg5ypTnq1VwyGQtvhd6/xIbZ1VcjvT7A/ wT0XxSfYw5nt5DQGbEHeS/fCBgCyt7Nlw6xvSfNtG/xlrmHiRV pixX6Mcuw/Ta6lLfsJwOA== X-Detected-Kernel: Linux 2.6? (barebone, rare!) 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:47881 Archived-At: Am Mittwoch, 26. September 2007 10:31 schrieb Uwe Brauer: > Hello > > Some time ago I asked this the maintainer of flyspell. Alas flyspell > is no longer maintained. But may be someone with a good understanding > of the abbrev mechanism could answer the following question: > > > I am using flyspell for quite a time and like it very much. However > there is a small inconvenience. > > I prefer to have flyspell-use-global-abbrev-table-p set to nil, in > order to have the abbrev saved in the local abbrev table. > > However I use 3 languages, english, german and spanish. > > Take the word region: > > In spanish it is regi=F3n but in english it is region. > In order that the word is corrected according to the language used, > using the abbrev table, the only possibility would be to have > a english, a spanish and a german abbrev table. > > Could that be included in flyspell? > > Thanks and regards > > Uwe Brauer I created an English-mode for this occasion - my common text-mode is used for abbrevs in German. With `englisch-mode' abbrevs are locally stored with this mode without further precautions. Flyspell works too. You could do the respective thing for Spanish. (defun englisch-mode () "Major mode for editing englisch written for humans to read. In this mode, paragraphs are delimited only by blank or white lines. You can thus get the full benefit of adaptive filling (see the variable `adaptive-fill-mode'). \\{englisch-mode-map} Turning on Text mode runs the normal hook `englisch-mode-hook'." (interactive) (kill-all-local-variables) (use-local-map englisch-mode-map) (setq local-abbrev-table englisch-mode-abbrev-table) (set-syntax-table englisch-mode-syntax-table) (make-local-variable 'paragraph-start) (setq paragraph-start (concat page-delimiter "\\|[ \t]*$")) (if (eq ?^ (aref paragraph-start 0)) (setq paragraph-start (substring paragraph-start 1))) (make-local-variable 'paragraph-separate) (setq paragraph-separate paragraph-start) (make-local-variable 'indent-line-function) (setq indent-line-function 'indent-relative-maybe) (setq mode-name "Englisch") (setq major-mode 'englisch-mode) (ispell-change-dictionary "english") (setq common-abbrevs-list 'common-english-abbrevs) (abbrev-mode 1) (run-hooks 'englisch-mode-hook)) HTH Andreas R=F6hler