From 2d25aa5a909ceb40b8ddacc04caf6a9c90d13522 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 29 Jun 2009 03:25:10 +0000 Subject: [PATCH] * server.el (server-buffer-done): Prevent kill-buffer from prompting by clearing the buffer modification flag (Bug#3696). --- lisp/ChangeLog | 5 +++++ lisp/server.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1adda939100..85ffe8c9a73 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-06-29 Chong Yidong + + * server.el (server-buffer-done): Prevent kill-buffer from + prompting by clearing the buffer modification flag (Bug#3696). + 2009-06-28 Michael McNamara * verilog-mode.el (verilog-beg-of-statement) diff --git a/lisp/server.el b/lisp/server.el index 10b08ad4a3b..e06fb030e78 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1202,10 +1202,15 @@ FOR-KILLING if non-nil indicates that we are called from `kill-buffer'." (not server-existing-buffer))) (setq killed t) (bury-buffer buffer) + ;; Prevent kill-buffer from prompting (Bug#3696). + (with-current-buffer buffer + (set-buffer-modified-p nil)) (kill-buffer buffer)) (unless killed (if (server-temp-file-p buffer) (progn + (with-current-buffer buffer + (set-buffer-modified-p nil)) (kill-buffer buffer) (setq killed t)) (bury-buffer buffer))))))) -- 2.39.2