[PATCH time-block-command 1/1] Use prefixed cl-first/-rest from cl-lib instead of obsolete cl funcs
Export this patch
From: Michael Eliachevitch <m.eliachevitch@posteo.de>
rest and first from the cl package are obsolete since emacs 27.1
---
time-block.el | 20 ++++++++++ ----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/time-block.el b/time-block.el
index fd52345..e89228b 100644
--- a/time-block.el
+++ b/time-block.el
@@ -116,13 +116,13 @@ Saturday 6"
(defun time-block-group-blocked-p (block-group)
"Is group BLOCK-GROUP currently blocked?"
- (when-let ((group (rest (assoc block-group time-block-groups)))
+ (when-let ((group (cl-rest (assoc block-group time-block-groups)))
(ts-now (ts-now))
(current-day (ts-dow ts-now))
- (day-blocks (rest (assoc current-day group)))
+ (day-blocks (cl-rest (assoc current-day group)))
(now (ts-parse (ts-format "%H:%M" ts-now))))
- (cl-do* ((pair (first day-blocks) (first blocks-left))
- (blocks-left (rest day-blocks) (rest blocks-left))
+ (cl-do* ((pair (cl-first day-blocks) (cl-first blocks-left))
+ (blocks-left (cl-rest day-blocks) (rest blocks-left))
(start (ts-parse (car pair)) (ts-parse (car pair)))
(end (ts-parse (cdr pair)) (ts-parse (cdr pair))))
((or (null blocks-left)
@@ -157,12 +157,12 @@ BODY is the body of the code. This should include an
[&optional ("interactive" interactive) def-body]))
(indent 3)
(doc-string 4))
- (let* ((docstring (when (stringp (first body)) (first body)))
- (body (if docstring (rest body) body))
- (interactive-spec (when (and (listp (first body))
- (equal 'interactive (first (first body))))
- (first body)))
- (body (if interactive-spec (rest body) body))
+ (let* ((docstring (when (stringp (cl-first body)) (cl-first body)))
+ (body (if docstring (cl-rest body) body))
+ (interactive-spec (when (and (listp (cl-first body))
+ (equal 'interactive (cl-first (cl-first body))))
+ (cl-first body)))
+ (body (if interactive-spec (cl-rest body) body))
(condition (if override-prompt
`(and (time-block-group-blocked-p ',group)
(not (yes-or-no-p ,override-prompt)))
--
2.34.2
Applied.
Thanks,
Sam
Not sure that this actually got through... Gram.
Applied in b2c5c1d378faee5a78a0364efe8d7d57e4b161b1.
Thanks,
Sam