unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* latex about global-set-key
@ 2012-09-11  8:12 etienne
  0 siblings, 0 replies; only message in thread
From: etienne @ 2012-09-11  8:12 UTC (permalink / raw)
  To: Help-gnu-emacs

Hello,

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
thx



--
View this message in context: http://emacs.1067599.n5.nabble.com/latex-about-global-set-key-tp263707.html
Sent from the Emacs - Help mailing list archive at Nabble.com.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-11  8:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11  8:12 latex about global-set-key etienne

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