summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnimap.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/nnimap.el')
-rw-r--r--lisp/gnus/nnimap.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 4d26cdb6371..70aa573525f 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -404,7 +404,11 @@ textual parts.")
(unless (consp programs)
(setq programs (list programs)))
(dolist (program programs)
- (push (concat program " " "%s") result))
+ (when (assoc (car (split-string program)) tls-starttls-switches)
+ (push (if (not (string-match "%s" program))
+ (concat program " " "%s")
+ program)
+ result)))
(nreverse result)))
(defun nnimap-find-parameter (parameter elems)