>> Have you taken a look at key-translation-map?
>> Something like
>> 
>> (define-key key-translation-map "4" "$")
>> (define-key key-translation-map "$" "4")

> This seems to be better than using the macros but also worse...

> It's better because LaTeX mode still knows that $$, () etc should match
> each other but using key-translation-map, I'm mapping the keys globally,
> so the whole emacs has the keys swapped.

You probably want to do something like:

  (set (make-local-variable 'key-translation-map)
       (copy-keymap key-translation-map))

before the above two define-keys.  And put the whole thing inside
LaTeX-mode-hook (if you're using AUCTeX) or latex-mode-hook (otherwise).


        Stefan
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to