Discussion:
[Bug: 21.5-b29] wrong indentation within case command in sh-script
Andy Norman
2015-04-16 14:41:27 UTC
Permalink
================================================================
Dear Bug Team!

When writing a case command in a bash script, the lines below
each pattern aren't indented correctly with TAB. Perhaps they're
not identified correctly? (C-c ? shows the current identification.)

For example:

case foo in
test)
action

Hitting TAB on the "action" line doesn't indent it any further than
the pattern "test". It should indent it according to sh-indent-for-case-alt
I think.

On this note, I notice that sh-script.el that comes with FSF Emacs has moved
on
quite a bit since XEmacs synced with it at 21.4. Any change of another
re-sync?:)

Thanks.

-- ange --

================================================================

System Info to help track down your bug:
---------------------------------------

OS version:

Microsoft Windows XP [Version 5.1.2600]
OS: Windows_NT

XEmacs 21.5-b29 "garbanzo" configured for `i586-pc-win32'.

Building XEmacs using "nmake".
Building XEmacs using make flags " ".
Building XEmacs in source tree "C:\\XEmacsBuild\\xemacs-21.5.29".
For src, using compiler
cl -nologo -W3 -DSTRICT -Zi -Od -MD -c -TP -IC:\XEmacsBuild\xemacs-21.5.29\nt\inc
-IC:\XEmacsBuild\xemacs-21.5.29\src -I"C:/cygwin/usr/local/src\xpm-3.4k" -I"C:/cygwin/usr/local/src\xpm-3.4k\lib"
-I"C:/cygwin/usr/local/src\libpng-1.2.8" -I"C:/cygwin/usr/local/src/zlib" -I"C:/cygwin/usr/local/src/tiff-3.7.3\libtiff"
-I"C:/cygwin/usr/local/src\jpeg-6b" -I"C:/cygwin/usr/local/src/zlib" -DHAVE_MS_WINDOWS
-DHAVE_MENUBARS -DHAVE_SCROLLBARS -DHAVE_TOOLBARS -DHAVE_WIDGETS -DHAVE_DIALOGS
-DHAVE_XPM -DFOR_MSW -DHAVE_GIF -DHAVE_PNG -DHAVE_TIFF -DHAVE_JPEG -DHAVE_ZLIB
-DHAVE_NATIVE_SOUND -DMULE -DERROR_CHECK_ALL -DPDUMP -DSYSTEM_MALLOC -DDEBUG_XEMACS
-D_DEBUG -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs -DHAVE_CONFIG_H -DPATH_VERSION=\"21.5-b29\"
-DPATH_PROGNAME=\"xemacs\" -DEMACS_VERSION=\"21.5-b29\"
-DEMACS_PROGNAME=\"xemacs\" -DSHEBANG_PROGNAME=\"xemacs-script\" -DSTACK_TRACE_EYE_CATCHER=xemacs_21_5_b29_i586_pc_win32
-DPATH_PREFIX=\""C:/XEmacsBuild/installed/XEmacs-21.5.29"\" -DEMACS_MAJOR_VERSION=21
-DEMACS_MINOR_VERSION=5 -DEMACS_BETA_VERSION=29 -DXEMACS_CODENAME=\""garbanzo"\"
-DXEMACS_EXTRA_NAME=\"""\" -DEMACS_CONFIGURATION=\"i586-pc-win32\"".
For lib-src, using compiler
"cl -nologo -W3 -DSTRICT -Zi -Od -MD -IC:\XEmacsBuild\xemacs-21.5.29\lib-src
-IC:\XEmacsBuild\xemacs-21.5.29\src -DHAVE_CONFIG_H -DWIN32_NATIVE".
Compiling as C++.
Installing XEmacs in "C:/XEmacsBuild/installed/XEmacs-21.5.29".
Compiling in support for Microsoft Windows native GUI.
Compiling in international (MULE) support.
Compiling in support for XPM images.
Compiling in support for GIF images.
Compiling in support for PNG images.
Compiling in support for TIFF images.
Compiling in support for JPEG images.
Compiling in support for GZIP compression/decompression.
Compiling in support for toolbars.
Compiling in support for dialogs.
Compiling in support for widgets.
Compiling in support for native sounds.
Using portable dumper.
Using system malloc.
Using DLL version of C runtime library.
Compiling in extra internal error-checking.
NOTE: ---------------------------------------------------------
NOTE: Compiling in support for runtime error-checking.
NOTE: XEmacs will run noticeably more slowly as a result.
NOTE: Error-checking is on by default for XEmacs beta releases.
NOTE: ---------------------------------------------------------
Compiling in debugging support (no slowdown).


Load-Path Lisp Shadows:
----------------------
(c:\Program Files (x86)\XEmacs\mule-packages\lisp\mule-base\viet-util
c:\Program Files (x86)\XEmacs\XEmacs-21.5.29\lisp\mule\viet-util
c:\Program Files (x86)\XEmacs\mule-packages\lisp\mule-base\korea-util
c:\Program Files (x86)\XEmacs\XEmacs-21.5.29\lisp\mule\korea-util
c:\Program Files (x86)\XEmacs\mule-packages\lisp\mule-base\japan-util
c:\Program Files (x86)\XEmacs\XEmacs-21.5.29\lisp\mule\japan-util
c:\Program Files (x86)\XEmacs\mule-packages\lisp\mule-base\ethio-util
c:\Program Files (x86)\XEmacs\XEmacs-21.5.29\lisp\mule\ethio-util
c:\Program Files (x86)\XEmacs\mule-packages\lisp\mule-base\china-util
c:\Program Files (x86)\XEmacs\XEmacs-21.5.29\lisp\mule\china-util
c:\Program Files
(x86)\XEmacs\xemacs-packages\lisp\xemacs-base\regexp-opt c:\Program
Files (x86)\XEmacs\XEmacs-21.5.29\lisp\regexp-opt c:\Program Files
(x86)\XEmacs\xemacs-packages\lisp\xemacs-base\easy-mmode c:\Program
Files (x86)\XEmacs\XEmacs-21.5.29\lisp\easy-mmode)

Internationalization Settings:
-------------------------

Environment:

Value of LC_ALL : nil
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 : nil

Lisp locale settings:

current-language-environment => "English"
default-buffer-file-coding-system => mswindows-multibyte-dos
default-process-coding-system => (undecided .
mswindows-multibyte-system-default)
(current-locale) => "English_United Kingdom.1252"
keyboard-coding-system => mswindows-multibyte-system-default
terminal-coding-system => mswindows-multibyte-system-default
(coding-priority-list) =>
(iso-8-1 utf-16-little-endian-bom utf-16-bom utf-8-bom iso-7
no-conversion utf-8 iso-8-2 iso-8-designate iso-lock-shift
shift-jis big5 utf-16-little-endian utf-16 ucs-4)

Coding system aliases:

'native is aliased to
mswindows-multibyte-system-default-dos
'file-name is aliased to
mswindows-multibyte-system-default
'mswindows-multibyte-system-default is not a coding system alias


Installed XEmacs Packages:
-------------------------
(xemacs-devel ver: 1.79 upstream: No-Upstream-Ver)
(xemacs-base ver: 2.19 upstream: No-Upstream-Ver)
(time ver: 1.14 upstream: 1.17)
(text-modes ver: 1.96 upstream: No-Upstream-Ver)
(texinfo ver: 1.3 upstream: No-Upstream-Ver)
(speedbar ver: 1.29 upstream: 1.0pre4)
(sounds-wav ver: 1.12 upstream: No-Upstream-Ver)
(sh-script ver: 1.24 upstream: 2.0f)
(semantic ver: 1.21 upstream: 2.0pre4)
(prog-modes ver: 2.2 upstream: No-Upstream-Ver)
(perl-modes ver: 1.14 upstream: No-Upstream-Ver)
(pc ver: 1.28 upstream: No-Upstream-Ver)
(os-utils ver: 1.41 upstream: No-Upstream-Ver)
(net-utils ver: 1.56 upstream: N/A)
(mail-lib ver: 1.8 upstream: No-Upstream-Ver)
(fsf-compat ver: 1.17 upstream: No-Upstream-Ver)
(eieio ver: 1.06 upstream: 1.0pre4)
(efs ver: 1.34 upstream: 1.24)
(edit-utils ver: 2.4 upstream: No-Upstream-Ver)
(ediff ver: 1.77 upstream: 2.75)
(edebug ver: 1.22 upstream: No-Upstream-Ver)
(ecb ver: 1.22 upstream: 2.31)
(dired ver: 1.19 upstream: 7.16)
(debug ver: 1.18 upstream: No-Upstream-Ver)
(cc-mode ver: 1.45 upstream: 5.30.10)
(c-support ver: 1.22 upstream: No-Upstream-Ver)
(mule-base ver: 1.53 upstream: No-Upstream-Ver)
(lookup ver: 1.15 upstream: 1.0)
(locale ver: 1.28 upstream: No-Upstream-Ver)
(latin-unity ver: 1.2 upstream: 1.20)
(latin-euro-standards ver: 1.08 upstream: 1.08)



Features:
--------

(mail-abbrevs xemacsbug shadow sendmail rfc822 regexp-opt sh-script
cus-face executable efs-cu xemacs-devel-autoloads
xemacs-base-autoloads time-autoloads text-modes-autoloads
texinfo-autoloads speedbar-autoloads sounds-wav-autoloads
sh-script-autoloads semantic-autoloads prog-modes-autoloads
perl-modes-autoloads pc-autoloads os-utils-autoloads
net-utils-autoloads mail-lib-autoloads fsf-compat-autoloads
eieio-autoloads efs-autoloads edit-utils-autoloads ediff-autoloads
edebug-autoloads ecb-autoloads dired-autoloads debug-autoloads
cc-mode-autoloads c-support-autoloads mule-base-autoloads
lookup-autoloads locale-autoloads latin-unity-autoloads
latin-euro-standards-autoloads mule-autoloads auto-autoloads auto-show
fontl-hooks canna-leim tibetan slovenian czech romanian lao devanagari
indian cyrillic code-cmds gutter-items menubar-items x-menubar
dragdrop mode-motion mouse behavior itimer auto-save lisp-mode
easymenu easy-mmode iso8859-1 page buff-menu lib-complete loadhist
cus-file derived newcomment rsz-minibuf env text-props frame obsolete
cus-start custom widget cl-extra cl cl-19 packages backquote unicode
mswindows-scrollbars mswindows toolbar native-sound scrollbar
network-streams subprocesses menu-accelerator-support menubar md5
xemacs mule gutter tiff png gif jpeg xpm xbm lisp-float-type
file-coding dde windows-nt dragdrop-api dialog devices window-system
base64)


Recent keystrokes:
-----------------

C-x C-f f o o . s h RET # ! / b i n / b a s h C-x C-s
C-x k RET C-x C-f f o o SPC SPC RET down RET RET b
BS c a s e SPC f o o SPC i n RET TAB o n e ) RET TAB
C-c ? up C-c ? down down M-x r e p o SPC t SPC BS r
t SPC e SPC b SPC BS BS BS BS BS BS BS BS BS x e m
SPC b SPC RET


Recent messages (most recent first):
-----------------------------------

Loading xemacsbug...done
Loading xemacsbug...
Making completion list...
sh-indent-for-case-label is +
line has default indentation
line has default indentation
Indentation setup for shell type bash
Indentation variable are now local.
setting up indent stuff
Setting up indent for shell type bash
Wrote c:\Users\ange\Desktop\foo.sh
Indentation setup for shell type sh
Indentation variable are now local.
setting up indent stuff
Loading regexp-opt...done
Loading regexp-opt...
Setting up indent for shell type sh
Loading sh-script...done
Loading cus-face...done
Loading cus-face...

Loading...