[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19433: Indentation goes haywire after using sh-mode/csh
From: |
Stefan Monnier |
Subject: |
bug#19433: Indentation goes haywire after using sh-mode/csh |
Date: |
Mon, 22 Dec 2014 23:22:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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)