From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#23824: 25.0.95; Do not prompt twice to save a buffer Date: Fri, 24 Jun 2016 22:16:06 +0900 (JST) Message-ID: References: <83wplh45fw.fsf@gnu.org> <83lh1w2aev.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1466774270 31047 80.91.229.3 (24 Jun 2016 13:17:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 13:17:50 +0000 (UTC) Cc: f92capac@gmail.com, 23824@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 15:17:39 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGQzK-0004r9-Gi for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2016 15:17:38 +0200 Original-Received: from localhost ([::1]:43497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGQzJ-0002nD-Qm for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2016 09:17:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGQyp-0002UU-RO for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 09:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGQyk-0005kS-Nz for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 09:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGQyk-0005kG-LA for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 09:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGQyk-0002WZ-Gu for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2016 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2016 13:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23824-submit@debbugs.gnu.org id=B23824.14667741769625 (code B ref 23824); Fri, 24 Jun 2016 13:17:02 +0000 Original-Received: (at 23824) by debbugs.gnu.org; 24 Jun 2016 13:16:16 +0000 Original-Received: from localhost ([127.0.0.1]:53516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGQy0-0002VB-57 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 09:16:16 -0400 Original-Received: from mail-pa0-f47.google.com ([209.85.220.47]:34326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGQxz-0002Ux-5S for 23824@debbugs.gnu.org; Fri, 24 Jun 2016 09:16:15 -0400 Original-Received: by mail-pa0-f47.google.com with SMTP id bz2so37653680pad.1 for <23824@debbugs.gnu.org>; Fri, 24 Jun 2016 06:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=0bQFTAhsagbvpObqAmcpUyoh6Avb2/h96YO6yJ6xYdY=; b=aFADecXlRePvyi08dNoSvcjBN4mkiTar/gEN9kZ7tw2baXbsRmh4DHvSKtTYNE/ZcG ATrn452mj8rJGUbf6nltY7lXaGQ7AlJV5hOTYwfKxYacusyeJ8N1GDE4r7i25q5UrjNp SVAj+CgCQgaQGtSFRjW7/p5hsriujF9ffRGpSCTfZXHwMlAmT2P/5akA4ARC4nF1Vrwd eTyNuapjj6sYSXJ9H8qW4uFW+zklJFyCCU/vk0JizDlnxqL4RobdhweQGM/+yDKCSExU k00d8eBhnGEmBW32+Ihwhk+EuJuwQ98fV3FoPm9rWO3THAtLa+MUFPVWyFa8JA5Eh3br uizw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=0bQFTAhsagbvpObqAmcpUyoh6Avb2/h96YO6yJ6xYdY=; b=UF2/YAc/bPiPLiZUQp7wed6mhtPFcZQcsogcKEGxYV8y6MCsHGIzwDqrSE5BOF7pMG 6sMvdl3JhPVEgx+Tqx3xJjnH/al2TiFk4ViBhbDhqEPKOVq/0KdZ2vae7wfpVe0r74d9 R2whYRrGQNHmKZH1pNVmuZLhM8dGiRRrM5s+/5/yennqlMa8FJ828TuhUWFz+yBxG3dY lR6NnEZpwGk27EpAyTX7FhCHAOYYfWVhY2fTpYkXBFhXB/XBnEOvK409lPO7T1b6itmF ddPJxS0a6v3cqQOcwiT+tVUgFe5XbG1YyWJ61QJeR9XMl+8rxczxw/xorkWWLn2YXz+N lV2Q== X-Gm-Message-State: ALyK8tIbejslanhM1ymgrAt2GOvEVZJPF3DTtl9X1lwlqe39GN1WPq9CoSFTy1OldBCpAw== X-Received: by 10.66.232.136 with SMTP id to8mr7681172pac.130.1466774169606; Fri, 24 Jun 2016 06:16:09 -0700 (PDT) Original-Received: from calancha-pc (softbank126103139048.bbtec.net. [126.103.139.48]) by smtp.gmail.com with ESMTPSA id o22sm178103pfa.15.2016.06.24.06.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jun 2016 06:16:08 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119999 Archived-At: On Fri, 24 Jun 2016, Tino Calancha wrote: >(highlight-markup-buffers BUF-A FILE-B BUF-A FILE-B) >will prompt you twice to save BUF-A when BUF-A is modified. >It prompts you to save buf-a again even if you saved buf-a after >the first prompt: this is because `highlight-markup-buffers' >save the bit on the modification status of BUF-A and BUF-B at the >top of the function. User should be prompted just one in this case. I propose following patch: >From 67eb8473757392f893c3f83227cbdfd184499e25 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Fri, 24 Jun 2016 21:53:56 +0900 Subject: [PATCH] Do not prompt twice to save a buffer * lisp/hilit-chg.el (highlight-markup-buffers): (Bug#23824). --- lisp/hilit-chg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 8f042b6..d4276ce 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -782,7 +782,7 @@ highlight-markup-buffers a-start a-end len-a b-start b-end len-b (bufa-modified (buffer-modified-p buf-a)) - (bufb-modified (buffer-modified-p buf-b)) + (bufb-modified (and (not (eq buf-a buf-b)) (buffer-modified-p buf-b))) (buf-a-read-only (with-current-buffer buf-a buffer-read-only)) (buf-b-read-only (with-current-buffer buf-b buffer-read-only)) temp-a temp-b) -- 2.8.1