all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: feature request: text property to prevent font-locking
Date: Sat, 30 Aug 2014 09:27:01 +0000	[thread overview]
Message-ID: <20140830092701.GA3351@acm.acm> (raw)
In-Reply-To: <b896ecdd-2457-4f84-8d0d-f58445db89f6@default>

Hi, Drew.

On Thu, Aug 28, 2014 at 02:18:28PM -0700, Drew Adams wrote:
> Excuse me if I'm missing something that is already available.
> And in that case, please let me know what it is, so I can use it.

> I want to apply some ad-hoc highlighting with text property `face'
> in a font-locked buffer (whether font-locking occurs before or after
> I apply `face' for this highlighting).

> I do not want font-lock to override this highlighting.  I do not want
> to use `font-lock-keywords' (e.g. with KEEP) in order to create this
> highlighting.  I just want to prevent font-lock from overriding it.

> I want to apply some other text property to the highlighted text, to
> tell font-lock not to fiddle with it ("hands off this text").

> 1. Does this possibility already exist in Emacs?  I looked but didn't
>    find anything.

> 2. If not, can we please add it?

[ .... ]

For this particular application of fontifying, you might be able to use
overlays, which take priority over text properties (see page "Overlay
Properties" in the Elisp manual).  You might have to define a lot of
attributes for the overlay face to prevent attributes from font-locking
"showing through".

That feels like a bit of a kludge, though.  The facility you've sketched
out (and implemented) might well be a useful one.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2014-08-30  9:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 21:18 feature request: text property to prevent font-locking Drew Adams
2014-08-30  9:27 ` Alan Mackenzie [this message]
2014-08-30 20:15   ` Drew Adams
2014-08-30 21:34     ` Thien-Thi Nguyen
2014-08-31  6:06       ` Drew Adams
2014-08-31 16:11         ` Drew Adams
2014-08-31 12:40     ` Stefan Monnier
2014-08-31 15:30       ` Drew Adams
2014-08-31 19:57         ` Stefan Monnier
2014-08-31 21:07           ` Drew Adams
2014-08-31 21:43           ` Alan Mackenzie
2014-09-01  1:37             ` Stephen J. Turnbull
2014-09-01 20:45               ` Stefan Monnier
2014-09-02  2:02                 ` Stephen J. Turnbull
2014-09-02  2:33                 ` Richard Stallman
2014-09-02  6:04                   ` David Kastrup
2014-08-31 14:31 ` Wolfgang Jenkner
2014-08-31 16:03   ` Drew Adams

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=20140830092701.GA3351@acm.acm \
    --to=acm@muc.de \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /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.