From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 17:33:32 2012 Received: (at submit) by debbugs.gnu.org; 22 Nov 2012 22:33:32 +0000 Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbfKq-00078U-C9 for submit@debbugs.gnu.org; Thu, 22 Nov 2012 17:33:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43376) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbfKl-00078L-8J for submit@debbugs.gnu.org; Thu, 22 Nov 2012 17:33:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbfJL-0008Fv-1v for submit@debbugs.gnu.org; Thu, 22 Nov 2012 17:32:00 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbfJK-0008Fr-V9 for submit@debbugs.gnu.org; Thu, 22 Nov 2012 17:31:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbfJG-0001wV-PA for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2012 17:31:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbfJC-0008Es-Dg for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2012 17:31:50 -0500 Received: from mailout03.t-online.de ([194.25.134.81]:48943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbfJC-0008Dr-2s for bug-gnu-emacs@gnu.org; Thu, 22 Nov 2012 17:31:46 -0500 Received: from fwd15.aul.t-online.de (fwd15.aul.t-online.de ) by mailout03.t-online.de with smtp id 1TbfJ9-0001gV-N5; Thu, 22 Nov 2012 23:31:43 +0100 Received: from [192.168.178.34] (TWIUUTZS8h9Cer5e1uQWnDZNXZjPGbrfBnh4p4gAUiIrZ8QT-PtFLPeY5sATV3TZbE@[84.176.180.78]) by fwd15.t-online.de with esmtp id 1TbfJ5-0dO7LU0; Thu, 22 Nov 2012 23:31:39 +0100 Message-ID: <50AEA7C9.10208@t-online.de> Date: Thu, 22 Nov 2012 23:31:37 +0100 From: Daniel Pfeiffer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Fwd: Small modification to sh-script, to cover unsupported case label References: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> In-Reply-To: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> X-Forwarded-Message-Id: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> Content-Type: multipart/alternative; boundary="------------070708080703000203000205" X-ID: TWIUUTZS8h9Cer5e1uQWnDZNXZjPGbrfBnh4p4gAUiIrZ8QT-PtFLPeY5sATV3TZbE X-TOI-MSGID: ca5085c1-99ca-41d0-91d5-ef0b1f012637 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit Cc: Ivan Kelly X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: occitan@esperanto.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------070708080703000203000205 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit -------- Original Message -------- Subject: Small modification to sh-script, to cover unsupported case label Date: Thu, 22 Nov 2012 15:53:25 +0000 From: Ivan Kelly To: Daniel Pfeiffer Hi, I ran into an issue with the sh-mode today with case labels. case $X in foo) do_something ;; arg=*) do_something_else_based_on_arg ;; *) default ;; esac Indention will mess up on the second label, due to the = This can be fixed by adding a = to the skip-chars-backwards in sh-font-lock-parens; i.e. (defun sh-font-lock-paren (start) (save-excursion (goto-char start) ;; Skip through all patterns (while (progn (forward-comment (- (point-max))) ;; Skip through one pattern (while (or (/= 0 (skip-syntax-backward "w_")) (/= 0 (skip-chars-backward "?[]*@/\\=")) (and (sh-is-quoted-p (1- (point))) ... Also, I'm finding indent-tabs-mode is being reset by sh-mode. Do you know what could be causing this? Regards Ivan --------------070708080703000203000205 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


-------- Original Message --------
Subject: Small modification to sh-script, to cover unsupported case label
Date: Thu, 22 Nov 2012 15:53:25 +0000
From: Ivan Kelly <ivan@ivankelly.net>
To: Daniel Pfeiffer <occitan@esperanto.org>


Hi,

I ran into an issue with the sh-mode today with case labels.
case $X in
    foo)
        do_something
        ;;
    arg=*)
        do_something_else_based_on_arg
        ;;
    *)
        default
        ;;
esac

Indention will mess up on the second label, due to the =
This can be fixed by adding a = to the skip-chars-backwards in
sh-font-lock-parens;

i.e.
(defun sh-font-lock-paren (start)
  (save-excursion
    (goto-char start)
    ;; Skip through all patterns
    (while
      (progn
        (forward-comment (- (point-max)))
        ;; Skip through one pattern
        (while
          (or (/= 0 (skip-syntax-backward "w_"))
          (/= 0 (skip-chars-backward "?[]*@/\\="))
            (and (sh-is-quoted-p (1- (point)))
...

Also, I'm finding indent-tabs-mode is being reset by sh-mode. Do you
know what could be causing this?

Regards
Ivan



--------------070708080703000203000205-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 21:18:16 2012 Received: (at 12963) by debbugs.gnu.org; 23 Nov 2012 02:18:16 +0000 Received: from localhost ([127.0.0.1]:33689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbiqO-0003b5-Dp for submit@debbugs.gnu.org; Thu, 22 Nov 2012 21:18:16 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:49160) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbiqL-0003ax-Lq for 12963@debbugs.gnu.org; Thu, 22 Nov 2012 21:18:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FpaQ6/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA2IQAW6CY0mgx4DiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208272632" Received: from 69-165-164-58.dsl.teksavvy.com (HELO pastel.home) ([69.165.164.58]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Nov 2012 21:16:49 -0500 Received: by pastel.home (Postfix, from userid 20848) id 06350597C9; Thu, 22 Nov 2012 21:16:48 -0500 (EST) From: Stefan Monnier To: occitan@esperanto.org Subject: Re: bug#12963: Fwd: Small modification to sh-script, to cover unsupported case label Message-ID: References: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> <50AEA7C9.10208@t-online.de> Date: Thu, 22 Nov 2012 21:16:48 -0500 In-Reply-To: <50AEA7C9.10208@t-online.de> (Daniel Pfeiffer's message of "Thu, 22 Nov 2012 23:31:37 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12963 Cc: Ivan Kelly , 12963@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > Indention will mess up on the second label, due to the = > This can be fixed by adding a = to the skip-chars-backwards in > sh-font-lock-parens; This already works correctly in Emacs-24, so I suggest you upgrade. > Also, I'm finding indent-tabs-mode is being reset by sh-mode. Do you > know what could be causing this? AFAICT sh-script.el does not touch indent-tabs-mode (neither the most recent version, nor the version in Emacs-23). But I'm not exactly sure what you mean by "being reset". Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 23 10:54:53 2012 Received: (at 12963) by debbugs.gnu.org; 23 Nov 2012 15:54:53 +0000 Received: from localhost ([127.0.0.1]:35116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tbvae-000479-JF for submit@debbugs.gnu.org; Fri, 23 Nov 2012 10:54:53 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:39076) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbvaY-00046w-Qc for 12963@debbugs.gnu.org; Fri, 23 Nov 2012 10:54:51 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qANFrIJ6014226; Fri, 23 Nov 2012 10:53:18 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 1C889B4278; Fri, 23 Nov 2012 10:53:18 -0500 (EST) From: Stefan Monnier To: Ivan Kelly Subject: Re: bug#12963: Fwd: Small modification to sh-script, to cover unsupported case label Message-ID: References: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> <50AEA7C9.10208@t-online.de> <20121123090451.GD29552@ip-10-228-174-15.eu-west-1.compute.internal> Date: Fri, 23 Nov 2012 10:53:18 -0500 In-Reply-To: <20121123090451.GD29552@ip-10-228-174-15.eu-west-1.compute.internal> (Ivan Kelly's message of "Fri, 23 Nov 2012 09:04:53 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4411=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4411> : streams <864156> : uri <1275415> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 12963 Cc: occitan@esperanto.org, 12963@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > By being reset, I mean I have a hook > (add-hook 'sh-mode-hook '(lambda () (setq indent-tabs-mode nil))) > I open a sh file, and when I look at the value of indent-tabs-mode, > it's t. I just tried % emacs23 -Q --eval "(add-hook 'sh-mode-hook (lambda () (setq indent-tabs-mode nil)))" test/indent/shell.sh and C-h v indent-tabs-mode tells me it's nil in this buffer. I suggest you add a (message "here I am") inside the above lambda (and I also suggest you don't quote your lambdas with "'") to make sure it's actually run. > It may be something else that's borking it, but it works fine in other > modes (java, c++). Is there a way to instrument a variable so that I > can see when it gets changed? No, but a binary search in your .emacs should quickly find the culprit. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 23 15:02:24 2012 Received: (at 12963) by debbugs.gnu.org; 23 Nov 2012 20:02:25 +0000 Received: from localhost ([127.0.0.1]:35244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbzSB-0001bh-TJ for submit@debbugs.gnu.org; Fri, 23 Nov 2012 15:02:24 -0500 Received: from gir.skynet.ie ([193.1.99.77]:46662) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TbpDO-00079L-3G for 12963@debbugs.gnu.org; Fri, 23 Nov 2012 04:06:27 -0500 Received: from ip-10-228-174-15.eu-west-1.compute.internal (ec2-54-247-85-211.eu-west-1.compute.amazonaws.com [54.247.85.211]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by gir.skynet.ie (Postfix) with ESMTPSA id DA7131251A; Fri, 23 Nov 2012 09:04:58 +0000 (GMT) Date: Fri, 23 Nov 2012 09:04:53 +0000 From: Ivan Kelly To: Stefan Monnier Subject: Re: bug#12963: Fwd: Small modification to sh-script, to cover unsupported case label Message-ID: <20121123090451.GD29552@ip-10-228-174-15.eu-west-1.compute.internal> References: <20121122155324.GC29552@ip-10-228-174-15.eu-west-1.compute.internal> <50AEA7C9.10208@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Thu, Nov 22, 2012 at 09:16:48PM -0500, Stefan Monnier wrote: > > Indention will mess up on the second label, due to the = > > This can be fixed by adding a = to the skip-chars-backwards in > > sh-font-lock-parens; > > This already works correctly in Emacs-24, so I suggest you upgrade. Ah ok, I'm using Emacs-23 here, and was pulling trunk from bzr but it was taking a long time, so I just decided to email the fix. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5000] X-Debbugs-Envelope-To: 12963 X-Mailman-Approved-At: Fri, 23 Nov 2012 15:02:21 -0500 Cc: occitan@esperanto.org, 12963@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Thu, Nov 22, 2012 at 09:16:48PM -0500, Stefan Monnier wrote: > > Indention will mess up on the second label, due to the = > > This can be fixed by adding a = to the skip-chars-backwards in > > sh-font-lock-parens; > > This already works correctly in Emacs-24, so I suggest you upgrade. Ah ok, I'm using Emacs-23 here, and was pulling trunk from bzr but it was taking a long time, so I just decided to email the fix. [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4989] On Thu, Nov 22, 2012 at 09:16:48PM -0500, Stefan Monnier wrote: > > Indention will mess up on the second label, due to the = > > This can be fixed by adding a = to the skip-chars-backwards in > > sh-font-lock-parens; > > This already works correctly in Emacs-24, so I suggest you upgrade. Ah ok, I'm using Emacs-23 here, and was pulling trunk from bzr but it was taking a long time, so I just decided to email the fix. > > > Also, I'm finding indent-tabs-mode is being reset by sh-mode. Do you > > know what could be causing this? > > AFAICT sh-script.el does not touch indent-tabs-mode (neither the most > recent version, nor the version in Emacs-23). But I'm not exactly sure > what you mean by "being reset". By being reset, I mean I have a hook (add-hook 'sh-mode-hook '(lambda () (setq indent-tabs-mode nil))) I open a sh file, and when I look at the value of indent-tabs-mode, it's t. It may be something else that's borking it, but it works fine in other modes (java, c++). Is there a way to instrument a variable so that I can see when it gets changed? -Ivan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 28 15:42:46 2012 Received: (at control) by debbugs.gnu.org; 28 Nov 2012 20:42:46 +0000 Received: from localhost ([127.0.0.1]:44097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdoSz-0007iS-Kd for submit@debbugs.gnu.org; Wed, 28 Nov 2012 15:42:46 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46264) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TdoSw-0007iK-NG for control@debbugs.gnu.org; Wed, 28 Nov 2012 15:42:43 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TdoR4-0007co-5B for control@debbugs.gnu.org; Wed, 28 Nov 2012 15:40:46 -0500 Date: Wed, 28 Nov 2012 15:40:46 -0500 Message-Id: Subject: control message for bug 12963 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) close 12963 24.1 From unknown Tue Jun 17 20:21:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 27 Dec 2012 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator