all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: overlays?
Date: Wed, 19 Mar 2014 08:29:59 -0400	[thread overview]
Message-ID: <jwvmwgm1imb.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: slrnliiq97.9nq.joost.m.kremers@j.kremers4.news.arnhem.chello.nl

>> So an overlay could possibly be better for "the first five lines of the
>> buffer" than font-lock.

This makes no sense: You can't oppose "font-lock" and "overlays",
really, because they are by nature different beasts.

`font-lock' is a library that puts "things" on some parts of the buffer
to change their appearance (color, font, size, ...).  hi-lock is another
library that does the same, tho it is meant to be used differently (the
rules specifying what-to-put-where are typically specified interactively
in hi-lock whereas they are typically specified once and for all by the
major-mode author for font-lock, so they can be more complex).

Emacs offers to kinds of "things" that can be used for that purpose:
text-properties and overlays.  These *are* comparable (e.g. font-lock
uses text-properties, but it could use overlays instead).


        Stefan




  reply	other threads:[~2014-03-19 12:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.17396.1395106856.10748.help-gnu-emacs@gnu.org>
2014-03-18 10:05 ` overlays? Joost Kremers
2014-03-19  7:38   ` overlays? lee
2014-03-19  8:21     ` overlays? Jambunathan K
     [not found]   ` <mailman.17502.1395216683.10748.help-gnu-emacs@gnu.org>
2014-03-19  9:53     ` overlays? Joost Kremers
2014-03-19 12:29       ` Stefan [this message]
2014-03-18  1:40 overlays? lee
2014-03-18  6:17 ` overlays? Marcin Borkowski
2014-03-19  7:22   ` overlays? lee

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=jwvmwgm1imb.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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.