[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flyspell: local abbrev in different languages
From: |
Andreas Röhler |
Subject: |
Re: flyspell: local abbrev in different languages |
Date: |
Fri, 28 Sep 2007 08:28:49 +0200 |
User-agent: |
KMail/1.8.2 |
Am Donnerstag, 27. September 2007 16:01 schrieb Uwe Brauer:
> >>>>> "Andreas" == Andreas Röhler <andreas.roehler@online.de> writes:
> >
> > ...
> >
> > Don't think so.
> >
> > With both functions below I'm able to expand `tx' to
> > `texto' as shown (extrait from .abbrev_defs). Inserted
> > this by hand first, maybe "(copy-abbrev-table
> > text-mode-abbrev-table)" in my function didn't had the
> > effect.
>
> Hm now I am really confused.
> Your function copies an existing table into a new one. But what I
> would like to do is to have in LaTeX mode, either spanish-minor mode
> or german-minor-mode or english-minor-mode turn on.
>
> Then according to this minor mode flyspell should write in the
> corresponding (minor) mode tables. I don't see how your code does
> this.
>
> As I understand it, you can define some abbrevs in say your
> english-mayor-mode and then with your function copy it into
> minor-mode-table.
>
> Do I understand that correctly?
>
> Unfortunately I could no test your codes since it contains some emacs
> specific functions namely copy-abbrev-table for which no equivalent
> seems to exit in XEmacs.
>
> Uwe
I've dropped this copy-function, whose intention was a
side-effect, not needed as it turns out.
Spanish minor-mode works here as shown below. Should it not
work with XEmacs now, please send a notice.
To install further language-tables it might be
necessary to edit `.abbrev_defs' by hand inserting
something like
(define-abbrev-table 'MY-minor-mode-abbrev-table '(
))
Thats all AFAIS
Andreas Röhler
;;; (define-abbrev-table 'spanish-minor-mode-abbrev-table '(
;;; ("tx" "texto" nil 0)
;;; ))
(define-minor-mode spanish-minor-mode
"Switch on Spanish minor mode."
nil nil nil
(set (make-local-variable 'spanish-minor-mode) t)
(unless (memq 'spanish-minor-mode-abbrev-table abbrev-table-name-list)
(add-to-list 'abbrev-table-name-list 'spanish-minor-mode-abbrev-table))
(setq local-abbrev-table spanish-minor-mode-abbrev-table))
(defun disable-spanish-minor-mode ()
"Disable Spanish minor-mode. "
(interactive)
(setq spanish-minor-mode nil)
(setq local-abbrev-table text-mode-abbrev-table))
- flyspell: local abbrev in different languages, Uwe Brauer, 2007/09/26
- Message not available
- Re: flyspell: local abbrev in different languages, Stefan Monnier, 2007/09/28
- Re: flyspell: local abbrev in different languages, Uwe Brauer, 2007/09/28
- prbl msg mode (was: flyspell: local abbrev in different languages), Uwe Brauer, 2007/09/28
- Re: prbl msg mode, Uwe Brauer, 2007/09/28
Message not available