From: "Drew Adams" <drew.adams@oracle.com>
To: "'Santiago Mejia'" <mejia@uchicago.edu>, <help-gnu-emacs@gnu.org>
Subject: RE: font-lock on variables
Date: Sun, 26 Jul 2009 07:51:15 -0700 [thread overview]
Message-ID: <C5577D57987647A083663F5986A1FD35@us.oracle.com> (raw)
In-Reply-To: <87r5w45qtd.fsf@uchicago.edu>
> > Hi-lock is only one library that offers such highlighting.
> > See the generic wiki page for this topic:
> > http://www.emacswiki.org/emacs/HighlightTemporarily.
> > That page compares the various highlighting libraries,
> > including hi-lock, listing what each is good for.
>
> As I just said in an earlier post, hi-lock is not yet working
> for me. I have managed, however, to highlight text with
> other packages in the page you mentioned
> (such as highlight.el). So, if anything else works, at
> least I have now a solution.
>
> However, it seems that using this procedure is not ideal.
> highlight.el does not work in connection with font-lock-mode.
> It seems to me that it would be desirable that, when one
> turned font-lock-mode off, all the fontified text was
> unfontified. However, using packets such as highlight.el
> entails using two modes to fontify, and therefore the
> fontification would not be unified.
Decoupling such highlighting from font-lock is a feature (deliberate), not a bug
(missing feature). The problem you ran into with hi-lock is one of the main
reasons: coupling the two means mixing them up - you must take other
font-locking into account at the same time, and each mode defines its own
font-locking. See
http://www.emacswiki.org/emacs/HighLight#PreservingHighlighting.
You can "turn off" highlighting by highlight.el in several ways, depending on
what is meant. Command `hlt-unhighlight-region' turns off all such highlighting
in the buffer, but you can also turn it off selectively: for given faces, a
region, only overlays, or only text-properties.
If you really need to couple turning off highlighting and font-lock for some
reason, just write a function that does both: turn off `font-lock mode' and call
`hlt-unhighlight-region'. Or advise `font-lock-mode' so that it also turns off
highlighting when you turn it off.
Finally, highlight.el and hi-lock.el are complementary - you can use them
together.
next prev parent reply other threads:[~2009-07-26 14:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 20:27 font-lock on variables Santiago Mejia
2009-07-25 0:50 ` Lennart Borgman
2009-07-25 14:14 ` Drew Adams
2009-07-25 22:12 ` Santiago Mejia
2009-07-25 22:41 ` Santiago Mejia
2009-07-26 14:51 ` Drew Adams [this message]
2009-07-25 22:34 ` Santiago Mejia
[not found] <mailman.3105.1248467286.2239.help-gnu-emacs@gnu.org>
2009-07-25 17:47 ` A.Politz
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=C5577D57987647A083663F5986A1FD35@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=mejia@uchicago.edu \
/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.