emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104907: Add :end-of-capability keywo


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104907: Add :end-of-capability keyword for use by pop3.el.
Date: Sun, 03 Jul 2011 15:48:59 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104907
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 15:48:59 +0200
message:
  Add :end-of-capability keyword for use by pop3.el.
modified:
  lisp/ChangeLog
  lisp/net/network-stream.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-03 13:25:18 +0000
+++ b/lisp/ChangeLog    2011-07-03 13:48:59 +0000
@@ -1,5 +1,15 @@
 2011-07-03  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * net/network-stream.el (open-network-stream): Use the
+       :end-of-capability command thoughout.
+
+2011-07-03  Wolfgang Jenkner  <address@hidden>  (tiny change)
+
+       * net/network-stream.el (open-network-stream): Add the
+       :end-of-capability command parameter, used by pop3.el.
+
+2011-07-03  Lars Magne Ingebrigtsen  <address@hidden>
+
        * dired.el (dired-map-over-marks): Refill the doc string (bug#6814).
 
        * fringe.el (fringe-query-style): Remove redundant text " (type ?

=== modified file 'lisp/net/network-stream.el'
--- a/lisp/net/network-stream.el        2011-06-27 00:11:22 +0000
+++ b/lisp/net/network-stream.el        2011-07-03 13:48:59 +0000
@@ -98,6 +98,10 @@
 
 :end-of-command specifies a regexp matching the end of a command.
 
+:end-of-capability specifies a regexp matching the end of the
+  response to the command specified for :capability-command.
+  It defaults to the regexp specified for :end-of-command.
+
 :success specifies a regexp matching a message indicating a
   successful STARTTLS negotiation.  For instance, the default
   should be \"^3\" for an NNTP connection.
@@ -203,11 +207,14 @@
         (success-string     (plist-get parameters :success))
         (capability-command (plist-get parameters :capability-command))
         (eoc                (plist-get parameters :end-of-command))
+        (eo-capa            (or (plist-get parameters :end-of-capability)
+                                eoc))
         ;; Return (STREAM GREETING CAPABILITIES RESULTING-TYPE)
         (stream (make-network-process :name name :buffer buffer
                                       :host host :service service))
         (greeting (network-stream-get-response stream start eoc))
-        (capabilities (network-stream-command stream capability-command eoc))
+        (capabilities (network-stream-command stream capability-command
+                                              eo-capa))
         (resulting-type 'plain)
         (builtin-starttls (and (fboundp 'gnutls-available-p)
                                (gnutls-available-p)))
@@ -250,7 +257,7 @@
        ;; Requery capabilities for protocols that require it; i.e.,
        ;; EHLO for SMTP.
        (when (plist-get parameters :always-query-capabilities)
-         (network-stream-command stream capability-command eoc)))
+         (network-stream-command stream capability-command eo-capa)))
       (when (string-match success-string
                          (network-stream-command stream starttls-command eoc))
        ;; The server said it was OK to begin STARTTLS negotiations.
@@ -271,7 +278,7 @@
            (network-stream-get-response stream start eoc)))
        ;; Re-get the capabilities, which may have now changed.
        (setq capabilities
-             (network-stream-command stream capability-command eoc))))
+             (network-stream-command stream capability-command eo-capa))))
 
     ;; If TLS is mandatory, close the connection if it's unencrypted.
     (when (and (or require-tls
@@ -353,7 +360,9 @@
                                    ?p service))))))
     (list stream
          (network-stream-get-response stream start eoc)
-         (network-stream-command stream capability-command eoc)
+         (network-stream-command stream capability-command
+                                 (or (plist-get parameters :end-of-capability)
+                                     eoc))
          'plain)))
 
 (provide 'network-stream)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]