From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Question: add-face-text-property for 'font-lock-face? Date: Sun, 29 Aug 2021 12:13:11 -0400 Message-ID: <2d841c63-3875-3402-6b55-470b5eaeb173@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28001"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 29 18:13:55 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKNRS-0007Am-HE for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Aug 2021 18:13:54 +0200 Original-Received: from localhost ([::1]:51478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKNRR-00015I-Bu for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Aug 2021 12:13:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKNQq-0000OJ-1k for emacs-devel@gnu.org; Sun, 29 Aug 2021 12:13:16 -0400 Original-Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:34360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKNQo-0006B1-I8 for emacs-devel@gnu.org; Sun, 29 Aug 2021 12:13:15 -0400 Original-Received: by mail-qk1-x72f.google.com with SMTP id a66so13028244qkc.1 for ; Sun, 29 Aug 2021 09:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=agE5o209jWg9OTF6DHe5xAgEQYRRkL1S3A28aNBYfhU=; b=AN8X2SMICVAKnCqf0hZ3UGjCVENwu0xt+tebB+Zu/QnCZg1TwimiH798EtG/v5wMYp p5XQzpnliB1ltWeBju88FhshFaPf6buh5y+OWT/NH2lgP5hg7t+RPCu4WcGl6aMH+r5t rS++ML496EuWIWM6Tl6ZE+3DUwwSYiSX0hTd16hMyyUJ7DS9UOz87ZBoH8jo9LtozBXU L2U9i1ftyEUEux5tH1b3/OutXfKw5OyO33FhzTOvO75+NbPUmN2CCK7ItVLXDiUn1aKC naNR9GHnIoG5yYFBnDnAxhPrMOEKSVsihR4OoW++HdjGwSs3ufdb6/F4dkXsJJ85PNbR mPKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=agE5o209jWg9OTF6DHe5xAgEQYRRkL1S3A28aNBYfhU=; b=sbykOc7i/h5fd3sO9EYCCu5F7y0k6+yubOHC08LxGZ0IwUtH3GQszSxmIw5XsQujyD gPC7CDQ5a9l39K3Wuevfd6COXePuDKtzrsXUmi7Mz2vbC7NNmL8OfOnjExGPYAxiNQSD jy5qR8ESeKy7pYk2IGqw4xYhPQ8hkr7SkXl3GLxpbNYDbink2tzMPyylj0Ah8Di8SnBa K7Dv+6WY+WIRYFiyORX3HtGOukVTjjtMrmFk1ouviJHv9HnO1g4/f9F9rq1sZnEbnsTn rkbLUVK/4twe/Vt5AGjZiORfqo4YRAjTWWziXs34wwJbE+LDE4SEBRq9GRJIC4bNJYnc WyXw== X-Gm-Message-State: AOAM531nuxBhsKwOvsfd3m9sQnZ6+zQZgsvaE5gr7ki83BSX3SPjPy44 js2K7cj+qa3X2ffJdt9wU1ibfBkJH2I= X-Google-Smtp-Source: ABdhPJy80Sbq+3yBJA5aCVHl37SEw/IjtKVHAIjpdaVDyvcoOdroSuORPz9db2VcxYhObtD2SfOOFQ== X-Received: by 2002:a05:620a:68c:: with SMTP id f12mr18858295qkh.363.1630253592785; Sun, 29 Aug 2021 09:13:12 -0700 (PDT) Original-Received: from [192.168.1.15] (c-24-61-240-80.hsd1.ma.comcast.net. [24.61.240.80]) by smtp.googlemail.com with ESMTPSA id y12sm6920442qtj.3.2021.08.29.09.13.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Aug 2021 09:13:12 -0700 (PDT) In-Reply-To: Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=cpitclaudel@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.58, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:273420 Archived-At: On 8/29/21 12:13 AM, Qiantan Hong wrote: > Users of crdt.el report that crdt-visualize-author-mode (which use font-lock-face to color code author of texts) > conflict with faces from other modes. Apparently there are more than 1 mode which sets this text property. > > Is there some way to add-face-text-property to 'font-lock-face property, > i.e. adding new face attributes instead of overwriting any existing face? > add-face-text-property doesn’t seem to work because 'font-lock-face will just override ‘face. You want font-lock-append-text-property, I think: (font-lock-append-text-property START END PROP VALUE &optional OBJECT) Append to one property of the text from START to END. Arguments PROP and VALUE specify the property and value to append to the value already in place. The resulting property values are always lists. Optional argument OBJECT is the string or buffer containing the text.