emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#2910: closed (23.0.60; Shell-script coloring bug)


From: GNU bug Tracking System
Subject: bug#2910: closed (23.0.60; Shell-script coloring bug)
Date: Sat, 14 Oct 2023 15:03:02 +0000

Your message dated Sat, 14 Oct 2023 11:01:40 -0400
with message-id <jwvpm1hjljr.fsf-monnier+emacs@gnu.org>
and subject line Re: bug#2910: 23.0.60; Shell-script coloring bug
has caused the debbugs.gnu.org bug report #26217,
regarding 23.0.60; Shell-script coloring bug
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
26217: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26217
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 23.0.60; Shell-script coloring bug Date: Mon, 6 Apr 2009 22:46:30 +0100 (BST) User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
In shell-script mode (at least for Shell-script[sh]), in the following line:

for i do

the token “do” is not colored as a keyword, which it should be. From
the relevant POSIX documentation:

http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02

The format for the for loop is as follows:

    for name [ in [word ... ]]do
        compound-list


    done

Note that there is no explicit mention of semi-colons (this appears to
be the issue, as if the line is changed to

for i; do

then it is colored correctly, although in fact this syntax is NOT
permitted by POSIX, although bash accepts it.) A semi-colon is only
needed (and indeed, rqeuired) when an “in” clause is used, as the
“word” list mentioned above must end in a semicolon.

Hence, two things seem to need fixing:

1. In Shell-script[sh,bash] modes, “for name do” should color “do” as
   a keyword.

2. In Shell-script[sh], “for name; do” should *not* color “do” as a
   keyword.


In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.14.3)
 of 2008-10-13 on rothera, modified by Debian
 (emacs-snapshot package, version 1:20081013-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-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/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-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_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

--
http://rrt.sc3d.org/ | impatience, n.  the urge to do nothing
Listening to: 'Sanctus and Benedictus' from 'Mass of the Children and other
sacred music' (The Cambridge Singers / John Rutter)



--- End Message ---
--- Begin Message --- Subject: Re: bug#2910: 23.0.60; Shell-script coloring bug Date: Sat, 14 Oct 2023 11:01:40 -0400 User-agent: Gnus/5.13 (Gnus v5.13)
>> I haven't found problems, but I'm suspicious because it seems too easy.
> Welcome to the world of Emacs, where "if it's easy it must be right".

BTW, pushed to `master`, thank you.


        Stefan



--- End Message ---

reply via email to

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