diff options
| author | Stefan Monnier | 2014-12-04 10:09:08 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2014-12-04 10:09:08 -0500 |
| commit | e3c24b171bfff16fb808cb02d3fc5eaff017c1bc (patch) | |
| tree | 36899d349d406a88d8f3d53a999dbe93ed1891c2 /test | |
| parent | d9d383147219f8e6a90d4c177e1b454e19acfac9 (diff) | |
| download | emacs-e3c24b171bfff16fb808cb02d3fc5eaff017c1bc.tar.gz emacs-e3c24b171bfff16fb808cb02d3fc5eaff017c1bc.zip | |
* lisp/progmodes/sh-script.el: Fix indentation rule of "| while".
Fixes: debbugs:18031
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Go back to the beginning
of the whole pipe when indenting an opening keyword after a |.
Generalize this treatment to opening keywords like "while".
Diffstat (limited to 'test')
| -rwxr-xr-x | test/indent/shell.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/indent/shell.sh b/test/indent/shell.sh index e3619057d6e..14f67744ff2 100755 --- a/test/indent/shell.sh +++ b/test/indent/shell.sh | |||
| @@ -54,6 +54,17 @@ filter_3 () # bug#17842 | |||
| 54 | grep -v "^," | sort -t, -k2,2 | 54 | grep -v "^," | sort -t, -k2,2 |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | foo | bar | { | ||
| 58 | toto | ||
| 59 | } | ||
| 60 | |||
| 61 | grep -e "^$userregexp:" /etc/passwd | cut -d : -f 1 | while read user ; do | ||
| 62 | print -u2 "user=$user" # bug#18031 | ||
| 63 | sudo -U $user -ll | while read line ; do | ||
| 64 | : | ||
| 65 | done | ||
| 66 | done | ||
| 67 | |||
| 57 | echo -n $(( 5 << 2 )) | 68 | echo -n $(( 5 << 2 )) |
| 58 | # This should not be treated as a heredoc (bug#12770). | 69 | # This should not be treated as a heredoc (bug#12770). |
| 59 | 2 | 70 | 2 |