summaryrefslogtreecommitdiff
path: root/lisp/gnus/shr.el
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2010-10-13 22:21:20 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-10-13 22:21:20 +0000
commita1d16a7bd90d15d6a1a5aa804c08ae62d38646b5 (patch)
tree5ed6a0a90d5403d55ea1af16d52197067ef89d16 /lisp/gnus/shr.el
parent2e288d54f05ba6e72a227ed3857a8098ca585b50 (diff)
downloademacs-a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5.tar.gz
Merge changes made in Gnus trunk.
auth.texi (GnuPG and EasyPG Assistant Configuration): Fix syntax and trim sentence. shr.el (shr-current-column): Remove buggy and unnecessary function. auth.texi: Fix up pxref/xref. auth.texi (GnuPG and EasyPG Assistant Configuration): Fix up the @item syntax for in-Emacs makeinfo. gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert anything in Emacs. mm-decode.el (mm-shr): Allow use from non-Gnus users. nnimap.el (nnimap-parse-flags): Be more strict when looking for FETCH responses. nnimap.el, tls.el: Rip the STARTTLS stuff out of tls.el again, and just bind it directly from nnimap. shr.el (shr-find-fill-point): Use a filling algorithm that should probably work for CJVK text, too. nnimap.el (nnimap-open-connection): Fix open-tls-stream call. nnimap.el (nnimap-parse-flags): Fix regexp. tls.el (tls-program): Remove spurious %s from openssl. shr.el (shr-find-fill-point): Don't inloop on indented text.
Diffstat (limited to 'lisp/gnus/shr.el')
-rw-r--r--lisp/gnus/shr.el21
1 files changed, 7 insertions, 14 deletions
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")))