GNU bug report logs - #19433
Indentation goes haywire after using sh-mode/csh

Previous Next

Package: emacs;

Reported by: Peter Oliver <lists.gnu.org <at> mavit.org.uk>

Date: Mon, 22 Dec 2014 20:32:02 UTC

Severity: normal

Merged with 20101, 20557

Found in versions 24.3.1, 24.4

Fixed in version 24.5

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19433 in the body.
You can then email your comments to 19433 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19433; Package emacs. (Mon, 22 Dec 2014 20:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Oliver <lists.gnu.org <at> mavit.org.uk>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 22 Dec 2014 20:32:02 GMT) Full text and rfc822 format available.

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

From: Peter Oliver <lists.gnu.org <at> mavit.org.uk>
To: submit <at> debbugs.gnu.org
Subject: Indentation goes haywire after using sh-mode/csh
Date: Mon, 22 Dec 2014 20:31:28 +0000
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




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Tue, 23 Dec 2014 04:23:01 GMT) Full text and rfc822 format available.

Notification sent to Peter Oliver <lists.gnu.org <at> mavit.org.uk>:
bug acknowledged by developer. (Tue, 23 Dec 2014 04:23:02 GMT) Full text and rfc822 format available.

Message #10 received at 19433-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Peter Oliver <lists.gnu.org <at> mavit.org.uk>
Cc: 19433-done <at> debbugs.gnu.org
Subject: Re: bug#19433: Indentation goes haywire after using sh-mode/csh
Date: Mon, 22 Dec 2014 23:22:29 -0500
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)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Jan 2015 12:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 13 Mar 2015 18:16:02 GMT) Full text and rfc822 format available.

Forcibly Merged 19433 20101. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 13 Mar 2015 18:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 11 Apr 2015 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 12 May 2015 16:24:03 GMT) Full text and rfc822 format available.

Forcibly Merged 19433 20101 20557. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 12 May 2015 16:24:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Jun 2015 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 180 days ago.

Previous Next


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