From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "=?iso-8859-1?q?G=F6ran_Uddeborg?=" Newsgroups: gmane.emacs.bugs Subject: Shell script mode does not re-color the buffer when changing shell Date: Fri, 12 Aug 2005 16:32:38 +0200 Message-ID: <200508121432.j7CEWcTZ019424@brockville.carmen.se> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1123858949 390 80.91.229.2 (12 Aug 2005 15:02:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2005 15:02:29 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 12 17:02:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3b1d-0002KT-Ok for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Aug 2005 17:00:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3b4r-0000RN-0n for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Aug 2005 11:04:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E3b4l-0000QY-Sx for bug-gnu-emacs@gnu.org; Fri, 12 Aug 2005 11:04:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E3b4k-0000QI-1x for bug-gnu-emacs@gnu.org; Fri, 12 Aug 2005 11:04:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E3b3p-0008WN-0b for bug-gnu-emacs@gnu.org; Fri, 12 Aug 2005 11:03:05 -0400 Original-Received: from [193.12.210.250] (helo=gulfport.carmen.se) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E3ap3-0001ss-6S for bug-gnu-emacs@gnu.org; Fri, 12 Aug 2005 10:47:49 -0400 Original-Received: from postville.carmen.se (postville.carmen.se [192.168.100.38]) by gulfport.carmen.se (Postfix) with ESMTP id 0E993C0A7 for ; Fri, 12 Aug 2005 16:32:39 +0200 (CEST) Original-Received: from brockville.carmen.se (brockville.carmen.se [192.168.99.55]) by postville.carmen.se (Postfix) with ESMTP id D70329FB02 for ; Fri, 12 Aug 2005 16:32:38 +0200 (CEST) Original-Received: from brockville.carmen.se (localhost.localdomain [127.0.0.1]) by brockville.carmen.se (8.13.1/8.13.1) with ESMTP id j7CEWcua019427 for ; Fri, 12 Aug 2005 16:32:38 +0200 Original-Received: (from uddeborg@localhost) by brockville.carmen.se (8.13.1/8.13.1/Submit) id j7CEWcTZ019424; Fri, 12 Aug 2005 16:32:38 +0200 Original-To: bug-gnu-emacs@gnu.org X-Carmen_GOT-MailScanner-Information: Please contact IT/IS for more information X-Carmen_GOT-MailScanner: Found to be clean X-MailScanner-From: uddeborg@carmen.se X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:12720 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:12720 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (x86_64-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2005-02-04 on thor.perf.redhat.com configured using `configure --build=x86_64-redhat-linux --host=x86_64-redhat-linux --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-pop --with-sound' 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: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: If I have a buffer in shell script mode which already has syntax coloring on, and I change the shell, the syntax coloring is still from the original shell. Repeat by: 1. Invoke emacs with font lock enabled by default (and an otherwise minimal environment): env -i SHELL=/bin/tcsh DISPLAY=$DISPLAY HOME=$HOME emacs -q -f global-font-lock-mode 2. Visit file "apa.sh": C-x C-f apa.sh This buffer is following the rules for tcsh. If I type "foreach" on a line, it is colored as a keyword, but if I type "for" it is just black. So far so good. 3. Change shell to bash (for example): C-c : /bin/bash The mode line changes to bash, and indentation rules adapt. But colorisation is still according to tcsh. "foreach" is still colored, and "for" is not. This is true both for the already existing occurrences, and if I enter the words again. I would expect coloring to change together with other aspects of the mode. Recent input: C-x C-f a p a . s h f o r e a c h f o r C-c : / b i n / b a s h f o r e a c h f o r M-x r e p o r t - Recent messages: Loading sh-script... Loading easy-mmode...done Loading sh-script...done No indentation for this shell type. Magic number changed to `#! /bin/bash' Setting up indent for shell type bash setting up indent stuff Indentation variable are now local. Indentation setup for shell type bash Loading emacsbug...done