From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: temp stop syntax coloring on region of mismatched quotes Date: Thu, 4 Dec 2008 08:45:48 -0800 Message-ID: <00fb01c9562f$c2a98130$c2b22382@us.oracle.com> References: <0712fc75-1c84-4b46-aaec-4417c133030d@c36g2000prc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1228409232 15351 80.91.229.12 (4 Dec 2008 16:47:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2008 16:47:12 +0000 (UTC) To: "'Xah Lee'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 04 17:48:05 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L8HMv-00088I-I4 for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Dec 2008 17:48:01 +0100 Original-Received: from localhost ([127.0.0.1]:53474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8HLl-0007AA-67 for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Dec 2008 11:46:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L8HKw-00074c-GE for help-gnu-emacs@gnu.org; Thu, 04 Dec 2008 11:45:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L8HKu-00073r-OK for help-gnu-emacs@gnu.org; Thu, 04 Dec 2008 11:45:58 -0500 Original-Received: from [199.232.76.173] (port=44928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L8HKu-00073h-Eh for help-gnu-emacs@gnu.org; Thu, 04 Dec 2008 11:45:56 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:64784 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8HKu-0000vJ-0a for help-gnu-emacs@gnu.org; Thu, 04 Dec 2008 11:45:56 -0500 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB4GkC35021831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Dec 2008 16:46:13 GMT Original-Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB4Gjr3S004882; Thu, 4 Dec 2008 16:45:54 GMT Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Dec 2008 08:45:44 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <0712fc75-1c84-4b46-aaec-4417c133030d@c36g2000prc.googlegroups.com> Thread-Index: AclV9QNzLRAwnk7lQuegkaUfA4JXiQAOQs1w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt706.oracle.com [141.146.40.84] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4938093B.004E:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60364 Archived-At: > sometimes in some source code, the double quote doesn't match and > makes the rest of the code from that point on syntax colored wrong. > Very annoying. > > Is there anyway to make it not syntax color the region of text where > the quote becomes odd? For example, i have this text in the middle > of a html file: > >
> <img src="\([^"]+\)" alt="math surface" width="\([0-9]+\)" 
> height="\
> ([0-9]+\)">
> 
> > and from this poitn on all syntax coloring gets wrong. > My usual workaround is to add a html comment > > right after the line, but that's kinda a pain. I wish to temporarily > tell emacs to not do syntax coloring on the problematic region. Is > there a way? Temporarily? Yes: just insert another `"' character. Seriously. Remove it later, or leave it in, in a comment, as you suggested. Typing `"' is the quickest way I know of to handle this temporarily. More than temporarily - e.g. for code that needs to have an unpaired `"' char: no, not that I know of (except for adding a comment, if the code is not read-only). I agree about the annoyance, but this is likely to be a hard nut to crack in a satisfactory and general way. I highlight "..." (and `...') in Info, for instance, and the odd `"' throws off highlighting for the rest of the current Info node (or until another odd `"'). Fortunately, this occurs rarely in Info, but it is annoying when it happens. http://www.emacswiki.org/emacs/InfoPlus