all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil Sainty <psainty@orcon.net.nz>
To: 22719@debbugs.gnu.org
Subject: bug#22719: 25.0.91; sh-mode indentation bug following FF/CR char variable assignments
Date: Thu, 18 Feb 2016 19:12:07 +1300	[thread overview]
Message-ID: <56C560B7.40303@orcon.net.nz> (raw)
In-Reply-To: <56C476EC.8010004@orcon.net.nz>

Rather than LF/line-feed, I did of course mean FF/form-feed!

I shouldn't write bug reports whilst tired.

(Carriage return was correct, at least.)

So: the issue occurs with either a ^M or ^L character.

Apologies for any confusion. I've edited the subject and the
quote below to correct these mistakes.


On 18/02/16 02:34, Phil Sainty wrote:
> n.b. In the following test case, you need an actual form-feed
> char (C-q C-l) in place of the ^L
>
> #!/bin/sh
> var=\f^L
> echo "this line gets indented"
>
>
> If you auto-indent that script, the code following the form-feed
> char is incorrectly indented.
>
> I also see that the same thing happens with a carriage-return char,
> so maybe it's a white-space control character issue? (Space and Tab
> don't trigger it, but I don't think those can be valid assignments
> when they're not quoted.)
>
> Other control chars don't seem to cause this.
>
> Workarounds are quoting the FF/CR, or suffixing a semicolon.
>
>
> -Phil
>
>
>
>
>
>
>
> In GNU Emacs 25.0.91.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d
> scroll bars)
>   of 2016-02-18 built on shodan
> Repository revision: 14aec913ac3f0dd408487c0e8327403e0f239964
> Windowing system distributor 'The X.Org Foundation', version 11.0.11701000
> System Description:    Ubuntu 15.04
>
> Configured using:
>   'configure --prefix=/home/phil/emacs/trunk/usr/local
>   --with-x-toolkit=lucid --without-sound'
>
> Configured features:
> XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK DBUS GSETTINGS NOTIFY
> GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
>
> Important settings:
>    value of $LANG: en_NZ.UTF-8
>    value of $XMODIFIERS: @im=ibus
>    locale-coding-system: utf-8
>
> Major mode: Shell-script
>
> Minor modes in effect:
>    sh-electric-here-document-mode: t
>    show-paren-mode: t
>    minibuffer-depth-indicate-mode: t
>    winner-mode: t
>    global-hl-line-mode: t
>    tooltip-mode: t
>    global-eldoc-mode: t
>    electric-indent-mode: t
>    mouse-wheel-mode: t
>    menu-bar-mode: t
>    file-name-shadow-mode: t
>    global-font-lock-mode: t
>    font-lock-mode: t
>    auto-composition-mode: t
>    auto-encryption-mode: t
>    auto-compression-mode: t
>    line-number-mode: t
>    transient-mark-mode: t
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> GNU Emacs 25.0.91.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll
> bars) of 2016-02-18
> Mark set [5 times]
> Setting up indent for shell type sh
> Indentation variables are now local.
> Indentation setup for shell type sh
> Mark activated
> Indenting region...done
> Undo!
> funcall-interactively: End of buffer
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message dired-x dired format-spec rfc822
> mml mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode
> mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
> rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase
> cl-lib mail-prsvr mail-utils sh-script smie executable paren mb-depth
> winner ring hl-line time-date mule-util tooltip eldoc electric uniquify
> ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd
> tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
> elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
> select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
> frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan
> thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
> slovak czech european ethiopic indian cyrillic chinese charscript
> case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
> cl-preloaded nadvice loaddefs button faces cus-face macroexp files
> text-properties overlay sha1 md5 base64 format env code-pages mule
> custom widget hashtable-print-readable backquote dbusbind inotify
> dynamic-setting system-font-setting font-render-setting x-toolkit x
> multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 93900 8317)
>   (symbols 48 20374 0)
>   (miscs 40 79 221)
>   (strings 32 17885 4311)
>   (string-bytes 1 490436)
>   (vectors 16 12632)
>   (vector-slots 8 440791 5202)
>   (floats 8 168 90)
>   (intervals 56 264 0)
>   (buffers 976 11)
>   (heap 1024 24743 910))
>





      reply	other threads:[~2016-02-18  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 13:34 bug#22719: 25.0.91; sh-mode indentation bug following LF/CR char variable assignments Phil Sainty
2016-02-18  6:12 ` Phil Sainty [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

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

  git send-email \
    --in-reply-to=56C560B7.40303@orcon.net.nz \
    --to=psainty@orcon.net.nz \
    --cc=22719@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.