all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: etienne <etienne.mann@gmail.com>
To: Help-gnu-emacs@gnu.org
Subject: latex about global-set-key
Date: Tue, 11 Sep 2012 01:12:54 -0700 (PDT)	[thread overview]
Message-ID: <1347351173977-263707.post@n5.nabble.com> (raw)

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.



                 reply	other threads:[~2012-09-11  8:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347351173977-263707.post@n5.nabble.com \
    --to=etienne.mann@gmail.com \
    --cc=Help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.