summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog27
-rw-r--r--lisp/gnus/gnus-spec.el2
-rw-r--r--lisp/gnus/mm-decode.el7
-rw-r--r--lisp/gnus/nnimap.el20
-rw-r--r--lisp/gnus/shr.el21
5 files changed, 43 insertions, 34 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index a568a530927..fe642f09b1e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,30 @@
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-find-fill-point): Don't inloop on indented text.
+
+ * nnimap.el (nnimap-open-connection): Fix open-tls-stream call.
+ (nnimap-parse-flags): Fix regexp.
+
+ * shr.el (shr-find-fill-point): Use a filling algorithm that should
+ probably work for CJVK text, too.
+
+ * nnimap.el (nnimap-extend-tls-programs): Removed.
+ (nnimap-open-connection): Bind STARTTLS to openssl explicitly.
+
+2010-10-13 Julien Danjou <julien@danjou.info>
+
+ * nnimap.el (nnimap-parse-flags): Be more strict when looking for FETCH
+ responses.
+
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-decode.el (mm-shr): Allow use from non-Gnus users.
+
+ * gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert
+ anything in Emacs.
+
+ * shr.el (shr-current-column): Remove buggy and unnecessary function.
+
2010-10-13 Julien Danjou <julien@danjou.info>
* shr.el (shr-width): Make shr-width a defcustom with default to
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index b354793b056..31e440e22dd 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -680,7 +680,7 @@ are supported for %s."
((string= fstring "%d")
(setq dontinsert t)
(if insert
- (list `(princ ,(car flist)))
+ `(insert (int-to-string ,(car flist)))
(list `(int-to-string ,(car flist)))))
;; Just lots of chars and strings.
((string-match "\\`\\(%[cs]\\)+\\'" fstring)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 8be4bb7047c..ba29a64d9de 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1691,8 +1691,11 @@ If RECURSIVE, search recursively."
;; Require since we bind its variables.
(require 'shr)
(let ((article-buffer (current-buffer))
- (shr-blocked-images (with-current-buffer gnus-summary-buffer
- gnus-blocked-images))
+ (shr-blocked-images (if (and (boundp 'gnus-summary-buffer)
+ (buffer-name gnus-summary-buffer))
+ (with-current-buffer gnus-summary-buffer
+ gnus-blocked-images)
+ shr-blocked-images))
(shr-content-function (lambda (id)
(let ((handle (mm-get-content-id id)))
(when handle
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index c6c8787a6c0..5aca6f3c835 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -318,11 +318,10 @@ textual parts.")
(setq port (or nnimap-server-port "imap")))
'("imap"))
((eq nnimap-stream 'starttls)
- (let ((tls-program (nnimap-extend-tls-programs)))
+ (let ((tls-program "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof -starttls imap"))
(open-tls-stream
"*nnimap*" (current-buffer) nnimap-address
- (setq port (or nnimap-server-port "imap"))
- 'starttls))
+ (setq port (or nnimap-server-port "imap"))))
'("imap"))
((memq nnimap-stream '(ssl tls))
(funcall (if (fboundp 'open-gnutls-stream)
@@ -419,19 +418,6 @@ textual parts.")
(nnimap-command "ENABLE QRESYNC"))
(nnimap-process nnimap-object))))))))
-(defun nnimap-extend-tls-programs ()
- (let ((programs tls-program)
- result)
- (unless (consp programs)
- (setq programs (list programs)))
- (dolist (program programs)
- (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)
(let (result)
(dolist (elem elems)
@@ -1303,7 +1289,7 @@ textual parts.")
(setq start end))
(setq start (point))
(goto-char end))
- (while (search-forward " FETCH " start t)
+ (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
(setq elems (read (current-buffer)))
(push (cons (cadr (memq 'UID elems))
(cadr (memq 'FLAGS elems)))
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 8a0e814bca3..119fd97edc0 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -219,8 +219,8 @@ redirects somewhere else."
(unless shr-start
(setq shr-start (point)))
(insert elem)
- (when (> (shr-current-column) shr-width)
- (if (not (search-backward " " (line-beginning-position) t))
+ (while (> (current-column) shr-width)
+ (if (not (shr-find-fill-point))
(insert "\n")
(delete-char 1)
(insert "\n")
@@ -235,23 +235,16 @@ redirects somewhere else."
(defun shr-find-fill-point ()
(let ((found nil))
(while (and (not found)
- (not (bolp)))
- (when (or (eq (preceding-char) ? )
- (aref fill-find-break-point-function-table (preceding-char)))
+ (> (current-column) shr-indentation))
+ (when (and (or (eq (preceding-char) ? )
+ (aref fill-find-break-point-function-table
+ (preceding-char)))
+ (<= (current-column) shr-width))
(setq found (point)))
(backward-char 1))
(or found
(end-of-line))))
-(defun shr-current-column ()
- (let ((column 0))
- (save-excursion
- (beginning-of-line)
- (while (not (eolp))
- (incf column (char-width (following-char)))
- (forward-char 1)))
- column))
-
(defun shr-ensure-newline ()
(unless (zerop (current-column))
(insert "\n")))