From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kj Newsgroups: gmane.emacs.help Subject: How to convert this macro to Elisp? Date: Tue, 16 Feb 2010 00:16:40 +0000 (UTC) Organization: none Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1266300408 22235 80.91.229.12 (16 Feb 2010 06:06:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Feb 2010 06:06:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 16 07:06:46 2010 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.69) (envelope-from ) id 1NhGa5-0002Kz-RN for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Feb 2010 07:06:46 +0100 Original-Received: from localhost ([127.0.0.1]:50049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhGa5-0007PQ-Bq for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Feb 2010 01:06:45 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: panix2.panix.com Original-X-Trace: reader2.panix.com 1266279400 9766 166.84.1.2 (16 Feb 2010 00:16:40 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Tue, 16 Feb 2010 00:16:40 +0000 (UTC) X-No-Confirm: yes User-Agent: nn/6.7.3 Original-Xref: news.stanford.edu gnu.emacs.help:176808 X-Mailman-Approved-At: Tue, 16 Feb 2010 01:05:56 -0500 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:71878 Archived-At: I have a macro that I want to convert to Elisp. Furthermore, I want the resulting code to be completely non-interactive. Here's what the macro looks like: C-x RET c ;; universal-coding-system-argument euc-jp ;; self-insert-command * 6 RET ;; newline C-x C-f ;; find-file test ;; self-insert-command * 4 RET ;; newline C-x RET f ;; set-buffer-file-coding-system utf-8 ;; self-insert-command * 5 RET ;; newline C-x C-s ;; save-buffer raw-text ;; self-insert-command * 8 RET ;; newline How can I convert this to Elisp? The last two lines of the macro above point to a potential wrinkle. 'raw-text' is my interactive response when Emacs asked what to do about characters that it was unable to encode using the requested encoding. I imagine that in some cases this warning will not appear, so this response would be unnecessary. TIA! ~K