Skip to content

Commit

Permalink
Clean up buffer cleanup test code.
Browse files Browse the repository at this point in the history
* "main" -> persp-initial-frame-name.
* use delq against persp-names directly.
* mapc on kill-buffer + format.
  • Loading branch information
zenspider committed Oct 23, 2019
1 parent 03061f4 commit 32ea467
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/test-perspective.el
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ perspectives and open buffers."
(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))))
(mapc (lambda (persp)
(kill-buffer (format "*scratch* (%s)" persp)))
(delq persp-initial-frame-name (persp-names)))
(persp-mode -1)
(mapc #'kill-buffer (persp-test-buffer-list-all))))

Expand Down

0 comments on commit 32ea467

Please sign in to comment.