[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] LaTeX mode should use local-abbrev-table based on minor m

From: Uwe Brauer
Subject: [AUCTeX-devel] LaTeX mode should use local-abbrev-table based on minor mode
Date: Mon, 15 Feb 2010 12:22:05 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.21 (linux)


In short: can I convince LaTeX to use the
local-abbrev-table based on a minor-mode?
(Using Xemcas 21.4.21 Mule)

Here is why:

I just killed all my text-mode and global mode tables and found
out that my "brilliant" idea of using local tables for
specific language does not work as I expected. 

HERE is what I wanted:

Flyspell  allows me to save the corrections either in the
global or local (text-mode) abbrev table.

Now there are words which spell a little different in
different language. 

For example in english possible, in Spanish posible

To substitute one for the other leads to nightmare.

So I came up following suggestion in a mailing  list I cannot
remember: to define a minor mode of each language and the
corresponding local-abbrev-table.

HERE is how I did this:

For example 

(define-abbrev-table 'castellano-minor-mode-abbrev-table '(
     ("tx2" "texto" nil 0)

(define-minor-mode castellano-minor-mode
    nil nil nil nil
    (setq local-abbrev-table
          (if castellano-minor-mode

I start 
(defun turn-on-castellano-mode ()               ;Version-1.15
  "Turn castellano mode on and all others off."
        (french-minor-mode 0)
        (deutsch-minor-mode 0)
        (british-minor-mode 0)
        (castellano-minor-mode 1)
        (message "Castellano mode is on, all others off.")
        (if ask-abbrev-table
                (describe-variable 'local-abbrev-table))))

and I check the local-abbrev-table is set to 

Value: [interes dia Implementacion descripcion substituyaron capezes explicíto 
obtenmos maltraba Nacion afectuo olivdaba combinacion codico informacion metodo 
habria debil codigo movil ibamos salvacion replezando debeis Aproximacion 
antropologo acohol tamano describarlos veen pelicula bibliografia separacion 
Conclusion electronico aproximacion ejercio fluctaba Desarollo matematica los\ 
practicas antropolog\? implementacion decomponer tenenmos mencinado los\ 
prácticas\  sofisitcadas funcion orginal observasiones informate mision 
discretitación resuelvalo anadido observese implicita antropologia]

First Problem

When I use edit-abbrevs and look at the castellano
it contains some 1060
entries while this table above only contains 60 words.

In any case I start to use flyspell correct words and indeed
the  abbrev mechanism works, unfortunately the abbrev are
not saved.

The is nacion is corrected to nación. Next time in this
message I type nacion it gets expanded  to nación but there
is no corresponding entry in to the
(castellano-minor-mode-abbrev-table) !!!

Second problem.

Now in text mode or LaTeX mode it is vice versa.

I start say turn-on-castellano-mode 
correct a word, that gets saved in the table but it *never*
gets expanded!!!

Can somebody tell me what shall I do?

Uwe Brauer 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]