aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/gnus/ChangeLog2
-rw-r--r--lisp/gnus/pop3.el3
-rw-r--r--lisp/net/imap.el79
4 files changed, 28 insertions, 61 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 63ea25d86f4..77413d3cacc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * net/imap.el (imap-log): New convenience function used throughout
4 instead of repeating the same code all over the place.
5
12010-09-05 David De La Harpe Golden <david@harpegolden.net> 62010-09-05 David De La Harpe Golden <david@harpegolden.net>
2 7
3 * mouse.el (mouse-save-then-kill): Save region to kill-ring 8 * mouse.el (mouse-save-then-kill): Save region to kill-ring
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 979734107aa..bc814ee3a92 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,7 @@
12010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-09-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 2
3 * pop3.el (pop3-streaming-movemail): Return t for success.
4
3 * nnimap.el (nnimap-open-connection): Look for the "imaps" entry in the 5 * nnimap.el (nnimap-open-connection): Look for the "imaps" entry in the
4 .authinfo if we're using ssl connection. 6 .authinfo if we're using ssl connection.
5 7
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 048c0d8a022..a5b43914c21 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -145,7 +145,8 @@ Use streaming commands."
145 (unless pop3-leave-mail-on-server 145 (unless pop3-leave-mail-on-server
146 (pop3-send-streaming-command 146 (pop3-send-streaming-command
147 process "DELE" message-count nil)))) 147 process "DELE" message-count nil))))
148 (pop3-quit process))) 148 (pop3-quit process)
149 t))
149 150
150(defun pop3-send-streaming-command (process command count total-size) 151(defun pop3-send-streaming-command (process command count total-size)
151 (erase-buffer) 152 (erase-buffer)
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 31646176b46..ed72d7b9ce0 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -515,6 +515,16 @@ sure of changing the value of `foo'."
515 515
516;; Server functions; stream stuff: 516;; Server functions; stream stuff:
517 517
518(defun imap-log (string-or-buffer)
519 (when imap-log
520 (with-current-buffer (get-buffer-create imap-log-buffer)
521 (imap-disable-multibyte)
522 (buffer-disable-undo)
523 (goto-char (point-max))
524 (if (bufferp string-or-buffer)
525 (insert-buffer-substring string-or-buffer)
526 (insert string-or-buffer)))))
527
518(defun imap-kerberos4-stream-p (buffer) 528(defun imap-kerberos4-stream-p (buffer)
519 (imap-capability 'AUTH=KERBEROS_V4 buffer)) 529 (imap-capability 'AUTH=KERBEROS_V4 buffer))
520 530
@@ -569,12 +579,6 @@ sure of changing the value of `foo'."
569 (setq response (match-string 1))))) 579 (setq response (match-string 1)))))
570 (accept-process-output process 1) 580 (accept-process-output process 1)
571 (sit-for 1)) 581 (sit-for 1))
572 (and imap-log
573 (with-current-buffer (get-buffer-create imap-log-buffer)
574 (imap-disable-multibyte)
575 (buffer-disable-undo)
576 (goto-char (point-max))
577 (insert-buffer-substring buffer)))
578 (erase-buffer) 582 (erase-buffer)
579 (message "Opening Kerberos 4 IMAP connection with `%s'...%s" cmd 583 (message "Opening Kerberos 4 IMAP connection with `%s'...%s" cmd
580 (if response (concat "done, " response) "failed")) 584 (if response (concat "done, " response) "failed"))
@@ -645,12 +649,7 @@ sure of changing the value of `foo'."
645 (setq response (match-string 1))))) 649 (setq response (match-string 1)))))
646 (accept-process-output process 1) 650 (accept-process-output process 1)
647 (sit-for 1)) 651 (sit-for 1))
648 (and imap-log 652 (imap-log buffer)
649 (with-current-buffer (get-buffer-create imap-log-buffer)
650 (imap-disable-multibyte)
651 (buffer-disable-undo)
652 (goto-char (point-max))
653 (insert-buffer-substring buffer)))
654 (erase-buffer) 653 (erase-buffer)
655 (message "GSSAPI IMAP connection: %s" (or response "failed")) 654 (message "GSSAPI IMAP connection: %s" (or response "failed"))
656 (if (and response (let ((case-fold-search nil)) 655 (if (and response (let ((case-fold-search nil))
@@ -701,12 +700,7 @@ sure of changing the value of `foo'."
701 (not (imap-parse-greeting))) 700 (not (imap-parse-greeting)))
702 (accept-process-output process 1) 701 (accept-process-output process 1)
703 (sit-for 1)) 702 (sit-for 1))
704 (and imap-log 703 (imap-log buffer)
705 (with-current-buffer (get-buffer-create imap-log-buffer)
706 (imap-disable-multibyte)
707 (buffer-disable-undo)
708 (goto-char (point-max))
709 (insert-buffer-substring buffer)))
710 (erase-buffer) 704 (erase-buffer)
711 (when (memq (process-status process) '(open run)) 705 (when (memq (process-status process) '(open run))
712 (setq done process)))))) 706 (setq done process))))))
@@ -740,12 +734,7 @@ sure of changing the value of `foo'."
740 (not (imap-parse-greeting))) 734 (not (imap-parse-greeting)))
741 (accept-process-output process 1) 735 (accept-process-output process 1)
742 (sit-for 1)) 736 (sit-for 1))
743 (and imap-log 737 (imap-log buffer)
744 (with-current-buffer (get-buffer-create imap-log-buffer)
745 (imap-disable-multibyte)
746 (buffer-disable-undo)
747 (goto-char (point-max))
748 (insert-buffer-substring buffer)))
749 (when (memq (process-status process) '(open run)) 738 (when (memq (process-status process) '(open run))
750 process)))) 739 process))))
751 740
@@ -764,12 +753,7 @@ sure of changing the value of `foo'."
764 (not (imap-parse-greeting))) 753 (not (imap-parse-greeting)))
765 (accept-process-output process 1) 754 (accept-process-output process 1)
766 (sit-for 1)) 755 (sit-for 1))
767 (and imap-log 756 (imap-log buffer)
768 (with-current-buffer (get-buffer-create imap-log-buffer)
769 (imap-disable-multibyte)
770 (buffer-disable-undo)
771 (goto-char (point-max))
772 (insert-buffer-substring buffer)))
773 (when (memq (process-status process) '(open run)) 757 (when (memq (process-status process) '(open run))
774 process)))) 758 process))))
775 759
@@ -803,12 +787,7 @@ sure of changing the value of `foo'."
803 (not (imap-parse-greeting))) 787 (not (imap-parse-greeting)))
804 (accept-process-output process 1) 788 (accept-process-output process 1)
805 (sit-for 1)) 789 (sit-for 1))
806 (and imap-log 790 (imap-log buffer)
807 (with-current-buffer (get-buffer-create imap-log-buffer)
808 (imap-disable-multibyte)
809 (buffer-disable-undo)
810 (goto-char (point-max))
811 (insert-buffer-substring buffer)))
812 (erase-buffer) 791 (erase-buffer)
813 (when (memq (process-status process) '(open run)) 792 (when (memq (process-status process) '(open run))
814 (setq done process))))) 793 (setq done process)))))
@@ -845,11 +824,7 @@ sure of changing the value of `foo'."
845 (not (re-search-forward "[0-9]+ OK.*\r?\n" nil t))) 824 (not (re-search-forward "[0-9]+ OK.*\r?\n" nil t)))
846 (accept-process-output process 1) 825 (accept-process-output process 1)
847 (sit-for 1)) 826 (sit-for 1))
848 (and imap-log 827 (imap-log buffer)
849 (with-current-buffer (get-buffer-create imap-log-buffer)
850 (buffer-disable-undo)
851 (goto-char (point-max))
852 (insert-buffer-substring buffer)))
853 (when (and (setq tls-info (starttls-negotiate process)) 828 (when (and (setq tls-info (starttls-negotiate process))
854 (memq (process-status process) '(open run))) 829 (memq (process-status process) '(open run)))
855 (setq done process))) 830 (setq done process)))
@@ -1959,12 +1934,7 @@ on failure."
1959 1934
1960(defun imap-send-command-1 (cmdstr) 1935(defun imap-send-command-1 (cmdstr)
1961 (setq cmdstr (concat cmdstr imap-client-eol)) 1936 (setq cmdstr (concat cmdstr imap-client-eol))
1962 (and imap-log 1937 (imap-log cmdstr)
1963 (with-current-buffer (get-buffer-create imap-log-buffer)
1964 (imap-disable-multibyte)
1965 (buffer-disable-undo)
1966 (goto-char (point-max))
1967 (insert cmdstr)))
1968 (process-send-string imap-process cmdstr)) 1938 (process-send-string imap-process cmdstr))
1969 1939
1970(defun imap-send-command (command &optional buffer) 1940(defun imap-send-command (command &optional buffer)
@@ -2002,13 +1972,7 @@ on failure."
2002 (stream imap-stream) 1972 (stream imap-stream)
2003 (eol imap-client-eol)) 1973 (eol imap-client-eol))
2004 (with-current-buffer cmd 1974 (with-current-buffer cmd
2005 (and imap-log 1975 (imap-log cmd)
2006 (with-current-buffer (get-buffer-create
2007 imap-log-buffer)
2008 (imap-disable-multibyte)
2009 (buffer-disable-undo)
2010 (goto-char (point-max))
2011 (insert-buffer-substring cmd)))
2012 (process-send-region process (point-min) 1976 (process-send-region process (point-min)
2013 (point-max))) 1977 (point-max)))
2014 (process-send-string process imap-client-eol)))) 1978 (process-send-string process imap-client-eol))))
@@ -2084,12 +2048,7 @@ Return nil if no complete line has arrived."
2084 (with-current-buffer (process-buffer proc) 2048 (with-current-buffer (process-buffer proc)
2085 (goto-char (point-max)) 2049 (goto-char (point-max))
2086 (insert string) 2050 (insert string)
2087 (and imap-log 2051 (imap-log string)
2088 (with-current-buffer (get-buffer-create imap-log-buffer)
2089 (imap-disable-multibyte)
2090 (buffer-disable-undo)
2091 (goto-char (point-max))
2092 (insert string)))
2093 (let (end) 2052 (let (end)
2094 (goto-char (point-min)) 2053 (goto-char (point-min))
2095 (while (setq end (imap-find-next-line)) 2054 (while (setq end (imap-find-next-line))