[Top][All Lists]

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

latex about global-set-key

From: etienne
Subject: latex about global-set-key
Date: Tue, 11 Sep 2012 01:12:54 -0700 (PDT)


I am using emacs mostly for latex.
1) I am struggeling with my .emacs file: I want that when I press "_" emacs
write "_{ }".
So I write this in my .emacs file

(defun souligne () (interactive)
         (insert "_{}") (forward-char -1))
(global-set-key "_" 'souligne)

It does not work. What is strange is that if I put
(defun souligne () (interactive)
         (insert "_{}") (forward-char -1))
(global-set-key "z" 'souligne)
when I press "z", emacs write "_{}" !!!

So in emacs, I try to M-x global-unset-key then _ but it does not work in
emacs. the button _ still works !!!

I also wanted to press ^ and get ^{} and press $ and have $ $ but it not
works !

Notice that for ( ) or {} it works fine
If you can help me, I would be very happy

View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

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