feature/workspaces: fix tests
This commit is contained in:
parent
824393043c
commit
e74a95de32
1 changed files with 6 additions and 8 deletions
|
@ -1,7 +1,6 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; feature/workspaces/test/autoload-workspaces.el
|
;;; feature/workspaces/test/autoload-workspaces.el
|
||||||
|
|
||||||
(load "persp-mode.el" nil t)
|
|
||||||
(require! :feature workspaces)
|
(require! :feature workspaces)
|
||||||
|
|
||||||
(defmacro with-workspace!! (buffer-args &rest body)
|
(defmacro with-workspace!! (buffer-args &rest body)
|
||||||
|
@ -10,11 +9,10 @@
|
||||||
(cl-loop for bsym in buffer-args
|
(cl-loop for bsym in buffer-args
|
||||||
collect `(,bsym (get-buffer-create ,(symbol-name bsym))))))
|
collect `(,bsym (get-buffer-create ,(symbol-name bsym))))))
|
||||||
`(let ((persp-auto-resume-time -1)
|
`(let ((persp-auto-resume-time -1)
|
||||||
(persp-auto-save-opt 0)
|
(persp-auto-save-opt 0))
|
||||||
persp-autokill-buffer-on-remove
|
(let (noninteractive)
|
||||||
persp-names-cache
|
(persp-mode +1))
|
||||||
noninteractive)
|
(+workspace-switch +workspaces-main t)
|
||||||
(+workspaces|init)
|
|
||||||
(let* (,@buffers)
|
(let* (,@buffers)
|
||||||
(cl-loop with persp = (get-current-persp)
|
(cl-loop with persp = (get-current-persp)
|
||||||
for buf in (list ,@(mapcar #'car buffers))
|
for buf in (list ,@(mapcar #'car buffers))
|
||||||
|
@ -22,10 +20,10 @@
|
||||||
do (with-current-buffer buf
|
do (with-current-buffer buf
|
||||||
(setq buffer-file-name (make-temp-file "workspaces-test-"))))
|
(setq buffer-file-name (make-temp-file "workspaces-test-"))))
|
||||||
,@body
|
,@body
|
||||||
(+workspace-delete +workspaces-main)
|
|
||||||
(let (kill-buffer-query-functions kill-buffer-hook)
|
(let (kill-buffer-query-functions kill-buffer-hook)
|
||||||
(mapc #'kill-buffer (list ,@(mapcar #'car buffers)))))
|
(mapc #'kill-buffer (list ,@(mapcar #'car buffers)))))
|
||||||
(persp-mode -1))))
|
(let (noninteractive)
|
||||||
|
(persp-mode -1)))))
|
||||||
|
|
||||||
;; `+workspaces|init'
|
;; `+workspaces|init'
|
||||||
(def-test! init
|
(def-test! init
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue