From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wF80GjLBemEHJgAAgWs5BA (envelope-from ) for ; Thu, 28 Oct 2021 17:26:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4OjaFTLBemHFGQAAB5/wlQ (envelope-from ) for ; Thu, 28 Oct 2021 15:26:42 +0000 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 CE6C6ADFA for ; Thu, 28 Oct 2021 17:26:41 +0200 (CEST) Received: from localhost ([::1]:39156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mg7Ie-0000gP-DA for larch@yhetil.org; Thu, 28 Oct 2021 11:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mg7Gl-0008Ou-B1 for emacs-orgmode@gnu.org; Thu, 28 Oct 2021 11:24:43 -0400 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]:45944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mg7Gj-0001g7-5i for emacs-orgmode@gnu.org; Thu, 28 Oct 2021 11:24:43 -0400 Received: by mail-qv1-xf33.google.com with SMTP id s9so1625931qvk.12 for ; Thu, 28 Oct 2021 08:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=11vlX7poCJDo6bnVW8BZMT4T+iYrAG6unaA9DRzGvNw=; b=HDWVoBFCwYZmVpIp5R0NnwpL5LpS0A8wOAxRz+Y9xkVsMlgLCSf/hejvhOnZ1ah9Ai ZxMsmO1GnLeaMV9jgTT1teLwGm3iYSRE6S3jpuRZj4+0lwqoy93Sj0qbJRnNoCCjpJGJ EqMYt09OLr6BLjVyN/HuI6aDZxE27gMmXKPyc0SdAUhuuiHOSYxTs1iHQgX+//F9mhLW A/QNm/PjjzRP4X9TsJ94bx1Kn16sEd2fQWVaeXZCGZtzKH02pkOOxbO8vzm1RdXSvdkT YtdPSNvmlWi2tTKgVXVMH98XHdOfov3erxK6Ewc5Dxj4ameq2mUjdzEQ2+MisuefOJGD gbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=11vlX7poCJDo6bnVW8BZMT4T+iYrAG6unaA9DRzGvNw=; b=sC0Nc89jKN8vXNPcxdWIUvjiQHbKPAe9GM13lliLMJE4mCNwc2W02iueLLsQIwtD5W fpMiPqA5L9qDdcaCCHUriDQd9yJgunX4vty05l75RLI+7RMmM2ogunN6w7h+q217S3uW +26iJAv14hIEFgrRjYCnmCDKu2xd0+2I5jHrdmx5sSE+bPCj2YJAuTGCUeOklsFEOEeI RqzZ/aNb04gexrYCkRhWPKDsqTjZsJs6lEKmHkHfnO2EOMYe9RNaHLUEVs3q/SmtSORD MUFLw6U5LmCcwFznTHiTak9R6SaylQMoMaA46ht36COVVasKEPep4mzstjLyBJ3FzSet rv4A== X-Gm-Message-State: AOAM533HD2I1rgb84KIqRi4/pifJEl1MhXxdzp8Srf4wOfYvYQgcvRQj SjZLq++eU6ge0c+17O6ZpdiD/7VCbZc= X-Google-Smtp-Source: ABdhPJztMRaARRSxDhn0JMfFcA89nmSU5q+CLEJ3CiP0uEUuANGYrQ/Nc/xbaWkzUTNhK00v9BUbMA== X-Received: by 2002:a05:6214:20a2:: with SMTP id 2mr5104214qvd.13.1635434679271; Thu, 28 Oct 2021 08:24:39 -0700 (PDT) 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 w15sm540398qtn.60.2021.10.28.08.24.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 08:24:38 -0700 (PDT) To: emacs-orgmode@gnu.org From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Subject: [PATCH] org-src: Reset buffer-modified-p after fontifying Message-ID: <2cbf6d37-4622-65ba-5d04-65b47ec1327a@gmail.com> Date: Thu, 28 Oct 2021 11:24:37 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------C979C8EB4A80DAB5601AE12C" Content-Language: en-GB Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=cpitclaudel@gmail.com; helo=mail-qv1-xf33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635434801; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=11vlX7poCJDo6bnVW8BZMT4T+iYrAG6unaA9DRzGvNw=; b=HcPhvIRd8JoAoqIrw9/Ztbb/+MitV8DtyAThP0ufzL4ZmdI+ZOIj8iNlr9Kvk3Exbu9QLk y8WXECUuBrdNx1EHUg58//kPNTDPamVjXH4FWdtTwST9F7dKlPqUTbvxFHDo6Oo5VIl1Zy qeayhHSIwQTJH/FTQLeBxlsHiLGeGsj2W/EE2AWZ5RRGj/1zFBChg0DQsPctgnfVQvz08E FzZF/46vV/eRN9t7zV49/94WqyReLIdSTp56jwJVsWTrSSWtxXBsAlHvXqZQAP98ZwUDZK YU3F/RPVUJkv6QlCN763UD311+rN8jHD3aXrzndiCHZ3hZLHymy9bQvQpxZ2dQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635434801; a=rsa-sha256; cv=none; b=skVBZ8eetnpfeaYxnnovK9p8VxC+m4bIEw4aWngxKASHpgBabvIxEtA5dUZw27KjSjsf6u pn2YthYvdG3MQ2NbeWkfIITDFHZGjn1hj4uuX+5FGG8zdHXdmytBOCVUnT4qAvfO7KqtMQ AdeQ94i/xPwiHLViBTbyQMNz5UE72RJKAoN9JemkA13C8yFX7tbqWD2w0WNrGHwbm4tjhB +77gSb/iR6rc/mt7Xn/p7ZPBtW3jZNhl1wOXQ6LtEoSRAk8qTFi4dNjd8OKoI0fBPWPSEi ezq5i8C3knEivv1eEAyyb9fcoRYd2Q8Hap4jS/gwfvUlRFw568toGqxDubWzxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HDWVoBFC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.76 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=HDWVoBFC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: CE6C6ADFA X-Spam-Score: -3.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: bae0Gtf4maWp This is a multi-part message in MIME format. --------------C979C8EB4A80DAB5601AE12C Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi all, * lisp/org-src.el (org-src-font-lock-fontify-block): Reset the modification flag of the temporary fontification buffer after fontifying. Without this some modes cause Emacs to prompt about unsaved buffers when exiting: `Save buffer *org-src-fontification:...-mode*?' (I'm seeing this with Proof General's coq-mode, specifically.) Clément. --------------C979C8EB4A80DAB5601AE12C Content-Type: text/x-patch; charset=UTF-8; name="0001-org-src-Reset-buffer-modified-p-after-fontifying.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-org-src-Reset-buffer-modified-p-after-fontifying.patch" >From 085cc7ae79ff3649dbe9a53bb6a9ca26f30d58f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit-Claudel?= Date: Thu, 28 Oct 2021 11:09:55 -0400 Subject: [PATCH] org-src: Reset buffer-modified-p after fontifying * lisp/org-src.el (org-src-font-lock-fontify-block): Reset the modification flag of the temporary fontification buffer after fontifying. Without this some modes cause Emacs to prompt about unsaved buffers when exiting: `Save buffer *org-src-fontification:...-mode*?' --- lisp/org-src.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index f1948bfa9..51dde602d 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -642,7 +642,8 @@ org-src-font-lock-fontify-block (put-text-property (+ start (1- pos)) (1- (+ start next)) prop new-prop org-buffer))) - (setq pos next)))) + (setq pos next))) + (set-buffer-modified-p nil)) ;; Add Org faces. (let ((src-face (nth 1 (assoc-string lang org-src-block-faces t)))) (when (or (facep src-face) (listp src-face)) -- 2.25.1 --------------C979C8EB4A80DAB5601AE12C--