From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#59828: Fundamental Mode buffers fail to keep text properties Date: Mon, 5 Dec 2022 21:41:23 -0800 Message-ID: <6626BA91-D7E0-4AEC-9897-4220F96C143D@gmail.com> References: <83lenl9al6.fsf@gnu.org> <83edtd99p2.fsf@gnu.org> <83cz8x97uk.fsf@gnu.org> <-vvz_2yrqjb2Eck0fqcM6KaTnwqc4Q2n5nn6vsVuZxHe1gRjV8gnJvyGQAPGuE2fXiAkJ_JpUp_Q6j9qdX2WegKM2vslVdpjt342CTznuc0=@protonmail.com> <2557E415-E1C9-4BDA-ACFB-8242FF363B63@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24008"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 59828-done@debbugs.gnu.org To: Heime Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 06 06:42:20 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1p2Qih-00067n-HC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Dec 2022 06:42:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2QiU-0001OH-OA; Tue, 06 Dec 2022 00:42:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2QiS-0001O5-Q7 for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 00:42:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2QiQ-0006pJ-NT for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 00:42:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2QiQ-0002ds-EN for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 00:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Dec 2022 05:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59828 X-GNU-PR-Package: emacs Original-Received: via spool by 59828-done@debbugs.gnu.org id=D59828.167030529410149 (code D ref 59828); Tue, 06 Dec 2022 05:42:02 +0000 Original-Received: (at 59828-done) by debbugs.gnu.org; 6 Dec 2022 05:41:34 +0000 Original-Received: from localhost ([127.0.0.1]:40718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Qhx-0002dd-Pw for submit@debbugs.gnu.org; Tue, 06 Dec 2022 00:41:34 -0500 Original-Received: from mail-pj1-f52.google.com ([209.85.216.52]:45692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2Qhv-0002dV-83 for 59828-done@debbugs.gnu.org; Tue, 06 Dec 2022 00:41:33 -0500 Original-Received: by mail-pj1-f52.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so5800998pjj.4 for <59828-done@debbugs.gnu.org>; Mon, 05 Dec 2022 21:41:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fGXvGPL2Pt0HHeZMT53fcoh3mwVTe1mjsNYmWFOo/pw=; b=CiH3yIv+Jz6FScP47e83yQSNVl/gkKhqQ3uGMic/LqIun2rO+bxZHcnxCX4MjZSFSv cA+vr1cATTjaMyqXT4ff6PnKuxUDwGuj66FAqbGcUVDypgPH2dQAz55bon6T3Na82mOR o61nozBrt6bl0lzrDhg8fwXr0nMUU4VWiRJjN3fWT0qRxFBfQcdMmqUkaYOEOYB93eSp Cb/IvhFokLs04om0s5sg/ZXu5wy5Uw2SCgqDzaVkB6UlQnuCyb2aOwfh/mA012vbWUh+ cT1u2iaeld/sUq1qCg7iyNATq05IMxsCve4F/GW8r70nq1z9FH0LJNIjgHM8FgaS3Qz8 xEww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fGXvGPL2Pt0HHeZMT53fcoh3mwVTe1mjsNYmWFOo/pw=; b=6zEVUR9rV4lZ+V2JtYWU18OKNDBiVfrhl2InXGRSLVcyV1MmQQVV1UQvc/KapL5/Km wOeDEHdrVW/7F0cEu4M/ESVJhAXHkekqncVeoku99B6nCBTAq2hOuiAYHAZJSL0FSsnN 7BR+q/m8G3E5J5ErqdSV3AgV7D68kO4Lxs6gxJ6q5wXXEVEaneletx5OTP77axhulQNe jhzIWLwuWIkT6UPjaHdj8XkhTWubKU3pXdZNUQJxIPpA+We90iFareH83mJi2bit0mhy vPu+7l+487lKv9JysetbGfTP8oVhDImTCDSlcxFj5JelzaboH8FWsrO67KfjVk4/poUR C7Kw== X-Gm-Message-State: ANoB5pmQLD9lU1iB5kNy5GW4hkT3qRFk5YpE9nYje548z2QHud5gZSGS bQ0h9Gn/NWr48yJxMa7Acos= X-Google-Smtp-Source: AA0mqf7TqgnOALuBWV5rHtGBoQcyEKdgo0tHwXrH3hoMyHuri6ZgAL0EU0hvpikpHRkoo9iA88fRSw== X-Received: by 2002:a17:90a:5d05:b0:219:57e:7790 with SMTP id s5-20020a17090a5d0500b00219057e7790mr57081469pji.3.1670305285334; Mon, 05 Dec 2022 21:41:25 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y25-20020aa79af9000000b0055f209690c0sm10788961pfp.50.2022.12.05.21.41.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2022 21:41:24 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250088 Archived-At: >>>=20 >>> Just to clarify: >>>=20 >>> 1. If font-lock-mode is off, you should use (propertize =E2=80=A6 = =E2=80=98face =E2=80=A6) >>> 2. If font-lock-mode is on, you should use (propertize =E2=80=A6 = =E2=80=98font-lock-face =E2=80=A6) >=20 > If I have a function that does the inserts, should I include the two = different conditions,=20 > whether "font-lock-mode" in "off" or "on" ? >=20 > Test whether font-lock-mode is off, then use (propertize =E2=80=A6 = =E2=80=98face =E2=80=A6) > Test whether font-lock-mode is on, then use (propertize =E2=80=A6 = =E2=80=98font-lock-face =E2=80=A6) It depends on your use-case. If you want to be safe you can just apply = both properties, then it will work no matter font-lock-mode is on or = not. Yuan=