unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19433: Indentation goes haywire after using sh-mode/csh
@ 2014-12-22 20:31 Peter Oliver
  2014-12-23  4:22 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Oliver @ 2014-12-22 20:31 UTC (permalink / raw)
  To: 19433

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19433: Indentation goes haywire after using sh-mode/csh
  2014-12-22 20:31 bug#19433: Indentation goes haywire after using sh-mode/csh Peter Oliver
@ 2014-12-23  4:22 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-12-23  4:22 UTC (permalink / raw)
  To: Peter Oliver; +Cc: 19433-done

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)





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-23  4:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-22 20:31 bug#19433: Indentation goes haywire after using sh-mode/csh Peter Oliver
2014-12-23  4:22 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).