diff options
author | Case Duckworth | 2022-10-21 21:37:30 -0500 |
---|---|---|
committer | Case Duckworth | 2022-10-21 21:37:30 -0500 |
commit | 4cf60c3fea16b60eb18c9a7d8403b75c89aeffef (patch) | |
tree | 033b31cf848311659dc296793631f9e6e9983d58 /lisp/+org-capture.el | |
parent | Add a bunch of other stuff or whatever (diff) | |
download | emacs-4cf60c3fea16b60eb18c9a7d8403b75c89aeffef.tar.gz emacs-4cf60c3fea16b60eb18c9a7d8403b75c89aeffef.zip |
blhe
Diffstat (limited to 'lisp/+org-capture.el')
-rw-r--r-- | lisp/+org-capture.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/+org-capture.el b/lisp/+org-capture.el index 7ed4e00..06dfcfd 100644 --- a/lisp/+org-capture.el +++ b/lisp/+org-capture.el | |||
@@ -17,7 +17,7 @@ LIST defaults to `org-capture-templates'." | |||
17 | ;; Set it up as a generic value. Based on the one for `alist-get'. | 17 | ;; Set it up as a generic value. Based on the one for `alist-get'. |
18 | (gv-define-expander +org-capture--get | 18 | (gv-define-expander +org-capture--get |
19 | (lambda (do key &optional alist) | 19 | (lambda (do key &optional alist) |
20 | (setq alist (or alist org-capture-templates)) | 20 | (setf alist (or alist org-capture-templates)) |
21 | (macroexp-let2 macroexp-copyable-p k key | 21 | (macroexp-let2 macroexp-copyable-p k key |
22 | (gv-letplace (getter setter) alist | 22 | (gv-letplace (getter setter) alist |
23 | (macroexp-let2 nil p `(assoc ,k ,getter 'equal) | 23 | (macroexp-let2 nil p `(assoc ,k ,getter 'equal) |
@@ -27,7 +27,7 @@ LIST defaults to `org-capture-templates'." | |||
27 | (let ((set-exp | 27 | (let ((set-exp |
28 | `(if ,p (setcdr ,p ,v) | 28 | `(if ,p (setcdr ,p ,v) |
29 | ,(funcall setter | 29 | ,(funcall setter |
30 | `(cons (setq ,p (cons ,k ,v)) | 30 | `(cons (setf ,p (cons ,k ,v)) |
31 | ,getter))))) | 31 | ,getter))))) |
32 | `(progn | 32 | `(progn |
33 | ,set-exp | 33 | ,set-exp |
@@ -36,7 +36,7 @@ LIST defaults to `org-capture-templates'." | |||
36 | (defun +org-capture-sort (&optional list) | 36 | (defun +org-capture-sort (&optional list) |
37 | "Sort LIST by string keys. | 37 | "Sort LIST by string keys. |
38 | LIST is a symbol and defaults to `org-capture-templates'." | 38 | LIST is a symbol and defaults to `org-capture-templates'." |
39 | (setq list (or list 'org-capture-templates)) | 39 | (setf list (or list 'org-capture-templates)) |
40 | (set list (sort (symbol-value list) (lambda (a b) | 40 | (set list (sort (symbol-value list) (lambda (a b) |
41 | (string< (car a) (car b)))))) | 41 | (string< (car a) (car b)))))) |
42 | 42 | ||
@@ -68,9 +68,9 @@ SORT-AFTER, when set to t, will call | |||
68 | properly process the variable." | 68 | properly process the variable." |
69 | ;; LIST defaults to `org-capture-templates' | 69 | ;; LIST defaults to `org-capture-templates' |
70 | (declare (indent 2)) | 70 | (declare (indent 2)) |
71 | (unless list (setq list 'org-capture-templates)) | 71 | (unless list (setf list 'org-capture-templates)) |
72 | ;; Ensure VALUE is a list to cons properly | 72 | ;; Ensure VALUE is a list to cons properly |
73 | (unless (listp value) (setq value (list value))) | 73 | (unless (listp value) (setf value (list value))) |
74 | (when (> (length key) 1) | 74 | (when (> (length key) 1) |
75 | ;; Check for existence of groups. | 75 | ;; Check for existence of groups. |
76 | (let ((expected (cl-loop for i from 1 to (1- (length key)) | 76 | (let ((expected (cl-loop for i from 1 to (1- (length key)) |
@@ -87,7 +87,7 @@ properly process the variable." | |||
87 | 87 | ||
88 | (defun +org-template--ensure-path (keys &optional list) | 88 | (defun +org-template--ensure-path (keys &optional list) |
89 | "Ensure path of keys exists in `org-capture-templates'." | 89 | "Ensure path of keys exists in `org-capture-templates'." |
90 | (unless list (setq list 'org-capture-templates)) | 90 | (unless list (setf list 'org-capture-templates)) |
91 | (when (> (length key) 1) | 91 | (when (> (length key) 1) |
92 | ;; Check for existence of groups. | 92 | ;; Check for existence of groups. |
93 | (let ((expected (cl-loop for i from 1 to (1- (length key)) | 93 | (let ((expected (cl-loop for i from 1 to (1- (length key)) |