[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 459ecd4 081/135: Update if-let and when-let to their -let*
From: |
Ian Dunn |
Subject: |
[elpa] master 459ecd4 081/135: Update if-let and when-let to their -let* counterparts |
Date: |
Mon, 17 Feb 2020 10:52:57 -0500 (EST) |
branch: master
commit 459ecd4d567e3bc7809a9f20db459a44d05a1ff6
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Update if-let and when-let to their -let* counterparts
* org-edna.el (if-let*, when-let*): Aliases for <26.1
---
org-edna.el | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/org-edna.el b/org-edna.el
index 9a7e043..54c93ba 100644
--- a/org-edna.el
+++ b/org-edna.el
@@ -39,6 +39,12 @@
(eval-when-compile (require 'subr-x))
(require 'seq)
+;; Compatibility for Emacs < 26.1
+(unless (fboundp 'if-let*)
+ (defalias 'if-let* 'if-let))
+(unless (fboundp 'when-let*)
+ (defalias 'when-let* 'when-let))
+
(defgroup org-edna nil
"Extensible Dependencies 'N' Actions"
:group 'org)
@@ -145,12 +151,12 @@ function."
(defun org-edna--handle-condition (func mod args targets consideration)
"Handle a condition."
;; Check the condition at each target
- (when-let ((blocks
- (mapcar
- (lambda (entry-marker)
- (org-with-point-at entry-marker
- (apply func mod args)))
- targets)))
+ (when-let* ((blocks
+ (mapcar
+ (lambda (entry-marker)
+ (org-with-point-at entry-marker
+ (apply func mod args)))
+ targets)))
;; Apply consideration
(org-edna-handle-consideration consideration blocks)))
@@ -256,7 +262,7 @@ See `org-edna-run' for CHANGE-PLIST explanation.
This shouldn't be run from outside of `org-trigger-hook'."
(org-edna-run change-plist
- (when-let ((form (org-entry-get pos "TRIGGER" org-edna-use-inheritance)))
+ (when-let* ((form (org-entry-get pos "TRIGGER" org-edna-use-inheritance)))
(org-edna-process-form form 'action))))
(defun org-edna-blocker-function (change-plist)
@@ -266,7 +272,7 @@ See `org-edna-run' for CHANGE-PLIST explanation.
This shouldn't be run from outside of `org-blocker-hook'."
(org-edna-run change-plist
- (if-let ((form (org-entry-get pos "BLOCKER" org-edna-use-inheritance)))
+ (if-let* ((form (org-entry-get pos "BLOCKER" org-edna-use-inheritance)))
(org-edna-process-form form 'condition)
t)))
@@ -899,7 +905,7 @@ Edna Syntax: chain!(\"PROPERTY\")
Copy PROPERTY from the source heading to the target heading.
Does nothing if the source heading has no property PROPERTY."
- (when-let ((old-prop (org-entry-get last-entry property)))
+ (when-let* ((old-prop (org-entry-get last-entry property)))
(org-entry-put nil property old-prop)))
@@ -941,10 +947,10 @@ in a DONE state.
Here, \"Heading 2\" will block if all targets tagged \"target\"
are not in a DONE state."
- (when-let ((condition
- (if neg
- (member (org-entry-get nil "TODO") org-not-done-keywords)
- (member (org-entry-get nil "TODO") org-done-keywords))))
+ (when-let* ((condition
+ (if neg
+ (member (org-entry-get nil "TODO") org-not-done-keywords)
+ (member (org-entry-get nil "TODO") org-done-keywords))))
(org-get-heading)))
(defun org-edna-condition/todo-state? (neg state)
@@ -1237,7 +1243,7 @@ the source buffer. Finish with `C-c C-c' or abort with
`C-c C-k'")
(cycle-sort-function . identity)))))))
(defun org-edna-completion-at-point ()
- (when-let ((bounds (bounds-of-thing-at-point 'symbol)))
+ (when-let* ((bounds (bounds-of-thing-at-point 'symbol)))
(list (car bounds) (cdr bounds) 'org-edna-completion-table-function)))
- [elpa] master 3647cf7 095/135: Overhauled parsing method, and added conditional blocks, (continued)
- [elpa] master 3647cf7 095/135: Overhauled parsing method, and added conditional blocks, Ian Dunn, 2020/02/17
- [elpa] master 6e1f5fb 087/135: Fixed bug in planning action, Ian Dunn, 2020/02/17
- [elpa] master 2e8b7eb 094/135: Don't export special strings for documentation, Ian Dunn, 2020/02/17
- [elpa] master a3183b2 105/135: Bumped version, Ian Dunn, 2020/02/17
- [elpa] master a2da465 107/135: Bumped version, Ian Dunn, 2020/02/17
- [elpa] master b72cb7b 101/135: Cleaned up Changelog some more, Ian Dunn, 2020/02/17
- [elpa] master 6b3923b 110/135: Added tests for cache, Ian Dunn, 2020/02/17
- [elpa] master 4c8058f 129/135: Step down should not include the headline itself when it has no children., Ian Dunn, 2020/02/17
- [elpa] master 1d8bf6e 127/135: Fixed timestamp bug in scheduled! and deadline! actions, Ian Dunn, 2020/02/17
- [elpa] master e6ba769 134/135: Temporarily removed Org Edna directory, Ian Dunn, 2020/02/17
- [elpa] master 459ecd4 081/135: Update if-let and when-let to their -let* counterparts,
Ian Dunn <=
- [elpa] master a9af45f 092/135: Added links in "Changelog", Ian Dunn, 2020/02/17
- [elpa] master 6843bee 093/135: Updated info pages, Ian Dunn, 2020/02/17
- [elpa] master 1f2adab 097/135: Updated copyright, Ian Dunn, 2020/02/17
- [elpa] master e08eae5 096/135: Fixed bugs in parsing multiple forms, Ian Dunn, 2020/02/17
- [elpa] master b86ae49 103/135: Fixed parsing of ! in conditions, Ian Dunn, 2020/02/17
- [elpa] master d5bce9d 133/135: Deprecated org-edna-load and org-edna-unload, Ian Dunn, 2020/02/17
- [elpa] master f6feccf 084/135: Fix bug in keyword completion, Ian Dunn, 2020/02/17
- [elpa] master 7776cb4 079/135: Added documentation for popout editing, Ian Dunn, 2020/02/17
- [elpa] master 3748507 083/135: Add space between edit message and BLOCKER section, Ian Dunn, 2020/02/17
- [elpa] master c05b661 111/135: Added documentation about using a timeout for cache, Ian Dunn, 2020/02/17