+;; For debugging.
+(defvar elmo-pop3-debug nil
+ "Non-nil forces POP3 folder as debug mode.
+Debug information is inserted in the buffer \"*POP3 DEBUG*\"")
+
+(defvar elmo-pop3-debug-inhibit-logging nil)
+
+;;; Debug
+(defsubst elmo-pop3-debug (message &rest args)
+ (if elmo-pop3-debug
+ (with-current-buffer (get-buffer-create "*POP3 DEBUG*")
+ (goto-char (point-max))
+ (if elmo-pop3-debug-inhibit-logging
+ (insert "NO LOGGING\n")
+ (insert (apply 'format message args) "\n")))))
+