From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OIdXFroOYGI16gAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 15:46:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oKczFroOYGJ2AgEAauVa8A (envelope-from ) for ; Wed, 20 Apr 2022 15:46:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DFFB717DC6 for ; Wed, 20 Apr 2022 15:46:33 +0200 (CEST) Received: from localhost ([::1]:58728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhAfB-0001pX-41 for larch@yhetil.org; Wed, 20 Apr 2022 09:46:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhAMv-0006RW-D1 for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:41 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:33423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhAMt-0004Xh-Tg for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 09:27:41 -0400 Received: by mail-pf1-x42f.google.com with SMTP id p3so591085pfw.0 for ; Wed, 20 Apr 2022 06:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:message-id:date:mime-version; bh=+LqnS7nZDWfGWJDJYT3eSbka9M/uW5R7MKPkQvicjQo=; b=CW4DbA2Ih/p6konjeveDgDwDapH6G8cbl0Kag3eDgWKtVLi+75L1qAP/r+mCb/FNsH DPrGGVvmMD7kCvcMym94s6REdcE6cWsJRiA/Qg2u2aKZR59juwRBlsL6zNHWqb7OVYDZ wFoaA04k9Rp27Cgc4B6JH2inZqR50A4yS5YTMmjaxAn3bvGX/aegLRKcuUaOWAUbVtVt ZFVc4b0uZEotHgRKwdGalpG+7/LIeorPyaakATK9mxFI2kR3kxj5OOv3ljZ9g7vHEVjr hJZh7uZacf08gSjzdDYIIkKmsUXJEK8W0OqDS2jkYRsKTw0rTFdoH6Eu+LQWYNM1twKl ZpMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references :message-id:date:mime-version; bh=+LqnS7nZDWfGWJDJYT3eSbka9M/uW5R7MKPkQvicjQo=; b=I3pb+LMUKbrtfbwAiBqhFXFEWWmXwWVzZfwyXGol3OKl5MdauidPiKWt16r+zcra2h FAbEG0wcx/Qj51SGxP4P6wz2v72gu0xScjD7RIL8ntczmoJQUFMaMS9xr+OW2xUALRpf NV+Tw4f3cDvj52x/NfBBNXv5K7MviMfUGMwiaHDV9uLewp1jr55QvkF9CzVtUPnAzz7Q T7WU3n4OLQViDP/T/fzNbQGkJs+HPcUUmpaH/+v1GJDozSHvWHO4iwsYW/+mH8j9CzZy k0cWISg8HJZh71/Y3mXbQBTqGYSlTWc6REuAz9wez+fuZE9Jks173ra/MwQm4ItAtjEn TLBg== X-Gm-Message-State: AOAM532Xy9g6YkH/O1X+/9s/VhgbAGVPaQ1vr6RdqX1DLsa06oAcSh9V JlXhfmddQ2cZjJyHvZzunmA8SsUl9S3Jqg== X-Google-Smtp-Source: ABdhPJz3puxUFyjIaQAknwTq+H1Stbj2/P8g40ioy/CFrVsFgt9Up6tparFuKnOC6X5aaYhLD41++A== X-Received: by 2002:a05:6a00:228d:b0:50a:934f:e302 with SMTP id f13-20020a056a00228d00b0050a934fe302mr9459723pfe.20.1650461258331; Wed, 20 Apr 2022 06:27:38 -0700 (PDT) Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id p1-20020a17090a680100b001d28905b214sm10301148pjj.39.2022.04.20.06.27.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 06:27:37 -0700 (PDT) From: Ihor Radchenko To: emacs-orgmode@gnu.org Subject: [PATCH v2 36/38] org-macs.el: Fix fontification checks take 2--- In-Reply-To: References: Message-Id: <7589631b89e4ccbf1292244867763bd8bfde5929.1650460489.git.yantar92@gmail.com> Date: Wed, 20 Apr 2022 21:28:31 +0800 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650462393; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+LqnS7nZDWfGWJDJYT3eSbka9M/uW5R7MKPkQvicjQo=; b=n0hnT0Bdz70YJa61udpBVDLmnFCQ3lwEXza2OarByOd7ILfgqeBkZ/IWjEQ6NwItjpRUwZ FTi8b3Uha4hhEFqARBhZ8URRvM+HSuufJPq7fuwgT4JPKe5l0CNYJc3AhSuvG/LwjAzt7W UlBwuA8Eo5aENyu3+cqWsW37Ds8cGbXlGvjMVMQk8KfkoTllKCkDw4bWA+WpoOFyb0yF/n Cux/ZEZZm4vC/phmxeoy2EqrvT3KfstB6uVvO0dMAlFTZQ5RmlVtE4u0cy/ZtvzmjPZmmh KrvNRRvpthfsIuacdGMVia+VwAmgxIjMyJvnc+ukW/1CKJ3+j38rig3gvnr2TQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650462393; a=rsa-sha256; cv=none; b=nbWuMn7gKG+O6WFDZYd2yol9BqEqRM1wFmjWbbCkj5VMLmiBqXMia984FXumgYpQN1Bs5m wctmvU2kxD4viWuaRQQGSBTn7eplaTtQ2zP7HhsUjteaFXsQ/3xbSyZBSiL1cFBpuohl1K YGFI3VYEkTOsdFxYYHth2uJK3ypoC57mWxOBtcNNie4w2pnHY5B+J3wPRONLTF3CVVvKL1 5a+aUWUL9rSV2dIlRIGKpmdo8oSI3gzay8O4pJzqY9nRp9a7uDuOO9CLKmoV1N6Jjf/W1n eRnpFlAPxYd/WFQTg98dqy2uCBFetp6EpQNrO7XwKgNX11ayQ/GTVisAwHOLQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CW4DbA2I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CW4DbA2I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DFFB717DC6 X-Spam-Score: -3.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: AqlK0sjm+e8f --- lisp/org-macs.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index c71bb4094..9e24e315a 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1192,7 +1192,8 @@ (defun org-buffer-substring-fontified (beg end) "Return fontified region between BEG and END." (when (bound-and-true-p jit-lock-mode) (org-with-forced-fontification - (when (text-property-not-all beg end 'org-fold-core-fontified t) + (when (or (text-property-not-all beg end 'org-fold-core-fontified t) + (text-property-not-all beg end 'fontified t)) (save-match-data (font-lock-fontify-region beg end))))) (buffer-substring beg end)) @@ -1201,9 +1202,12 @@ (defun org-looking-at-fontified (re) (prog1 (looking-at re) (when (bound-and-true-p jit-lock-mode) (org-with-forced-fontification - (when (text-property-not-all - (match-beginning 0) (match-end 0) - 'org-fold-core-fontified t) + (when (or (text-property-not-all + (match-beginning 0) (match-end 0) + 'org-fold-core-fontified t) + (text-property-not-all + (match-beginning 0) (match-end 0) + 'fontified t)) (save-match-data (font-lock-fontify-region (match-beginning 0) (match-end 0)))))))) -- 2.35.1 -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg