Commit 0ed5c98e authored by Duncan Bayne's avatar Duncan Bayne

Add util to kill other unmodified buffers

parent 32319654
......@@ -60,6 +60,18 @@
(kill-buffer buf)))
(buffer-list)))
(defun utils:kill-other-unmodified-buffers ()
"Kill any unmodifier buffers that are inspecting files, except for the current buffer."
(interactive)
(mapcar
'(lambda (buf)
(if (and
(buffer-file-name buf)
(not (buffer-modified-p buf))
(not (equalp (current-buffer) buf)))
(kill-buffer buf)))
(buffer-list)))
(defun utils:set-mode (mode filename-pattern-list)
"Sets the specified mode for each filename pattern in filename-pattern-list."
(mapcar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment