From 4cf60c3fea16b60eb18c9a7d8403b75c89aeffef Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 Oct 2022 21:37:30 -0500 Subject: blhe --- lisp/+org-capture.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lisp/+org-capture.el') 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'." ;; Set it up as a generic value. Based on the one for `alist-get'. (gv-define-expander +org-capture--get (lambda (do key &optional alist) - (setq alist (or alist org-capture-templates)) + (setf alist (or alist org-capture-templates)) (macroexp-let2 macroexp-copyable-p k key (gv-letplace (getter setter) alist (macroexp-let2 nil p `(assoc ,k ,getter 'equal) @@ -27,7 +27,7 @@ LIST defaults to `org-capture-templates'." (let ((set-exp `(if ,p (setcdr ,p ,v) ,(funcall setter - `(cons (setq ,p (cons ,k ,v)) + `(cons (setf ,p (cons ,k ,v)) ,getter))))) `(progn ,set-exp @@ -36,7 +36,7 @@ LIST defaults to `org-capture-templates'." (defun +org-capture-sort (&optional list) "Sort LIST by string keys. LIST is a symbol and defaults to `org-capture-templates'." - (setq list (or list 'org-capture-templates)) + (setf list (or list 'org-capture-templates)) (set list (sort (symbol-value list) (lambda (a b) (string< (car a) (car b)))))) @@ -68,9 +68,9 @@ SORT-AFTER, when set to t, will call properly process the variable." ;; LIST defaults to `org-capture-templates' (declare (indent 2)) - (unless list (setq list 'org-capture-templates)) + (unless list (setf list 'org-capture-templates)) ;; Ensure VALUE is a list to cons properly - (unless (listp value) (setq value (list value))) + (unless (listp value) (setf value (list value))) (when (> (length key) 1) ;; Check for existence of groups. (let ((expected (cl-loop for i from 1 to (1- (length key)) @@ -87,7 +87,7 @@ properly process the variable." (defun +org-template--ensure-path (keys &optional list) "Ensure path of keys exists in `org-capture-templates'." - (unless list (setq list 'org-capture-templates)) + (unless list (setf list 'org-capture-templates)) (when (> (length key) 1) ;; Check for existence of groups. (let ((expected (cl-loop for i from 1 to (1- (length key)) -- cgit 1.4.1-21-gabe81