help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyboard macro syntax


From: Andreas Röhler
Subject: Re: keyboard macro syntax
Date: Sun, 13 Dec 2009 10:34:31 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

harven wrote:
> There seems to be two different syntaxes for keyboard macros, 
> depending whether they are named using the commands
> name-last-kbd-macro or kmacro-name-last-macro e.g.
> 
> (fset 'hello1
>    [?\C-s ?h ?e ?l ?l ?o ?\C-m ?, ?  ?w ?o ?r ?l ?d ?! ?\C-u ?\C- ])
> 
> (fset 'hello2
>    (lambda (&optional arg) "Keyboard macro." (interactive "p") 
> (kmacro-exec-ring-item (quote ([19 104 101 108 108 111 13 44 119 111 114 108 
> 100 33 21 67108896] 0 "%d")) arg)))
> 
> Anyone knows why ?
> 
> The first one is more readable but I suspect the second one is the preferred 
> one 
> since it is granted a keybinding (C-x C-k n).
> 


Hi,

a more general remark: storing keyboard macros is useful for
simple tasks.

If you reach the point to edit your macro, it's
usually much faster to write your own functions. So far my experience.


Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]