From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: capnwhit@yahoo.com (Bob Whitaker) Newsgroups: gmane.emacs.help Subject: Re: How to set Emacs indentation style in batch mode Date: 26 Oct 2004 07:41:43 -0700 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <27dcd52b.0410260641.6b86eee4@posting.google.com> References: <27dcd52b.0410251728.272540da@posting.google.com> NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1098805364 8595 80.91.229.6 (26 Oct 2004 15:42:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Oct 2004 15:42:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 26 17:42:41 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMTT6-0000Ii-00 for ; Tue, 26 Oct 2004 17:42:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMTao-0001LG-DX for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Oct 2004 11:50:38 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: comp.emacs.xemacs,comp.emacs,gnu.emacs.help,gnu.emacs Original-Lines: 22 Original-NNTP-Posting-Host: 207.200.26.240 Original-X-Trace: posting.google.com 1098801703 4305 127.0.0.1 (26 Oct 2004 14:41:43 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 26 Oct 2004 14:41:43 +0000 (UTC) Original-Xref: shelby.stanford.edu comp.emacs.xemacs:75848 comp.emacs:86786 gnu.emacs.help:126071 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21449 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21449 Thanks to both!!! You were both right!!! The script now works great. For the archives, here is my current implementation (works OK): ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; FILE ;; ==== ;; emacs_pretty_print.el ;; ;; USAGE ;; ===== ;; Invoke "xemacs" as follows: ;; ;; xemacs -batch MyFile.cpp -load emacs_pretty_print.el ;; (c-set-style "stroustrup") (setq-default c-basic-offset 3) (setq-default indent-tabs-mode nil) (untabify (point-min) (point-max)) (indent-region (point-min) (point-max) nil) (save-buffer) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;