forked from mirrors/org-mode
org-persist: Fix attempted mapc-ing of macro
* lisp/org-persist.el (org-persist--gc-persist-file): Redefine `org-persist--gc-persist-file' as a function so it can be mapc'd in `org-persist-gc'.
This commit is contained in:
parent
47654f844d
commit
c91226354a
|
@ -922,12 +922,12 @@ Do nothing in an indirect buffer."
|
||||||
(when (file-exists-p file)
|
(when (file-exists-p file)
|
||||||
(delete-file file))))
|
(delete-file file))))
|
||||||
|
|
||||||
(defmacro org-persist--gc-persist-file (persist-file)
|
(defun org-persist--gc-persist-file (persist-file)
|
||||||
"Garbage collect PERSIST-FILE."
|
"Garbage collect PERSIST-FILE."
|
||||||
`(when (file-exists-p ,persist-file)
|
(when (file-exists-p persist-file)
|
||||||
(delete-file ,persist-file)
|
(delete-file persist-file)
|
||||||
(when (org-directory-empty-p (file-name-directory ,persist-file))
|
(when (org-directory-empty-p (file-name-directory persist-file))
|
||||||
(delete-directory (file-name-directory ,persist-file)))))
|
(delete-directory (file-name-directory persist-file)))))
|
||||||
|
|
||||||
(defun org-persist-gc ()
|
(defun org-persist-gc ()
|
||||||
"Remove expired or unregistered containers and orphaned files.
|
"Remove expired or unregistered containers and orphaned files.
|
||||||
|
|
Loading…
Reference in a new issue