diff options
author | erjoalgo <erjoalgo@users.noreply.github.com> | 2016-05-28 09:07:56 -0700 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2016-05-28 19:07:56 +0300 |
commit | 62276b2aab3fc40a2bb3500b162d0a55ca4ec0aa (patch) | |
tree | 95fdec46e35f88877624cf5babb944ed1cd4a7dc /nrepl-client.el | |
parent | 886ea9bbd0b73377c90574a3cb6b64e403c294a1 (diff) |
Add an option to suppress the prompt in nrepl--maybe-kill-server-buffer (#1765)
Diffstat (limited to 'nrepl-client.el')
-rw-r--r-- | nrepl-client.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nrepl-client.el b/nrepl-client.el index 93c7fcb9..9d384b72 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -126,6 +126,11 @@ When true some special buffers like the server buffer will be hidden." :type 'boolean :group 'nrepl) +(defcustom nrepl-prompt-to-kill-server-buffer-on-quit t + "If non-nil, prompt the user for confirmation before killing the nrepl server buffer and associated process." + :type 'boolean + :group 'nrepl) + (defvar nrepl-create-client-buffer-function 'nrepl-create-client-buffer-default "Name of a function that returns a client process buffer. It is called with one argument, a plist containing :host, :port and :proc @@ -594,7 +599,8 @@ Do nothing if there is a REPL connected to that server." (with-current-buffer server-buf ;; Don't kill the server if there is a REPL connected to it. (when (and (not nrepl-client-buffers) - (y-or-n-p "Also kill server process and buffer? ")) + (or (not nrepl-prompt-to-kill-server-buffer-on-quit) + (y-or-n-p "Also kill server process and buffer? "))) (let ((proc (get-buffer-process server-buf))) (when (process-live-p proc) (set-process-query-on-exit-flag proc nil) |