summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-06-26 09:16:19 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2020-06-26 09:16:19 +0100
commit795e6b100126de11c2343ed3dc539c3cd4b17bad (patch)
treec354d6faec20bd746b014fb6b6838981f0a8e8b3
parent008dacdb88968a04817666bfe682561d34967e4e (diff)
downloadbog-795e6b100126de11c2343ed3dc539c3cd4b17bad.tar.gz
bog--with-search-lprops: Simplify using cl-letf
-rw-r--r--bog.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/bog.el b/bog.el
index 719002a..16def76 100644
--- a/bog.el
+++ b/bog.el
@@ -1198,17 +1198,13 @@ Restore the `org-lprops' property value for
(declare (indent 0) (debug t))
(let ((bog-lprops '((org-agenda-buffer-name "*Bog search*")
(org-agenda-files (bog-notes))
- org-agenda-text-search-extra-files
- org-agenda-sticky))
- (org-lprops (make-symbol "org-lprops")))
- `(let ((,org-lprops (get 'org-agenda-redo-command 'org-lprops)))
- (unwind-protect
- (let ,bog-lprops
- (put 'org-agenda-redo-command 'org-lprops ',bog-lprops)
- (put 'org-agenda-files 'org-restrict nil)
- ,@body
- (use-local-map bog--agenda-map))
- (put 'org-agenda-redo-command 'org-lprops ,org-lprops)))))
+ (org-agenda-text-search-extra-files ())
+ (org-agenda-sticky nil))))
+ `(cl-letf (((get 'org-agenda-redo-command 'org-lprops) ',bog-lprops)
+ ,@bog-lprops)
+ (put 'org-agenda-files 'org-restrict nil)
+ ,@body
+ (use-local-map bog--agenda-map))))
;;;###autoload
(defun bog-search-notes (&optional todo-only string)