[gnus git] branch master updated: m0-5-194-g7895ebe =1= Refactor the backend tracing code.

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  7895ebeb42cac9a78d9c7de6485e861e3047e011 (commit)
      from  f6b3b0de025000f0b82be224ba8f35c2eff716e8 (commit)


- Log -----------------------------------------------------------------
commit 7895ebeb42cac9a78d9c7de6485e861e3047e011
Author: Lars Ingebrigtsen <[email protected]>
Date:   Sun Dec 23 08:48:55 2012 +0100

    Refactor the backend tracing code.
    
    * gnus-int.el (gnus-backend-trace): Factor out into its own function
    for reuse.
    (gnus-open-server): Use it to add more tracing.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 048a660..cfd3774 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-23  Lars Ingebrigtsen  <[email protected]>
+
+	* gnus-int.el (gnus-backend-trace): Factor out into its own function
+	for reuse.
+	(gnus-open-server): Use it to add more tracing.
+
 2012-12-22  Philipp Haselwarter <[email protected]>
 
 	* gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save): Set
diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el
index bc3ba18..101c29c 100644
--- a/lisp/gnus-int.el
+++ b/lisp/gnus-int.el
@@ -249,16 +249,18 @@ If it is down, start it up (again)."
 
 (defvar gnus-backend-trace nil)
 
-(defun gnus-open-server (gnus-command-method)
-  "Open a connection to GNUS-COMMAND-METHOD."
-  (when (stringp gnus-command-method)
-    (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
-  (when gnus-backend-trace
+(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 " %S\n" gnus-command-method))))
+	      (format " %s %S\n" type form))))
+
+(defun gnus-open-server (gnus-command-method)
+  "Open a connection to GNUS-COMMAND-METHOD."
+  (when (stringp gnus-command-method)
+    (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
+  (gnus-backend-trace :opening gnus-command-method)
   (let ((elem (assoc gnus-command-method gnus-opened-servers))
 	(server (gnus-method-to-server-name gnus-command-method)))
     ;; If this method was previously denied, we just return nil.
@@ -333,6 +335,7 @@ If it is down, start it up (again)."
 	    (save-excursion
 	      (gnus-agent-possibly-synchronize-flags-server
 	       gnus-command-method)))
+	  (gnus-backend-trace :opened gnus-command-method)
           result)))))
 
 (defun gnus-close-server (gnus-command-method)

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    6 ++++++
 lisp/gnus-int.el |   15 +++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.