GNU bug report logs - #7204
javascript in html-mode (multiple major modes)

Previous Next

Package: emacs;

Reported by: Guy Leblanc <gleblanc <at> ergoigl.com>

Date: Tue, 12 Oct 2010 21:29:02 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7204 in the body.
You can then email your comments to 7204 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7204; Package emacs. (Tue, 12 Oct 2010 21:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guy Leblanc <gleblanc <at> ergoigl.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 12 Oct 2010 21:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Guy Leblanc <gleblanc <at> ergoigl.com>
To: bug-gnu-emacs <at> gnu.org
Subject: html-mode do not match { } when there is a if with < 
Date: Tue, 12 Oct 2010 17:08:25 -0400
GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1
It is an unmodified Emacs.

Code with the problem

<!-- Begin of the file with the bug -->

<html>
<head>
<title></title>
<script type="text/javascript">

     function test(){
       aVar = 2;
       if (aVar < 5){ //  This is the problematic if 
         alert("Test();");
       }
     } //   If you remove } and add again } emacs tell you Mismatched 
parenthesis
   
</script>

</head>
<body>
 Hello world!
</body>
</html>
<!-- End of the file the bug -->


<!-- Begin of a file without problem-->

<html>
<head>
<title></title>
<script type="text/javascript">

     function test(){
       aVar = true;
       if (aVar){
         alert("Test();");
       }
     } // <--  If you remove } and add again } emacs can match parenthesis
   
</script>

</head>
<body>
 Hello world!
</body>
</html>
<!-- End of a file without problem -->




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7204; Package emacs. (Wed, 13 Oct 2010 01:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 7204 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Guy Leblanc <gleblanc <at> ergoigl.com>
Cc: 7204 <at> debbugs.gnu.org
Subject: Re: bug#7204: html-mode do not match { } when there is a if with <
Date: Tue, 12 Oct 2010 21:28:23 -0400
html-mode is not clever enough to know about scripts.  So in html-mode,
"<" is treated as a kind of open-paren, just like ( and { and that
applies inside <script>...</script> just like elsewhere.

To fix this, you need support for "multiple major modes" or
something similar.  You may wan to check mmm-mode.el or nxhtml or
multi-mode.el, ...


        Stefan




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 01 Mar 2016 14:14:04 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7204 <at> debbugs.gnu.org and Guy Leblanc <gleblanc <at> ergoigl.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 01 Mar 2016 14:14:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Mar 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.