Subject: bug#19433: closed (Re: bug#19433: Indentation goes haywire after using sh-mode/csh)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 23 Dec 2014 04:23:02 +0000

Your bug report

#19433: Indentation goes haywire after using sh-mode/csh

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19433: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19433
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19433: Indentation goes haywire after using sh-mode/csh
From: Stefan Monnier <[email-masked]>
To: Peter Oliver <[email-masked]>
Cc: [email-masked]
Date: Mon, 22 Dec 2014 23:22:29 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 24.5

> After editing a script written for a csh-family shell,
> fundamental-mode indents every time RET is pressed (the behaviour is
> the same as that described in bug 18756,
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18756).

Thanks.   I installed the patch below which should fix it.

        Stefan

diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 1165144..476c796 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2350,7 +2350,7 @@ Calls the value of `sh-set-shell-hook' if set."
 	    (sh-make-vars-local))
 	(message "Indentation setup for shell type %s" sh-shell))
     (message "No indentation for this shell type.")
-    (setq indent-line-function 'sh-basic-indent-line))
+    (setq-local indent-line-function 'sh-basic-indent-line))
   (when font-lock-mode
     (setq font-lock-set-defaults nil)
     (font-lock-set-defaults)

Subject: Indentation goes haywire after using sh-mode/csh
From: Peter Oliver <[email-masked]>
To: [email-masked]
Date: Mon, 22 Dec 2014 20:31:28 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Package: emacs
Version: 24.3.1

After editing a script written for a csh-family shell,
fundamental-mode indents every time RET is pressed (the behaviour is
the same as that described in bug 18756,
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18756).

This only happens when electric-indent-mode is on (which it is by
default in 24.4).

I'm currently using wet string for Internet access, but I can provide
a patch just as soon as my git clone completes...

-- 
Peter Oliver