emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 184/255: safer and automatic quitting


From: Eric Schulte
Subject: [elpa] 184/255: safer and automatic quitting
Date: Sun, 16 Mar 2014 01:02:45 +0000

eschulte pushed a commit to branch go
in repository elpa.

commit 16acb15478270784f38d1cb0e90619e5b029a291
Author: Eric Schulte <address@hidden>
Date:   Sun May 19 12:07:22 2013 -0600

    safer and automatic quitting
---
 go-board.el |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/go-board.el b/go-board.el
index f48ddd0..6f51b79 100644
--- a/go-board.el
+++ b/go-board.el
@@ -421,6 +421,10 @@
     (with-backends tr (go-quit tr))
     (kill-buffer (current-buffer))))
 
+(defun go-board-safe-quit ()
+  (ignore-errors (with-backends tr (go-quit tr)))
+  t)
+
 
 ;;; Display mode
 (defvar go-board-mode-map
@@ -438,7 +442,9 @@
   "Keymap for `go-board-mode'.")
 
 (define-derived-mode go-board-mode nil "GO"
-  "Major mode for viewing a GO board.")
+  "Major mode for viewing a GO board."
+  (set (make-local-variable 'kill-buffer-query-functions)
+       (add-to-list 'kill-buffer-query-functions 'go-board-safe-quit)))
 
 
 ;;; Class and interface



reply via email to

[Prev in Thread] Current Thread [Next in Thread]