From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Zeitler Newsgroups: gmane.emacs.bugs Subject: sh-script ksh option skeleton bug + a few suggestions Date: Mon, 14 Apr 2003 15:58:44 +0200 (MEST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200304141358.h3EDwiQ13000@sfsw51.de.lucent.com> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050328746 371 80.91.224.249 (14 Apr 2003 13:59:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2003 13:59:06 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 14 15:59:05 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1954UC-00005n-00 for ; Mon, 14 Apr 2003 15:59:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1954UJ-0005yu-03 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 14 Apr 2003 09:59:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1954U4-0005xS-00 for bug-gnu-emacs@gnu.org; Mon, 14 Apr 2003 09:58:56 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1954Ty-0005rn-00 for bug-gnu-emacs@gnu.org; Mon, 14 Apr 2003 09:58:55 -0400 Original-Received: from ihemail1.lucent.com ([192.11.222.161] helo=ihemail1.firewall.lucent.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1954Ty-0005r7-00 for bug-gnu-emacs@gnu.org; Mon, 14 Apr 2003 09:58:50 -0400 Original-Received: from nbgif1.de.lucent.com (h135-248-192-26.lucent.com [135.248.192.26])ESMTP id h3EDwmB00566 for ; Mon, 14 Apr 2003 09:58:48 -0400 (EDT) Original-Received: from sfsws1.de.lucent.com (sfsws1 [135.248.217.84]) by nbgif1.de.lucent.com (8.8.8/8.8.5) with ESMTP id PAA10172 for ; Mon, 14 Apr 2003 15:58:45 +0200 (MEST) Original-Received: from sfsw51.de.lucent.com (sfsw51 [135.248.210.168]) by sfsws1.de.lucent.com (8.11.6+Sun/8.8.5) with ESMTP id h3EDwiP22546 for ; Mon, 14 Apr 2003 15:58:44 +0200 (MEST) Original-Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.6+Sun/8.8.8) id h3EDwiQ13000; Mon, 14 Apr 2003 15:58:44 +0200 (MEST) Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4783 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4783 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (sparc-sun-solaris2.8, Motif Version 2.1.0) of 2003-04-08 on sfsws4 configured using `configure --with-gcc --prefix=/vol/freeware/SunOS-5.8/emacs/21.3 --sharedstatedir=/vol/freeware/SunOS-5.8/emacs/21.3/share --with-x-toolkit=motif --x-includes=/usr/openwin/include:/usr/local/gnu/include --x-libraries=/usr/openwin/lib:/usr/local/gnu/lib --with-pop' Important settings: value of $LC_ALL: value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: 1. start emacs -q --no-site-file 2. C-x C-f x.ksh 3. Insert "Options Loop", i.e. C-c C-o the code inserted from skeleton looks like: while getopts :ab OPT; do case $OPT in a|+a) ;;b|+b) ;;*) print "usage: ${0##*/} [+-ab} [--] ARGS..." exit 2 esac done OPTIND-1$(( OPTIND - 1 )) I've attached a patch to fix this. This patch also contains the following improvements: 1. add "select" to bash sh-other-keywords 2. correct ";;