changeset 28923:dcafe3c9cd6c

(sh-while-getopts) <sh>: Handle case that user-specified option string is empty.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 15 May 2000 20:14:39 +0000
parents c0732e5c1f58
children 7932a964e38f
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Mon May 15 20:13:54 2000 +0000
+++ b/lisp/progmodes/sh-script.el	Mon May 15 20:14:39 2000 +0000
@@ -3943,7 +3943,8 @@
 	 (while (search-backward ":" v1 t)
 	   (replace-match " ARG] [+-" t t)))
       (if (eq (preceding-char) ?-) -5)
-      "] [--] ARGS...\"" \n
+      (if (length v1) "] ")
+      "[--] ARGS...\"" \n
       "exit 2"  > \n
         "esac" >
 	 \n "done"