diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-17 12:36:58 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-12-22 10:46:41 -0200 |
commit | e9f3aa5c9ff474b2700d1c982f93a1d37aa6a3ca (patch) | |
tree | ac5edd3906ff91ad603733d90fb2c4565d47cf85 | |
parent | 5c965d196ff4dcd043577ecdacdd75b21482ea9c (diff) |
Close compose window when buffer is killed.
-rw-r--r-- | sx-compose.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sx-compose.el b/sx-compose.el index af9d861..5201435 100644 --- a/sx-compose.el +++ b/sx-compose.el @@ -117,9 +117,12 @@ contents to the API, then calls `sx-compose-after-send-functions'." (current-buffer) result))))) (defun sx-compose-quit (buffer _) - "Kill BUFFER." + "Close BUFFER's window and kill it." (interactive (list (current-buffer) nil)) (when (buffer-live-p buffer) + (let ((w (get-buffer-window buffer))) + (when (window-live-p w) + (delete-window w))) (kill-buffer buffer))) (defun sx-compose--copy-as-kill (buffer _) |