[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: |
Thu, 27 Sep 2007 15:24:57 +0200 |
User-agent: |
KMail/1.8.2 |
Am Mittwoch, 26. September 2007 20:24 schrieb Uwe Brauer:
> >>>>> "Andreas" == Andreas Röhler <andreas.roehler@online.de> writes:
> >
> > Am Mittwoch, 26. September 2007 10:31 schrieb Uwe Brauer:
> >> Hello
>
> [snip]
>
> > 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.
>
> Well a mayor mode, I guess that is. The problem with this approach is
> that my favorite modes are message and LaTeX two mayor modes. So the
> logical step would be to use a minor mode, as far as I know it is not
> possible to have a abbrev table for that sort of mode.
>
...
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.
HTH
Andreas Röhler
;;; (define-abbrev-table 'spanish-minor-mode-abbrev-table '(
;;; ("tx" "texto" nil 0)
;;; ))
(define-minor-mode spanish-minor-mode
"Switch Spanish minor mode on."
nil nil nil
(set (make-local-variable 'spanish-minor-mode) t)
(unless (memq 'spanish-minor-mode-abbrev-table abbrev-table-name-list)
(setq spanish-minor-mode-abbrev-table
(copy-abbrev-table text-mode-abbrev-table))
(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 ()
" "
(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