From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cor Gest Newsgroups: gmane.emacs.help Subject: Re: macro keybinding Date: Wed, 01 Oct 2008 14:57:43 +0000 Organization: Clsnet Linux Systems Message-ID: <87od24z7ko.fsf@atthis.clsnet.nl> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222875742 3289 80.91.229.12 (1 Oct 2008 15:42:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Oct 2008 15:42:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 01 17:43:21 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kl3qx-0007pm-V2 for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 17:43:04 +0200 Original-Received: from localhost ([127.0.0.1]:40354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kl3pu-0005He-Un for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Oct 2008 11:41:59 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!xs4all!transit1.news.xs4all.nl!post2.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Draft-From: ("gnu.emacs.help" 2442) X-Www-Site: http://www.clsnet.nl X-Gpg-Key: http://www.clsnet.nl/GPG-data.txt User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:DElLFeYToYNH4gIKUPlZIWdLdNY= Original-Lines: 47 Original-NNTP-Posting-Host: 213.84.183.106 Original-X-Trace: 1222873383 dreader29.news.xs4all.nl 3171 213.84.183.106:53690 Original-Xref: news.stanford.edu gnu.emacs.help:162915 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58256 Archived-At: Some entity, AKA "Stefan Thomas" , wrote this mindboggling stuff: (selectively-snipped-or-not-p) > Hi, > since Yesterdy I try to understand emacs, so I'm a bloody newbie. > I habve a question on macro keybindings. In the manual I've read: > "If you give insert-kbd-macro a numeric argument, it makes additional Lisp > code to record the keys (if any) that you have bound to macroname, so that > the macro will be reassigned the same keys when you load the file. " > But I don't understand that. I don't know, how to save the keybinding for > a defined macro forever. > And my next question would be: I would like to define some macros in a > el-file. > How can I load them automatically, when I start emacs? > Thanks for Your help and Your patience, It looks like this, to keep things simple. make a file called parens.el ;;; --*-- emacs-lisp::parens.el --*-- ;;; ;;; Change Keyboard-setting to lispy values" ;;; Interchange the [ ] keys with ( ) (keyboard-translate ?\[ ?\() (keyboard-translate ?\) ?\]) (keyboard-translate ?\] ?\)) (keyboard-translate ?\( ?\[) Then you put in your .emacs : (load-file "parens.el") Now it wil be loaded each time you start emacs, or do M-x load-file RET parens.el when you need it if you do not auto-load it. Now you will not have to do SHIFT-9 or SHIFT-0 to get ( and ). which are now put under to the [ ] keys. Cor -- Mijn Tools zijn zo modern dat ze allemaal eindigen op 'saurus' (defvar My-Computer '((OS . "GNU/Emacs") (IPL . "GNU/Linux"))) SPAM DELENDA EST http://www.clsnet.nl/mail.php 1st Law of surviving a gunfight : Have a gun