[Top][All Lists]

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

shell-script indentation bug

From: Andreas Röhler
Subject: shell-script indentation bug
Date: Wed, 27 Feb 2008 09:38:47 +0100
User-agent: KMail/1.9.5

Following the request

"shell-script indenting of &&, |"

I stumble over a supposed bug.

In a buffer in sh-mode

with cursor at the end of the line as shown below

if [ $# == 0 ]; then

C-j should indent.

Presently it doesn't, jumps to column 0.

A second C-i or `indent-according-to-mode' is needed.

A fix could call `indent-according-to-mode' always
after C-j.

Agreed so far?


Andreas Röhler

In GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.10.6)
 of 2007-12-09 on noname
Windowing system distributor `The X.Org Foundation', version 11.0.70199902
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Shell-script

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> C-x C-f p r o g <tab> m u <tab> 
e i s <tab> . <tab> <return> <down> <down> <down> <down> 
<down> <left> C-j M-x r e p o r t - e m <tab> <ret

Recent messages:
Finished loading /usr/local/share/emacs/site-lisp/egg/leim-list.el 
   and load others...
Loading /usr/local/share/emacs/23.0.50/leim/leim-list.el (source)...done
Loading /MYPATH/emacs/20071207/emacs/leim/leim-list.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Setting up indent for shell type bash
setting up indent stuff
Indentation variables are now local.
Indentation setup for shell type bash

reply via email to

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