[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 848f046 08/14: Update if-let and when-let to their -let* c
From: |
Ian Dunn |
Subject: |
[elpa] master 848f046 08/14: Update if-let and when-let to their -let* counterparts |
Date: |
Sun, 17 Dec 2017 17:39:58 -0500 (EST) |
branch: master
commit 848f046fb2dcf31bc3dab2e5016c44f0ad3f92dd
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 updated (7f7981b -> bd64a1d), Ian Dunn, 2017/12/17
- [elpa] master 5979517 03/14: Only require subr-x during compilation, Ian Dunn, 2017/12/17
- [elpa] master 63ef489 01/14: Updated documentation for ELPA release, Ian Dunn, 2017/12/17
- [elpa] master 2cfb021 02/14: Added next-sibling-wrap finder, Ian Dunn, 2017/12/17
- [elpa] master ec145d9 07/14: Bumped version to beta1, Ian Dunn, 2017/12/17
- [elpa] master 848f046 08/14: Update if-let and when-let to their -let* counterparts,
Ian Dunn <=
- [elpa] master 35a9a7e 04/14: Added support for interactive editing of blockers and triggers, Ian Dunn, 2017/12/17
- [elpa] master 7aa71e7 06/14: Added documentation for popout editing, Ian Dunn, 2017/12/17
- [elpa] master 1eabcf9 09/14: Don't present variables for keyword completion, Ian Dunn, 2017/12/17
- [elpa] master 32dada2 10/14: Add space between edit message and BLOCKER section, Ian Dunn, 2017/12/17
- [elpa] master 23b5ae9 11/14: Fix bug in keyword completion, Ian Dunn, 2017/12/17
- [elpa] master 40b0ee9 12/14: Added two new forms for setting planning information, Ian Dunn, 2017/12/17
- [elpa] master 6826e92 05/14: Updated documentation, Ian Dunn, 2017/12/17
- [elpa] master ea0f9fb 13/14: Added relatives finder, Ian Dunn, 2017/12/17
- [elpa] master bd64a1d 14/14: Merge commit 'ea0f9fb914cccc1d127eea94bc4c607dbcd4dc7d', Ian Dunn, 2017/12/17