From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: etienne mann Newsgroups: gmane.emacs.help Subject: about global-set-key Date: Sat, 1 Sep 2012 01:12:41 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0401240bc649cc04c897ed6f X-Trace: ger.gmane.org 1346455868 9076 80.91.229.3 (31 Aug 2012 23:31:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2012 23:31:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 01 01:31:10 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T7ag6-0006h7-8C for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Sep 2012 01:31:06 +0200 Original-Received: from localhost ([::1]:44620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7ag3-0000YA-Ih for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2012 19:31:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7aOK-0006S9-NN for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 19:12:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7aOJ-0007pW-E8 for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 19:12:44 -0400 Original-Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:41872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7aOJ-0007on-6N for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 19:12:43 -0400 Original-Received: by lahd3 with SMTP id d3so2769303lah.0 for ; Fri, 31 Aug 2012 16:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=N2pXHd38YIa5J8lE1l8aaZzCHY+2DADS+4oXkxLv554=; b=io4XxTnR+/tqiwlfYM9D5eN+qnHLMcY1yC5MOwCuWYUCBHuacAQkcgGPK10dTYasux WPowq1rgAPI/TRCNmhzpenXVStY81+HyP+it99h56zv+IONnHlDjRSGon5+EKBfv5Nje aB99ita60vBVSjj6resQAWNZVeQnNuSfcQ30mUVBHmVH8+9OnsPZYaQorcx841Yc7vOR 09cGCb4zf5oFV+P9gCQv116JymhByJzcapQ/zJmXvjqQ8GDu+jKq6/6Guq5BCAuFef6Q z7TbLXyxhBt1Qn15OsYQis6SFc5iy9PuR7s6MTMsBEjd+0zQoSAGfoHq7KAi6z3qIBPO RevQ== Original-Received: by 10.112.25.106 with SMTP id b10mr3061421lbg.28.1346454761654; Fri, 31 Aug 2012 16:12:41 -0700 (PDT) Original-Received: by 10.152.114.199 with HTTP; Fri, 31 Aug 2012 16:12:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.41 X-Mailman-Approved-At: Fri, 31 Aug 2012 19:30:59 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86619 Archived-At: --f46d0401240bc649cc04c897ed6f Content-Type: text/plain; charset=ISO-8859-1 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 --f46d0401240bc649cc04c897ed6f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

1) I am struggeling with my .emacs file: I want that when I p= ress "_" emacs write "_{ }".
So I write this in my .= emacs file

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

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

So in emacs, I try to M-x global-un= set-key then _ but it does not work in emacs. the button _ still works !!!<= br>
I also wanted to press ^ and get ^{} and press $ and have $ $ but it no= t works !

Notice that for ( ) or {} it works fine

2) my secon= d question is about an historical file and menu.Is it possible that emacs h= ave a menu with the last 10 files that I opened ?

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