unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: andreas.roehler@online.de, emacs-devel@gnu.org
Subject: Re: shell-script indentation bug
Date: Thu, 28 Feb 2008 16:38:18 -0500	[thread overview]
Message-ID: <jwvtzjszrr2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87hcfsokub.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 28 Feb 2008 16:02:52 -0500")

>>> with cursor at the end of the line as shown below
>> 
>>> if [ $# == 0 ]; then
>>> ____________________|______
>> 
>> 
>>> C-j should indent.
>> 
>> Well, I'd agree, but it's done on purpose: C-j is bound to
>> sh-newline-and-indent whose docstring says:
>> 
>> Strip unquoted whitespace, insert newline, and indent like current line.
>> 
>> Please can someone investigate which this binding was added (what was
>> it trying to fix), and then make it DTRT?

> It is present in the original version of sh-script.el, 13 years ago.

> I think this binding should simply be removed, and the default
> (newline-and-indent) used instead.
 
Agreed,


        Stefan




      reply	other threads:[~2008-02-28 21:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-27  8:38 shell-script indentation bug Andreas Röhler
2008-02-27 16:21 ` Stefan Monnier
2008-02-28 21:02   ` Chong Yidong
2008-02-28 21:38     ` 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=jwvtzjszrr2.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=andreas.roehler@online.de \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /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).