GNU bug report logs -
#9190
24.0.50; wrong indentation in shell mode with main function
Previous Next
Reported by: ivan.kanis <at> googlemail.com
Date: Thu, 28 Jul 2011 19:12:04 UTC
Severity: normal
Found in version 24.0.50
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 9190-done <at> debbugs.gnu.org (full text, mbox):
> 2) paste the following
> main () {
> }
> 3) press tab on the last line
> The curly bracket is indented wrong:
> main () {
> }
> The curly bracket is incorrectly indented. It happens to any function
> ending in main. Reproducible on emacs 23.3 and bzr.
Indeed, it's the case for any function ending in "in". I've installed
the patch below which should fix the problem,
Stefan
--- lisp/progmodes/sh-script.el 2011-04-22 18:44:26 +0000
+++ lisp/progmodes/sh-script.el 2011-08-03 01:54:12 +0000
@@ -1066,7 +1066,7 @@
;; a normal command rather than the real `in' keyword.
;; I.e. we should look back to try and find the
;; corresponding `case'.
- (and (looking-at ";[;&]\\|in")
+ (and (looking-at ";[;&]\\|\\_<in")
;; ";; esac )" is a case that looks like a case-pattern
;; but it's really just a close paren after a case
;; statement. I.e. if we skipped over `esac' just now,
This bug report was last modified 13 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.