From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: keyboard macro syntax Date: Fri, 11 Dec 2009 18:28:01 +0100 Organization: http://groups.google.com Message-ID: <87iqcd4dzy.fsf@ergodik.univ-brest.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260556102 24082 80.91.229.12 (11 Dec 2009 18:28:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Dec 2009 18:28: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 Fri Dec 11 19:28:15 2009 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 1NJADv-0003za-J7 for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 19:28:15 +0100 Original-Received: from localhost ([127.0.0.1]:34827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJADv-0008G2-8v for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Dec 2009 13:28:15 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!proxad.net!feeder1-2.proxad.net!u-picardie.fr!utc.fr!news.univ-lille1.fr!crihan.fr!news.univ-brest.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: mathw171.univ-brest.fr Original-X-Trace: news.univ-brest.fr 1260552608 23702 172.19.130.171 (11 Dec 2009 17:30:08 GMT) Original-X-Complaints-To: usenet@news.univ-brest.fr Original-NNTP-Posting-Date: 11 Dec 2009 17:30:08 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:6advtklOPSc5t+/tKLzPmlCUjHs= Original-Xref: news.stanford.edu gnu.emacs.help:175524 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:70601 Archived-At: 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).