unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Peter Oliver <lists.gnu.org@mavit.org.uk>
Cc: 19433-done@debbugs.gnu.org
Subject: bug#19433: Indentation goes haywire after using sh-mode/csh
Date: Mon, 22 Dec 2014 23:22:29 -0500	[thread overview]
Message-ID: <jwvbnmvj8v9.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CABmZtU6SPzhmeZcBPZ9o9iuiK83x631mmABAkBubvfXqeWLbKw@mail.gmail.com> (Peter Oliver's message of "Mon, 22 Dec 2014 20:31:28 +0000")

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)





      reply	other threads:[~2014-12-23  4:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 20:31 bug#19433: Indentation goes haywire after using sh-mode/csh Peter Oliver
2014-12-23  4:22 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbnmvj8v9.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=19433-done@debbugs.gnu.org \
    --cc=lists.gnu.org@mavit.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).