Mercurial > hg > xemacs-beta
comparison man/xemacs/cmdargs.texi @ 4448:fd8a9a4d81d9
Support #!, to allow XEmacs to be called as a script interpreter.
ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* Makefile.in.in (SHEBANG_PROGNAME):
New variable; a symbol link to the XEmacs binary to tell it it
should read a script from stdin.
* configure.ac (XE_EXPAND_VARIABLE):
Set SHEBANG_PROGNAME.
* configure:
Regenerate.
src/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* config.h.in: Add SHEBANG_PROGNAME.
* emacs.c (main_1):
If we've been called using SHEBANG_PROGNAME, rewrite our arguments
to add a --script argument.
Also, handle the --script argument by setting noninteractive and
vanilla.
* lread.c (Fload_internal):
If the first two characters of a file are #!, replace them with ;!
before they get to the Lisp reader.
lisp/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* startup.el (command-line-do-script): New.
(command-switch-alist): Use command-line-do-script.
New argument, compatible with GNU; --script or -script says "treat
the following argument as a file to load in batch mode".
man/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea@parhasard.net>
* xemacs/cmdargs.texi (Command Switches):
Describe --script, -script.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 20 Jan 2008 19:53:54 +0100 |
parents | 1ccc32a20af4 |
children |
comparison
equal
deleted
inserted
replaced
4408:8bbabcab2c42 | 4448:fd8a9a4d81d9 |
---|---|
169 | 169 |
170 @item -no-early-packages | 170 @item -no-early-packages |
171 Do not process early packages. (For more information on startup issues | 171 Do not process early packages. (For more information on startup issues |
172 concerning the package system, @xref{Startup Paths}.) | 172 concerning the package system, @xref{Startup Paths}.) |
173 | 173 |
174 @item -script @var{file} | |
175 @item --script @var{file} | |
176 Load @var{file} as a (compiled or interpreted) Lisp file; do not load | |
177 any window-system or TTY code, do not load the user init file, the site | |
178 file, or the early packages. This is comparable to running | |
179 @samp{xemacs} @samp{-batch} @samp{-l} @var{file}. | |
180 | |
181 You can also specify this flag implicitly by calling the XEmacs binary | |
182 with a value for @samp{argv[0]} of @samp{xemacs-script}, normally by | |
183 means of a symbolic link. On a POSIX system, this means that adding the | |
184 line: | |
185 | |
186 @example | |
187 #!/usr/bin/env xemacs-script | |
188 @end example | |
189 | |
190 at the start of an XEmacs Lisp file, and changing that file's | |
191 permissions to executable, creates a script that can be invoked by | |
192 typing the path to the file. XEmacs has logic to ignore the #! line at | |
193 the start of the script, so that won't cause an error. | |
194 | |
174 @item -vanilla | 195 @item -vanilla |
175 This is equivalent to @samp{-q -no-site-file -no-early-packages}. | 196 This is equivalent to @samp{-q -no-site-file -no-early-packages}. |
176 | 197 |
177 @item -user-init-file @var{file} | 198 @item -user-init-file @var{file} |
178 Load @var{file} as your Emacs init file instead of | 199 Load @var{file} as your Emacs init file instead of |