Remove some anaphoric forms
This commit is contained in:
parent
cd9654d637
commit
eacfc39fb3
|
@ -44,10 +44,10 @@ workgroup."
|
|||
(let ((buffers (if (wg-current-workgroup t)
|
||||
(doom/get-buffers-in-workgroup)
|
||||
(buffer-list)))
|
||||
project-root)
|
||||
(append (aif (and (not all-p) (doom/project-root t))
|
||||
(project-root (and (not all-p) (doom/project-root t))))
|
||||
(append (if project-root
|
||||
(funcall (if (eq all-p 'not) '-remove '-filter)
|
||||
(lambda (b) (projectile-project-buffer-p b it))
|
||||
(lambda (b) (projectile-project-buffer-p b project-root))
|
||||
buffers)
|
||||
buffers)
|
||||
(list doom-buffer))))
|
||||
|
|
|
@ -79,10 +79,11 @@ evil-window-move-* (e.g. `evil-window-move-far-left')"
|
|||
;;;###autoload
|
||||
(defun doom/close-frame ()
|
||||
(interactive)
|
||||
(aif (assq (selected-frame) doom-wg-frames)
|
||||
(progn (wg-delete-workgroup (wg-get-workgroup (cdr it)))
|
||||
(delete-frame (car it)))
|
||||
(delete-frame)))
|
||||
(let ((frame (assq (selected-frame) doom-wg-frames)))
|
||||
(if frame
|
||||
(progn (wg-delete-workgroup (wg-get-workgroup (cdr frame)))
|
||||
(delete-frame (car frame)))
|
||||
(delete-frame))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/evil-window-resize (direction &optional count)
|
||||
|
|
|
@ -24,21 +24,24 @@
|
|||
;;;###autoload
|
||||
(defun doom/ert-run-test ()
|
||||
(interactive)
|
||||
(let (case-fold-search)
|
||||
(let (case-fold-search thing)
|
||||
(doom--ert-pre)
|
||||
(aif (thing-at-point 'defun t)
|
||||
(if (string-match "(ert-deftest \\([^ ]+\\)" it)
|
||||
(ert-run-tests-interactively (substring it (match-beginning 1) (match-end 1)))
|
||||
(setq thing (thing-at-point 'defun t))
|
||||
(if thing
|
||||
(if (string-match "(ert-deftest \\([^ ]+\\)" thing)
|
||||
(ert-run-tests-interactively
|
||||
(substring thing (match-beginning 1) (match-end 1)))
|
||||
(user-error "Invalid test at point"))
|
||||
(user-error "No test found at point"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/ert-rerun-test ()
|
||||
(interactive)
|
||||
(let (case-fold-search)
|
||||
(let (case-fold-search thing)
|
||||
(doom--ert-pre)
|
||||
(aif (car-safe ert--selector-history)
|
||||
(ert-run-tests-interactively it)
|
||||
(setq thing (car-safe ert--selector-history))
|
||||
(if thing
|
||||
(ert-run-tests-interactively thing)
|
||||
(message "No test found in history, looking for test at point")
|
||||
(doom/ert-run-test))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user