emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19433: closed (Indentation goes haywire after usin


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19433: closed (Indentation goes haywire after using sh-mode/csh)
Date: Tue, 23 Dec 2014 04:23:01 +0000

Your message dated Mon, 22 Dec 2014 23:22:29 -0500
with message-id <address@hidden>
and subject line Re: bug#19433: Indentation goes haywire after using sh-mode/csh
has caused the debbugs.gnu.org bug report #19433,
regarding Indentation goes haywire after using sh-mode/csh
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19433: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19433
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- 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



--- End Message ---
--- Begin Message --- Subject: Re: 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)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]