all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: meingbg <meingbg@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#5140: shell mode color coding for bash
Date: Mon, 7 Dec 2009 09:17:25 +0100	[thread overview]
Message-ID: <e83e84da0912070017i8fedc9g1f98b48e6086dbc4@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4173 bytes --]

When editing a bash script with nested " and ` marks the color coding gets
confused, coloring most text as a string. Sample code to reproduce the color
coding follows (this code is debugged and runs as expected, so syntax should
be ok)


#!/bin/bash

function list-dir {
cat "$repo"/list
}

function init-repo {
mkdir -p "$repo"
touch "$repo"/list
}

function save-dir {
init-repo
dirname="`basename "$1"`"
dirhash="`dir-to-repo "$1"`"
saveline="$dirhash $dirname"
if [ "`grep -Fc "$saveline" "$repo"/list`" -gt "0" ]; then
echo "A directory with the same name and content is already in the
repository."
exit
else
echo "$saveline" >> "$repo"/list
fi
}









In GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2008-05-02 on king, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.70000000
configured using `configure  '--build=x86_64-linux-gnu'
'--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.1/leim'
'--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars'
'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
-Wl,--as-needed' 'CPPFLAGS=''

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: en_US.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:
C-k C-k C-k <C-home> C-s f i l e - n a m e <backspace>
<right> <C-backspace> <C-backspace> b a s e n a m e
C-s C-s <right> <C-backspace> <C-backspace> b a s e
n a m e C-s C-s <right> <C-backspace> <C-backspace>
b a s e n a m e C-s C-s <right> <C-backspace> <C-backspace>
b a s e n a m e C-s C-s <C-home> C-s C-s C-s <C-home>
C-s C-g C-g C-s b a s C-g C-g <help-echo> <help-echo>
<help-echo> <C-home> C-s b a s e C-s C-s C-s C-s <down>
<C-home> <C-end> <up> <C-end> <C-end> <right> <right>
<backspace> <C-end> <C-end> <return> C-x C-s <down>
<down> <up> <up> <down> <down> <down> <down> <down>
<down> <up> <C-home> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <down-mouse-1>
<mouse-movement> <mouse-movement> <drag-mouse-1> C-w
C-k C-x C-s <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <up> <up> <up>
<up> <up> <help-echo> <help-echo> <help-echo> <help-echo>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<up> <up> M-x r e p o r t - e m a <tab> <return>

Recent messages:
Quit [4 times]
Mark set
Mark saved where search started
Mark set [4 times]
call-interactively: End of buffer [2 times]
Mark set [2 times]
Wrote /sr/path/store
Mark set
Wrote /sr/path/store
Loading emacsbug...done

[-- Attachment #2: Type: text/html, Size: 6158 bytes --]

             reply	other threads:[~2009-12-07  8:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jwv1vj6izgl.fsf-monnier+emacsbugreports@gnu.org>
2009-12-07  8:17 ` meingbg [this message]
2009-12-07 15:25   ` bug#5140: marked as done (shell mode color coding for bash) Emacs bug Tracking System

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=e83e84da0912070017i8fedc9g1f98b48e6086dbc4@mail.gmail.com \
    --to=meingbg@gmail.com \
    --cc=5140@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@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.