org-capture.el: Add declarations and check is `org-crypt' is loaded (Fix commit ac6409fe)

* org-capture.el (org-at-encrypted-entry-p)
(org-encrypt-entry, org-decrypt-entry): Declare.
(org-capture-set-target-location): Check whether `org-crypt'
has been loaded.

Thanks to Mike McLean for reporting this.
This commit is contained in:
Bastien Guerry 2012-09-26 08:25:05 +02:00
parent 6ea8cf7f27
commit 0b65064961
1 changed files with 4 additions and 1 deletions

View File

@ -58,6 +58,9 @@
(declare-function org-table-goto-line "org-table" (N))
(declare-function org-pop-to-buffer-same-window "org-compat"
(&optional buffer-or-name norecord label))
(declare-function org-at-encrypted-entry-p "org-crypt" ())
(declare-function org-encrypt-entry "org-crypt" ())
(declare-function org-decrypt-entry "org-crypt" ())
(defvar org-remember-default-headline)
(defvar org-remember-templates)
@ -928,7 +931,7 @@ Store them in the capture property list."
(t (error "Invalid capture target specification")))
(when (org-at-encrypted-entry-p)
(when (and (featurep 'org-crypt) (org-at-encrypted-entry-p))
(org-decrypt-entry)
(setq decrypted-hl-pos
(save-excursion (and (org-back-to-heading t) (point)))))