Finished tacc-running? replacement TODO

master
Brady McDonough 2 years ago
parent 5ae038d2f5
commit 226be505cd

@ -49,7 +49,7 @@
;;; Code: ;;; Code:
;; TODOS: tacc-running? needs to be replaced by tacc-session? and tacc-live? depending on context ;; TODOS:
;; ;;
;; ERROR: timer shutdown seems to leave things in a wrong state and buffer doesn't die properly ;; ERROR: timer shutdown seems to leave things in a wrong state and buffer doesn't die properly
;; Check on the logic of push-current, needs predicates rather than lazy if conditions ;; Check on the logic of push-current, needs predicates rather than lazy if conditions
@ -291,18 +291,18 @@ registered" sym-name)
;; 05.2 State checks ;; 05.2 State checks
(defun tacc-buffer () (defun tacc-buffer ()
"Gets the tacc-timer buffer if there is one" "Gets the tacc-timer buffer if there is one"
(get-buffer tacc-buffer-name)) (get-buffer tacc-buffer-name))
(defun tacc-live-state? (state) (defun tacc-live-state? ()
"Checks if the state supplied indicates a live timer" "Checks if tacc-info's state indicates a live timer"
(let ((state (alist-get 'state tacc-info)))
(cond ((eq state 'pause) nil) (cond ((eq state 'pause) nil)
((eq state 'stop) nil) ((eq state 'stop) nil)
((eq state 'work) t) ((eq state 'work) t)
((eq state 'break) t) ((eq state 'break) t)
('t (signal 'tacc-error-illegal-buffer-state state)))) ('t (signal 'tacc-error-illegal-buffer-state state)))))
(defun tacc-live? () (defun tacc-live? ()
"Checks if there is a live timer running" "Checks if there is a live timer running"

Loading…
Cancel
Save