From: Christopher Schmidt Date: Wed, 30 Jan 2013 22:45:32 +0000 (+0000) Subject: lisp/gnus/gnus-int.el (gnus-backend-trace): Honour gnus-backend-trace X-Git-Tag: emacs-24.3.90~173^2~7^2~190 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5f9eccc4b6eb6d6a5fcf16b9ec3ee4d331c468cb;p=emacs.git lisp/gnus/gnus-int.el (gnus-backend-trace): Honour gnus-backend-trace --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ebfc31fd91d..7cb278f2a6f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,8 @@ 2013-01-30 Christopher Schmidt + * gnus-int.el (gnus-backend-trace-elapsed): New variable. + (gnus-backend-trace): Honour gnus-backend-trace. + * mml.el (mml-insert-part): Insert closing tag. * mm-decode.el (mm-save-part): Handle invalid read-file-name results. diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index 81e0252cf93..2378b598eeb 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -248,18 +248,20 @@ If it is down, start it up (again)." 'denied)) (defvar gnus-backend-trace nil) +(defvar gnus-backend-trace-elapsed nil) (defun gnus-backend-trace (type form) - (with-current-buffer (get-buffer-create "*gnus trace*") - (buffer-disable-undo) - (goto-char (point-max)) - (insert (format-time-string "%H:%M:%S") - (format " %.2fs %s %S\n" - (if (numberp gnus-backend-trace) - (- (float-time) gnus-backend-trace) - 0) - type form)) - (setq gnus-backend-trace (float-time)))) + (when gnus-backend-trace + (with-current-buffer (get-buffer-create "*gnus trace*") + (buffer-disable-undo) + (goto-char (point-max)) + (insert (format-time-string "%H:%M:%S") + (format " %.2fs %s %S\n" + (if (numberp gnus-backend-trace-elapsed) + (- (float-time) gnus-backend-trace-elapsed) + 0) + type form)) + (setq gnus-backend-trace-elapsed (float-time))))) (defun gnus-open-server (gnus-command-method) "Open a connection to GNUS-COMMAND-METHOD."