[cp-chronometrist] make code denser, make function a command
This commit is contained in:
parent
498af2eec4
commit
c8fe4b5880
|
@ -163,9 +163,7 @@ Return nil (and run `magit-status') if the user answers no."
|
||||||
(t (magit-status) nil)))
|
(t (magit-status) nil)))
|
||||||
|
|
||||||
(defun contrapunctus-before-project-stop (project)
|
(defun contrapunctus-before-project-stop (project)
|
||||||
(if (member project '("Composing"
|
(if (member project '("Composing" "Khilona archiving" "Programming"))
|
||||||
"Khilona archiving"
|
|
||||||
"Programming"))
|
|
||||||
(contrapunctus-commit-prompt)
|
(contrapunctus-commit-prompt)
|
||||||
;; all functions in `chronometrist-before-project-stop-functions'
|
;; all functions in `chronometrist-before-project-stop-functions'
|
||||||
;; must return t for successful clock-out
|
;; must return t for successful clock-out
|
||||||
|
@ -208,6 +206,7 @@ Return nil (and run `magit-status') if the user answers no."
|
||||||
(_ (delete-other-windows))))
|
(_ (delete-other-windows))))
|
||||||
|
|
||||||
(defun contrapunctus-count-expressions ()
|
(defun contrapunctus-count-expressions ()
|
||||||
|
(interactive)
|
||||||
(chronometrist-sexp-in-file chronometrist-file
|
(chronometrist-sexp-in-file chronometrist-file
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(cl-loop with count = 0
|
(cl-loop with count = 0
|
||||||
|
|
Loading…
Reference in New Issue