From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Idea: Be able to use text properties as face attributes Date: Sun, 26 Mar 2017 21:51:31 -0700 (PDT) Message-ID: <30d920b0-e1de-497d-98de-8b69e835e855@default> References: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1490590316 13910 195.159.176.226 (27 Mar 2017 04:51:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Mar 2017 04:51:56 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 27 06:51:49 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csMd2-0001pv-01 for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 06:51:40 +0200 Original-Received: from localhost ([::1]:44325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csMd7-0005Xp-VF for ged-emacs-devel@m.gmane.org; Mon, 27 Mar 2017 00:51:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csMd2-0005Xh-7M for emacs-devel@gnu.org; Mon, 27 Mar 2017 00:51:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csMcx-0006x4-9k for emacs-devel@gnu.org; Mon, 27 Mar 2017 00:51:40 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:50288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1csMcx-0006wj-0H for emacs-devel@gnu.org; Mon, 27 Mar 2017 00:51:35 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v2R4pWla015603 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 27 Mar 2017 04:51:33 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v2R4pWV1020205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 27 Mar 2017 04:51:32 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v2R4pW1R021036 for ; Mon, 27 Mar 2017 04:51:32 GMT In-Reply-To: <7a902f7b-d808-4d0f-8ff9-b8f07eaddf83@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213402 Archived-At: (I can't check this right now, but) I wonder if it might not be as simple as changing `get-text-property' to check whether the character at the given POSITION either has the given PROP or has a face property (`face', `font-lock-face', `mouse-face') that has the given PROP as one of its attributes, and if so to return the PROP value. Priority should be given to the latter (PROP on the face) if=20 both exist, in my view. Dunno about priority among `face', `font-lock-face', and `mouse-face', if more than one of them has the PROP and those PROP values differ.