From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: about global-set-key Date: Sat, 01 Sep 2012 02:20:08 +0200 Message-ID: <871uima91j.fsf@googlemail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1346458648 27497 80.91.229.3 (1 Sep 2012 00:17:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Sep 2012 00:17:28 +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 02:17:27 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 1T7bOu-0001Eh-Lj for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Sep 2012 02:17:24 +0200 Original-Received: from localhost ([::1]:49998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7bOr-00063C-VF for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2012 20:17:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7bOn-000634-2m for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 20:17:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7bOl-0007dF-Vr for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 20:17:17 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:52256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7bOl-0007d8-Oo for help-gnu-emacs@gnu.org; Fri, 31 Aug 2012 20:17:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T7bOk-00010b-BN for help-gnu-emacs@gnu.org; Sat, 01 Sep 2012 02:17:14 +0200 Original-Received: from g231235128.adsl.alicedsl.de ([92.231.235.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Sep 2012 02:17:14 +0200 Original-Received: from tjolitz by g231235128.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 01 Sep 2012 02:17:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231235128.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:yltCv4vVg9hDtCjzLSeXnpL/WV4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:86621 Archived-At: etienne mann writes: 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 ? Just a curiosity - I'm currently writing an Emacs mode for the PicoLisp-Wiki that requires exactly this syntax: ,---- | _{} | ^{} | !{} `---- (and quite a few others ...) Are we, just by casuality, working on the same thing without being aware of it? My mode is almost done and lets you insert and fontificate these constructs. I only need to add a few commands. I probably publish a Beta version this weekend on Github, will announce it here on the list. -- cheers, Thorsten