help-gnu-emacs
[Top][All Lists]
Advanced

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

about global-set-key


From: etienne mann
Subject: about global-set-key
Date: Sat, 1 Sep 2012 01:12:41 +0200

Hello,

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

2) my second question is about an historical file and menu.Is it possible that emacs have a menu with the last 10 files that I opened ?

If you can help me, I would be very happy
thx
Etienne

reply via email to

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