unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: help-gnu-emacs@gnu.org
Subject: Re: flyspell: local abbrev in different languages
Date: Thu, 27 Sep 2007 15:24:57 +0200	[thread overview]
Message-ID: <200709271524.58114.andreas.roehler@online.de> (raw)
In-Reply-To: <87tzphjnej.fsf@mat.ucm.es>

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))

  reply	other threads:[~2007-09-27 13:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26  8:31 flyspell: local abbrev in different languages Uwe Brauer
2007-09-26 16:28 ` Andreas Röhler
     [not found] ` <mailman.1324.1190824116.18990.help-gnu-emacs@gnu.org>
2007-09-26 18:24   ` Uwe Brauer
2007-09-27 13:24     ` Andreas Röhler [this message]
     [not found]     ` <mailman.1393.1190899494.18990.help-gnu-emacs@gnu.org>
2007-09-27 14:01       ` Uwe Brauer
2007-09-28  6:28         ` Andreas Röhler
     [not found]         ` <mailman.1416.1190960922.18990.help-gnu-emacs@gnu.org>
2007-09-28  8:31           ` (inverse)-add-local-mode-abbrev (was: flyspell: local abbrev in different languages) Uwe Brauer
2007-09-28 15:12       ` flyspell: local abbrev in different languages Stefan Monnier
2007-09-28 15:40         ` Uwe Brauer
2007-09-28 16:29         ` prbl msg mode (was: flyspell: local abbrev in different languages) Uwe Brauer
2007-09-28 17:45           ` prbl msg mode Uwe Brauer
2007-09-27  9:51   ` flyspell: local abbrev in different languages Uwe Brauer
2007-09-27 10:27     ` Uwe Brauer

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200709271524.58114.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=oub@mat.ucm.es \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).