org-crypt: when running `org-decrypt-entry', only run `auto-save-mode' check if on...
commit7e5c0263fc9743e4e0e955c0fb43ac1fe36600ec
authorPieter Praet <pieter@praet.org>
Sun, 28 Aug 2011 18:46:47 +0000 (28 18:46 +0000)
committerCarsten Dominik <carsten.dominik@gmail.com>
Sat, 8 Oct 2011 16:10:37 +0000 (8 18:10 +0200)
tree00e9e8420bb700755113e5095836eba4a38226b6
parenta5d4783a7eacf6bf67317408e7c4feaea71b746e
org-crypt: when running `org-decrypt-entry', only run `auto-save-mode' check if on an encrypted entry

* lisp/org-crypt.el (org-crypt-check-auto-save): New function, see next change.
* lisp/org-crypt.el (org-decrypt-entry): Break the auto-save-mode check out
  into a separate function, and call it at a later point, to assure it only
  runs when visiting an encrypted entry.

Currently `org-decrypt-entry' is doing the auto-save-mode check whenever
it's run, regardless of context, while this only makes sense when run on
an entry which is actually encrypted (or looks like it, at least).

TINYCHANGE
lisp/org-crypt.el