From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: hi-lock and overlays Date: Wed, 20 Jan 2010 18:19:48 +0100 Message-ID: <87y6js66dn.fsf@thinkpad.tsdh.de> References: <87hbqk620u.fsf@thinkpad.tsdh.de> <87ljfvqerd.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1264009379 25442 80.91.229.12 (20 Jan 2010 17:42:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jan 2010 17:42:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 20 18:42:51 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXeZu-0006Li-Jb for ged-emacs-devel@m.gmane.org; Wed, 20 Jan 2010 18:42:50 +0100 Original-Received: from localhost ([127.0.0.1]:55227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXeZv-0001zJ-Gu for ged-emacs-devel@m.gmane.org; Wed, 20 Jan 2010 12:42:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXeDz-0006g6-SM for emacs-devel@gnu.org; Wed, 20 Jan 2010 12:20:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXeDv-0006bM-Lk for emacs-devel@gnu.org; Wed, 20 Jan 2010 12:20:11 -0500 Original-Received: from [199.232.76.173] (port=32884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXeDv-0006ax-FH for emacs-devel@gnu.org; Wed, 20 Jan 2010 12:20:07 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:23813) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXeDp-0000kz-VR for emacs-devel@gnu.org; Wed, 20 Jan 2010 12:20:07 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 3F1D278A3BCD for ; Wed, 20 Jan 2010 18:19:49 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25566-08 for ; Wed, 20 Jan 2010 18:19:48 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (unknown [141.26.95.159]) by deliver.uni-koblenz.de (Postfix) with ESMTP id A31C978A3BB7 for ; Wed, 20 Jan 2010 18:19:48 +0100 (CET) Mail-Copies-To: never Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Wed, 20 Jan 2010 10:54:47 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120264 Archived-At: Stefan Monnier writes: >> - Why does hi-lock use two different styles of highlighting? IMO, if >> a user does M-x highlight-regexp RET foo RET hi-yellow RET, he >> expects to get that highlighting even if there are other overlays, >> so creating an overlay (and maybe even setting a priority) is the >> only safe bet. > > overlays are implemented inefficiently, so if you have many of them, > redisplay, buffer modifications, and other operations can become > noticeably slower. I see, but still I think that deciding between font-lock and overlays by the value of `font-lock-fontified' is weird, and I'd vote for an optional parameter that lets one specify the method to be used explicitly. What do yau think? Ok, back to the original problem that hl-line-mode's overlay supresses the font-lock highlighting added by hi-lock. The cleanest solution seems to be to decide on the usage of negative overlay priorities to make font-lock take precedence here, and hl-line-mode's overlay would use one. But I don't know how feasible that is. Bye, Tassilo