From 042cfa5b4b219a82a5562a7613df1ae6c6e99e14 Mon Sep 17 00:00:00 2001 From: "nohz.afk" <149959021+nohzafk@users.noreply.github.com> Date: Fri, 29 Nov 2024 03:52:51 +0100 Subject: [PATCH] prevent the 'Buffer modified, kill anyway?' prompt when closing the frame with C-c C-c --- emacs-everywhere.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/emacs-everywhere.el b/emacs-everywhere.el index 92a949a..5155307 100644 --- a/emacs-everywhere.el +++ b/emacs-everywhere.el @@ -427,9 +427,10 @@ Never paste content when ABORT is non-nil." (apply #'call-process (car emacs-everywhere-paste-command) nil nil nil (cdr emacs-everywhere-paste-command))))) ;; Clean up after ourselves in case the buffer survives `server-buffer-done' - ;; (b/c `server-existing-buffer' is non-nil). - (emacs-everywhere-mode -1) - (server-buffer-done (current-buffer)))) + (set-buffer-modified-p nil) + (let ((kill-buffer-query-functions nil)) + (emacs-everywhere-mode -1) + (server-buffer-done (current-buffer))))) (defun emacs-everywhere-abort () "Abort current emacs-everywhere session."