2001-08-07 Andreas Jaeger <aj@suse.de>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 10 Aug 2001 17:23:27 +0000 (17:23 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 10 Aug 2001 17:23:27 +0000 (17:23 +0000)
* gpg.el (gpg-passphrase-forget): Don't cache
gpg-passphrase-timer.
(gpg-passphrase-store): Check if gpg-passphrase-timer is
initialized already.

contrib/ChangeLog
contrib/gpg.el

index 5c2a4fa..2c857ba 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-07  Andreas Jaeger  <aj@suse.de>
+
+       * gpg.el (gpg-passphrase-forget): Don't cache
+       gpg-passphrase-timer.
+       (gpg-passphrase-store): Check if gpg-passphrase-timer is
+       initialized already.
+       
 2001-07-30 16:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        From Andreas Fuchs <asf@void.at>
 
index afb85a8..3afa1ed 100644 (file)
@@ -7,7 +7,7 @@
 ;; Keywords: crypto
 ;; Created: 2000-04-15
 
-;; $Id: gpg.el,v 1.13 2001/07/15 20:36:39 zsh Exp $
+;; $Id: gpg.el,v 1.14 2001/07/30 23:04:20 zsh Exp $
 
 ;; This file is NOT (yet?) part of GNU Emacs.
 
@@ -801,6 +801,7 @@ evaluates BODY, like `progn'.  If BODY evaluates to `nil' (or
   "Forget stored passphrase."
   (interactive)
   (cancel-timer gpg-passphrase-timer)
+  (setq gpg-passphrase-timer nil)
   (gpg-passphrase-clear-string gpg-passphrase)
   (setq gpg-passphrase nil))
 
@@ -808,6 +809,8 @@ evaluates BODY, like `progn'.  If BODY evaluates to `nil' (or
   "Store PASSPHRASE in cache.
 Updates the timeout for clearing the cache to `gpg-passphrase-timeout'."
   (unless (equal gpg-passphrase-timeout 0)
+    (if (null gpg-passphrase-timer)
+       (setq gpg-passphrase-timer (timer-create)))
     (timer-set-time gpg-passphrase-timer 
                    (timer-relative-time (current-time) 
                                         gpg-passphrase-timeout))