From: Dmitry Gutov <dgutov@yandex.ru>
To: Drew Adams <drew.adams@oracle.com>
Cc: 14481@debbugs.gnu.org
Subject: bug#14481: 24.3.50; Highlighting escape sequences
Date: Mon, 27 May 2013 18:39:38 +0400 [thread overview]
Message-ID: <51A3702A.2080207@yandex.ru> (raw)
In-Reply-To: <226f0791-6c9a-48ff-ae86-650147a1a622@default>
On 27.05.2013 18:16, Drew Adams wrote:
> But consider separating out the escape syntax for the various regexp
> parts - e.g., the parts that match more than a single escape char (for
> octal etc.). Using separate regexps (which can still be combined) for
> the various parts lets you choose whether to highlight each char group
> (e.g., highlight only hex escapes).
I can't imagine why someone would want to highlight hex escapes, yet
keep octals and others unhighlighted. If we're going to support some
languages that only support a few escape sequences, then modifying this
regexp might be the way to go, yes, although writing separate, smaller
specialized regexp(s) might be better.
> FWIW, library highlight-chars.el lets you selectively highlight sets of
> chars. This works together with font-lock: you can choose whether
> other font-lock highlighting overrides, is overridden by, or is merged
> with this highlighting (applied after or before it).
>
> You can specify chars to highlight in various ways: (1) individually
> (any in a given string), (2) using ranges, (3) using character classes
> (e.g. [:digit:]), and (4) using character sets (e.g. `iso-8859-1' or
> `lao'). You can also specify sets of chars to be excluded from such
> highlighting - IOW, specify a set by subtraction as well as by
> addition.
That's nice, but we really need regexp here. And there's no point
relying on third-party library, the code is small as it is.
next prev parent reply other threads:[~2013-05-27 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 5:55 bug#14481: 24.3.50; Highlighting escape sequences Dmitry Gutov
2013-05-27 14:16 ` Drew Adams
2013-05-27 14:39 ` Dmitry Gutov [this message]
2013-05-28 20:45 ` Dmitry Gutov
2016-10-29 9:11 ` Dmitry Gutov
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=51A3702A.2080207@yandex.ru \
--to=dgutov@yandex.ru \
--cc=14481@debbugs.gnu.org \
--cc=drew.adams@oracle.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.