GNU bug report logs - #46093
Shell-script mode formatting error eats half the page

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 25 Jan 2021 06:35:01 UTC

Severity: minor

Tags: confirmed, patch

Merged with 2910, 21244, 26217, 30170, 48193

Found in versions 25.0.95, 25.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Shell-script mode formatting error eats half the page
Date: Mon, 25 Jan 2021 12:40:44 +0800
Here we observe lines severely shoved over due to Shell-script mode not
recognizing the statement has terminated. emacs-version "27.1".

$ cat x.sh
set /home/$j/.adobe /home/$j/.macromedia && for i do if test -d $i; then rm -vr $i; fi; done
                                                echo these lines are now indented wrongly
                                                echo these lines are now indented wrongly for the rest of the file.
                                                echo There is no recovery.

"Well then use if ...; then ..."

if set /home/$j/.adobe /home/$j/.macromedia
then for i do if test -d $i; then rm -vr $i; fi; done
     fi #UH OH, STILL MESSED UP
	 set /home/$j/.procmail/backup #UH OH EVEN MORE
	 if ! test -d $1 #AT LEAST INDENTING HAS STABILIZED finally



if set /home/$j/.adobe /home/$j/.macromedia
then
    for i do if test -d $i; then rm -vr $i; fi; done
    fi #STILL BAD


if set /home/$j/.adobe /home/$j/.macromedia
then
    for i
    do if test -d $i; then rm -vr $i; fi; done
fi #AH, FINALLY it has come to its senses.




This bug report was last modified 1 year and 221 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.