* macro keybinding
@ 2008-10-01 9:20 Stefan Thomas
2008-10-02 4:35 ` Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Thomas @ 2008-10-01 9:20 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 636 bytes --]
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,
Stefan
[-- Attachment #2: Type: text/html, Size: 737 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: macro keybinding
2008-10-01 9:20 macro keybinding Stefan Thomas
@ 2008-10-02 4:35 ` Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2008-10-02 4:35 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Thomas wrote:
> 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.
C-x C-f ~/.emacs
M->
M-x insert-kbd-macro RET
C-x C-s
Compare the result of `M-x insert-kbd-macro' with `C-u M-x
insert-kbd-macro'.
> 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?
Put (load "/path/to/my-macros.el") in your ~/.emacs file
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.20328.1222869723.18990.help-gnu-emacs@gnu.org>]
* Re: macro keybinding
[not found] <mailman.20328.1222869723.18990.help-gnu-emacs@gnu.org>
@ 2008-10-01 14:57 ` Cor Gest
0 siblings, 0 replies; 3+ messages in thread
From: Cor Gest @ 2008-10-01 14:57 UTC (permalink / raw)
To: help-gnu-emacs
Some entity, AKA "Stefan Thomas" <kontrapunktstefan@googlemail.com>,
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-02 4:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 9:20 macro keybinding Stefan Thomas
2008-10-02 4:35 ` Kevin Rodgers
[not found] <mailman.20328.1222869723.18990.help-gnu-emacs@gnu.org>
2008-10-01 14:57 ` Cor Gest
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).