diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2020-06-26 09:16:19 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2020-06-26 09:16:19 +0100 |
commit | 795e6b100126de11c2343ed3dc539c3cd4b17bad (patch) | |
tree | c354d6faec20bd746b014fb6b6838981f0a8e8b3 | |
parent | 008dacdb88968a04817666bfe682561d34967e4e (diff) | |
download | bog-795e6b100126de11c2343ed3dc539c3cd4b17bad.tar.gz |
bog--with-search-lprops: Simplify using cl-letf
-rw-r--r-- | bog.el | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -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) |