Fix void-variable org-capture-is-refiling error

In case org-capture.el isn't loaded when org-refile is used.
This commit is contained in:
Henrik Lissner 2018-08-29 16:45:09 +02:00
parent 6e03ddacda
commit d24fce1dcd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -37,7 +37,7 @@
;; fix #462: when refiling from org-capture, Emacs prompts to kill the ;; fix #462: when refiling from org-capture, Emacs prompts to kill the
;; underlying, modified buffer. This fixes that. ;; underlying, modified buffer. This fixes that.
(defun +org-capture*refile (&rest _) (defun +org-capture*refile (&rest _)
(when org-capture-is-refiling (when (bound-and-true-p org-capture-is-refiling)
(org-save-all-org-buffers))) (org-save-all-org-buffers)))
(advice-add 'org-refile :after #'+org-capture*refile) (advice-add 'org-refile :after #'+org-capture*refile)