[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23824: 25.0.95; Do not prompt twice to save a buffer
From: |
Tino Calancha |
Subject: |
bug#23824: 25.0.95; Do not prompt twice to save a buffer |
Date: |
Fri, 24 Jun 2016 22:16:06 +0900 (JST) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
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 <f92capac@gmail.com>
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
bug#23824: (no subject), Tino Calancha, 2016/06/25