From 7735734a046198be81a1e6b3f9f01bcfea7aed6e Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 1 Sep 2016 16:33:48 -0500 Subject: [PATCH] killall-monky-buffers --- monky.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/monky.el b/monky.el index 83d5107..0096160 100644 --- a/monky.el +++ b/monky.el @@ -25,6 +25,7 @@ ;;; Code: (require 'cl) +(require 'cl-lib) (require 'bindat) (defgroup monky nil @@ -2944,6 +2945,15 @@ Brings up a buffer to allow editing of commit message." (interactive "sBookmark name: ") (monky-run-hg-async "bookmark" bookmark-name)) +(defun killall-monky-buffers () + (interactive) + (cl-flet ((monky-buffer-p (b) (string-match "\*monky\\(:\\|-\\).*" (buffer-name b)))) + (let ((monky-buffers (cl-remove-if-not #'monky-buffer-p (buffer-list)))) + (cl-loop for mb in monky-buffers + do + (kill-buffer mb))))) + + (provide 'monky) ;; Local Variables: