Subject: 24.3; "emacs --batch -batch" fails with "Unknown option `-batch'"

From: Ulrich Mueller <[email-masked]>
Date: Tue, 3 Jun 2014 11:16:48 +0200

$ emacs --batch -batch; echo $?
Unknown option `-batch'
255
$ emacs -batch --batch; echo $?
Unknown option `--batch'
255
$ emacs --batch --batch; echo $?
0
$ emacs -batch -batch; echo $?
0

Same problem for --no-window-system -no-window-system. It doesn't
occur for all options though, e.g. --no-init-file -no-init-file
doesn't cause an error.

This is an issue mainly when calling Emacs from a Makefile, where
options from several variables (like AM_ELCFLAGS and ELCFLAGS) can be
accumulated.