all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Xah Lee'" <xahlee@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: temp stop syntax coloring on region of mismatched quotes
Date: Thu, 4 Dec 2008 08:45:48 -0800	[thread overview]
Message-ID: <00fb01c9562f$c2a98130$c2b22382@us.oracle.com> (raw)
In-Reply-To: <0712fc75-1c84-4b46-aaec-4417c133030d@c36g2000prc.googlegroups.com>

> 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:
> 
> <pre class="code">
> &lt;img src="\([^"]+\)" alt="math surface" width="\([0-9]+\)" 
> height="\
> ([0-9]+\)"&gt;
> </pre>
> 
> 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






      parent reply	other threads:[~2008-12-04 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04  2:58 temp stop syntax coloring on region of mismatched quotes Xah Lee
2008-12-04 11:00 ` Paul R
     [not found] ` <mailman.1910.1228388432.26697.help-gnu-emacs@gnu.org>
2008-12-04 11:09   ` Andreas Politz
2008-12-04 16:43   ` Xah Lee
2008-12-04 16:45 ` Drew Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00fb01c9562f$c2a98130$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xahlee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.