# HG changeset patch # User Richard M. Stallman # Date 1031599020 0 # Node ID ff0c55c69b849c64a3d6419294a04c250ad98ed5 # Parent 8a11a2109567c7b31e0c9b960b509f238e152225 Document --script. diff -r 8a11a2109567 -r ff0c55c69b84 man/cmdargs.texi --- a/man/cmdargs.texi Mon Sep 09 05:50:58 2002 +0000 +++ b/man/cmdargs.texi Mon Sep 09 19:17:00 2002 +0000 @@ -195,11 +195,28 @@ or @samp{-f} option will be used as well, to invoke a Lisp program to do the batch processing. -@samp{-batch} implies @samp{-q} (do not load an init file). It also +@samp{--batch} implies @samp{-q} (do not load an init file). It also causes Emacs to exit after processing all the command options. In addition, it disables auto-saving except in buffers for which it has been explicitly requested. +@item --script @var{file} +@opindex --script +Run Emacs in batch mode, like @samp{--batch}, and then read and +execute the Lisp code in @var{file}. + +The normal use of this option is in executable script files that run +Emacs. They can start with this text on the first line + +@example +#!/usr/bin/emacs --script +@end example + +@noindent +which will invoke Emacs with @samp{--script} and supply the name of +the script file as @var{file}. Emacs Lisp then treats @samp{#!} as a +comment delimiter. + @item -q @opindex -q @itemx --no-init-file