From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23824: 25.0.95; Do not prompt twice to save a buffer Date: Sat, 25 Jun 2016 13:26:37 +0300 Message-ID: <83wpldzhr6.fsf@gnu.org> References: <83wplh45fw.fsf@gnu.org> <83lh1w2aev.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1466850513 22516 80.91.229.3 (25 Jun 2016 10:28:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2016 10:28:33 +0000 (UTC) Cc: f92capac@gmail.com, 23824@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 25 12:28:21 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 1bGkoy-0007VF-U5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jun 2016 12:28:17 +0200 Original-Received: from localhost ([::1]:49246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGkou-0001uI-Up for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jun 2016 06:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGkom-0001uD-AJ for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2016 06:28:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGkok-00064p-D5 for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2016 06:28:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGkok-00064l-9Z for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2016 06:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bGkok-0005nU-38 for bug-gnu-emacs@gnu.org; Sat, 25 Jun 2016 06:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jun 2016 10:28: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.146685047722273 (code B ref 23824); Sat, 25 Jun 2016 10:28:02 +0000 Original-Received: (at 23824) by debbugs.gnu.org; 25 Jun 2016 10:27:57 +0000 Original-Received: from localhost ([127.0.0.1]:54908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGkoe-0005nB-TQ for submit@debbugs.gnu.org; Sat, 25 Jun 2016 06:27:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGkoc-0005mx-UF for 23824@debbugs.gnu.org; Sat, 25 Jun 2016 06:27:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGkoT-000618-SU for 23824@debbugs.gnu.org; Sat, 25 Jun 2016 06:27:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGkoT-000614-Pm; Sat, 25 Jun 2016 06:27:45 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4887 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bGkoQ-0002nb-V1; Sat, 25 Jun 2016 06:27:44 -0400 In-reply-to: (message from Tino Calancha on Fri, 24 Jun 2016 22:16:06 +0900 (JST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:120040 Archived-At: > From: Tino Calancha > Date: Fri, 24 Jun 2016 22:16:06 +0900 (JST) > cc: f92capac@gmail.com, 23824@debbugs.gnu.org > > >(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 LGTM, thanks.