Browse Source

Make sure loading org-crypt does not fail

* lisp/org-crypt.el: Check for `daemonp' before using it.
Carsten Dominik 8 years ago
parent
commit
9f81e43973
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-crypt.el

+ 2 - 1
lisp/org-crypt.el

@@ -209,7 +209,8 @@ This setting can also be overridden in the CRYPTKEY property."
 ;;     'org-mode-hook
 ;;     (lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t))))
 
-(when (and (not (daemonp)) auto-save-default)
+(when (and (functionp 'daemonp)
+	   (not (daemonp)) auto-save-default)
   (message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.")
   (sit-for 5))