summaryrefslogtreecommitdiff
path: root/lisp/pgg.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-12-16 04:31:33 +0000
committerMiles Bader <miles@gnu.org>2007-12-16 04:31:33 +0000
commitbbbe940b6d5834189ea6d48d70a2e8f113cf53e9 (patch)
tree066e474ab26c558dee63239298f1b9a5441cef77 /lisp/pgg.el
parent30361feeba69e643550298efc507822a769b8c00 (diff)
downloademacs-bbbe940b6d5834189ea6d48d70a2e8f113cf53e9.tar.gz
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-955
Diffstat (limited to 'lisp/pgg.el')
-rw-r--r--lisp/pgg.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/lisp/pgg.el b/lisp/pgg.el
index 74b6ed7cb22..26911974ea6 100644
--- a/lisp/pgg.el
+++ b/lisp/pgg.el
@@ -42,12 +42,10 @@
;;;
(eval-when-compile
- (unless (featurep 'xemacs)
- (defalias 'pgg-run-at-time 'run-at-time)
- (defalias 'pgg-cancel-timer 'cancel-timer))
-
- (when (featurep 'xemacs)
- (defmacro pgg-run-at-time-1 (time repeat function args)
+ ;; Define it as a null macro for Emacs in order to suppress a byte
+ ;; compile warning that Emacs 21 issues.
+ (defmacro pgg-run-at-time-1 (time repeat function args)
+ (when (featurep 'xemacs)
(if (condition-case nil
(let ((delete-itimer 'delete-itimer)
(itimer-driver-start 'itimer-driver-start)
@@ -105,19 +103,23 @@
itimer
(append (list itimer function) args)))))
1e-9 (if time (max time 1e-9) 1e-9)
- nil t itimers ,repeat ,function ,args))))
+ nil t itimers ,repeat ,function ,args))))))
- (defun pgg-run-at-time (time repeat function &rest args)
- "Emulating function run as `run-at-time'.
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (progn
+ (defun pgg-run-at-time (time repeat function &rest args)
+ "Emulating function run as `run-at-time'.
TIME should be nil meaning now, or a number of seconds from now.
Return an itimer object which can be used in either `delete-itimer'
or `cancel-timer'."
- (pgg-run-at-time-1 time repeat function args))
- (defun pgg-cancel-timer (timer)
- "Emulate cancel-timer for xemacs."
- (let ((delete-itimer 'delete-itimer))
- (funcall delete-itimer timer)))
- ))
+ (pgg-run-at-time-1 time repeat function args))
+ (defun pgg-cancel-timer (timer)
+ "Emulate cancel-timer for xemacs."
+ (let ((delete-itimer 'delete-itimer))
+ (funcall delete-itimer timer))))
+ (defalias 'pgg-run-at-time 'run-at-time)
+ (defalias 'pgg-cancel-timer 'cancel-timer)))
(defun pgg-invoke (func scheme &rest args)
(progn