X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fpgg.el;h=f64c4084c5a6cd84fc93ad69acc4513d47ce0a74;hb=8339220cc25db3fbdab4367d6252e596bddd9cb1;hp=75e1c86c31e16d916995ae38632bdd3217dc15a2;hpb=bda3e8962af0aee90144c3ae8c5360aa4c106d94;p=gnus diff --git a/lisp/pgg.el b/lisp/pgg.el index 75e1c86c3..f64c4084c 100644 --- a/lisp/pgg.el +++ b/lisp/pgg.el @@ -43,10 +43,8 @@ ;;; (eval-when-compile - ;; 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) + (when (featurep 'xemacs) + (defmacro pgg-run-at-time-1 (time repeat function args) (if (condition-case nil (let ((delete-itimer 'delete-itimer) (itimer-driver-start 'itimer-driver-start) @@ -75,36 +73,36 @@ `(let ((time ,time)) (apply #'start-itimer "pgg-run-at-time" ,function (if time (max time 1e-9) 1e-9) - ,repeat nil t ,args))) - `(let ((time ,time) - (itimers (list nil))) - (setcar - itimers - (apply #'start-itimer "pgg-run-at-time" - (lambda (itimers repeat function &rest args) - (let ((itimer (car itimers))) - (if repeat - (progn - (set-itimer-function - itimer - (lambda (itimer repeat function &rest args) - (set-itimer-restart itimer repeat) - (set-itimer-function itimer function) - (set-itimer-function-arguments itimer args) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer repeat function) args))) - (set-itimer-function - itimer - (lambda (itimer function &rest args) - (delete-itimer itimer) - (apply function args))) - (set-itimer-function-arguments - itimer - (append (list itimer function) args))))) - 1e-9 (if time (max time 1e-9) 1e-9) - nil t itimers ,repeat ,function ,args)))))) + ,repeat nil t ,args)) + `(let ((time ,time) + (itimers (list nil))) + (setcar + itimers + (apply #'start-itimer "pgg-run-at-time" + (lambda (itimers repeat function &rest args) + (let ((itimer (car itimers))) + (if repeat + (progn + (set-itimer-function + itimer + (lambda (itimer repeat function &rest args) + (set-itimer-restart itimer repeat) + (set-itimer-function itimer function) + (set-itimer-function-arguments itimer args) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer repeat function) args))) + (set-itimer-function + itimer + (lambda (itimer function &rest args) + (delete-itimer itimer) + (apply function args))) + (set-itimer-function-arguments + itimer + (append (list itimer function) args))))) + 1e-9 (if time (max time 1e-9) 1e-9) + nil t itimers ,repeat ,function ,args))))))) (eval-and-compile (if (featurep 'xemacs) @@ -600,5 +598,4 @@ within the region." (provide 'pgg) -;; arch-tag: 9cc705dd-1e6a-4c90-8dce-c3561f9a2cf4 ;;; pgg.el ends here