aboutsummaryrefslogtreecommitdiff
path: root/test/test-perspective.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-perspective.el')
-rw-r--r--test/test-perspective.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test-perspective.el b/test/test-perspective.el
index 5069cb8..e781168 100644
--- a/test/test-perspective.el
+++ b/test/test-perspective.el
@@ -47,6 +47,12 @@ perspectives and open buffers."
`(progn
(persp-mode 1)
,@body
+ ;; get rid of perspective-specific *scratch* buffers first
+ (mapc #'kill-buffer (mapcar (lambda (persp)
+ (format "*scratch* (%s)" persp))
+ (remove-if (lambda (persp)
+ (string-equal "main" persp))
+ (persp-names))))
(persp-mode -1)
(mapc #'kill-buffer (persp-test-buffer-list-all))))