From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.help Subject: Re: overlays? Date: Wed, 19 Mar 2014 08:29:59 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395232269 4512 80.91.229.3 (19 Mar 2014 12:31:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Mar 2014 12:31:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 19 13:31:18 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQFeJ-00069C-4N for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Mar 2014 13:31:11 +0100 Original-Received: from localhost ([::1]:40842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQFeI-00088l-M9 for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Mar 2014 08:31:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQFdX-0007wB-Ak for help-gnu-emacs@gnu.org; Wed, 19 Mar 2014 08:30:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQFdP-0006Dy-SA for help-gnu-emacs@gnu.org; Wed, 19 Mar 2014 08:30:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQFdP-0006Df-MN for help-gnu-emacs@gnu.org; Wed, 19 Mar 2014 08:30:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WQFdK-0004bv-SF for help-gnu-emacs@gnu.org; Wed, 19 Mar 2014 13:30:10 +0100 Original-Received: from 206-248-162-160.dsl.teksavvy.com ([206.248.162.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Mar 2014 13:30:10 +0100 Original-Received: from monnier by 206-248-162-160.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Mar 2014 13:30:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 206-248-162-160.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:a7T+tk1MajPmvyv12XuMBb5OJKU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96627 Archived-At: >> 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