From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Fwd: overlay face property not used for after-string property Date: Mon, 05 Nov 2007 09:55:48 -0500 Message-ID: References: <86r6jfz3bb.fsf@macs.hw.ac.uk> <86bqaixmxk.fsf@macs.hw.ac.uk> <86bqabjozh.fsf@macs.hw.ac.uk> <86y7ddipg5.fsf_-_@macs.hw.ac.uk> <86zlxtdopx.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194274578 11647 80.91.229.12 (5 Nov 2007 14:56:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 14:56:18 +0000 (UTC) Cc: Joe Wells , rms@gnu.org, emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 05 15:56:21 2007 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 1Ip3N8-0007OE-1I for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 15:56:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ip3Mx-00029Z-Gz for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 09:56:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ip3Mu-00029K-NB for emacs-devel@gnu.org; Mon, 05 Nov 2007 09:56:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ip3Ms-00027u-Cl for emacs-devel@gnu.org; Mon, 05 Nov 2007 09:55:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ip3Ms-00027r-9C for emacs-devel@gnu.org; Mon, 05 Nov 2007 09:55:58 -0500 Original-Received: from tomts13.bellnexxia.net ([209.226.175.34] helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ip3Mj-00015G-Sp; Mon, 05 Nov 2007 09:55:50 -0500 Original-Received: from pastel.home ([70.55.140.67]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071105145548.EDDZ13659.tomts13-srv.bellnexxia.net@pastel.home>; Mon, 5 Nov 2007 09:55:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 56C1E7FC4; Mon, 5 Nov 2007 09:55:48 -0500 (EST) In-Reply-To: <86zlxtdopx.fsf@lola.quinscape.zz> (David Kastrup's message of "Mon\, 05 Nov 2007 10\:30\:02 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:82580 Archived-At: > I think that the before-string should, in effect, use > (get-char-property (overlay-start ov) 'face) > to determine the face to use if no fully specified face is in the > before-string. No. Go read the beginning of this thread again where I explained why this is bad: it's (much) harder to remove a face than to add one. Also text-properties should not affect before/after-strings. I believe the most obviously sensible rule is to follow the precedence that we always use: - overlays take precedence over text-properties - overlays of higher priority take precedence over overlays of lower priority - for overlays of equal priority if one overlay covers the other it takes precedence - for the other cases of equal priority, any arbitrary choice is OK as long as it's deterministic Given this, a (before|after)-string should only be affected by invisible|face properties set by overlays of higher precedence: not by text-properties, not be overlays of lower precedence. -- Stefan