define-key and auctex

define-key and auctex

Post by Sebastian Freund » Sun, 07 Apr 2002 02:17:57

Hi Dominique,

I'm sorry for having sent mail directly to you.
And I'm even more sorry for having sent nonsense. I wasn't
concentrated enough. So I'm trying to do better now.

When Your emacs is loaded, AUCTeX is merely required but not
completely set up, thus emacs does *NOT* know about a mode-map called
TeX-mode-map (neither is LaTeX-mode-map known).
Therefore the error occurs.

Please try the following:

Instead of

Quote:> (require tex-site)
> (define-key TeX-mode-map 'f1 'my-new-binding)

(require 'tex-site)
(add-hook 'LaTeX-mode-hook
          '(lambda nil
            (define-key LaTeX-mode-map [f1] 'whatever-you-want)))

When opening a (La)TeX document now, it should work. AUCTeX is first
loaded and the (La)TeX-mode-map is set up,
then the hook is run and voil.

The thing you used before switching to AUCTeX had worked for it was an
`emacs-built-in-mode' and tex-mode-map was therefore known.



1. define-key and auctex


I have a problem configuring my keybindings when using auctex.

In my .emacs I use to have :

(require tex-mode)
(define-key tex-mode-map 'f1 'my-new-binding)

which worked quite well. When turming to auctex :

(require tex-site)
(define-key TeX-mode-map 'f1 'my-new-binding)

does not work anymore :
(void-variable TeX-mode-map)  (when running xemacs with -debug-init option)
same kind of message with :

(require tex-site)
(define-key tex-mode-map 'f1 'my-new-binding)

Thanks for your help


2. windows2000 peer to peer network problem

3. define-key vs. *-set-key

4. How to convert from Visual SourceSafe to CVS

5. set-key <> define-key

6. HOw to make setup

7. How to specify the DEL key in a define-key

8. Engineering Positions

9. define-key global-map vs. global-set-key?

10. global-key-set and define-key in demacs

11. define-key function-key-map 'dead_acute...

12. define-key... sgml-mode-map???

13. define-key