+2010-10-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-current-column): New function.
+ (shr-find-fill-point): New function.
+
2010-10-11 Michael Welsh Duggan <md5i@md5i.com> (tiny change)
* sieve-manage.el (sieve-manage-open): Allow port names as well as port
(unless shr-start
(setq shr-start (point)))
(insert elem)
- (when (> (current-column) shr-width)
+ (when (> (shr-current-column) shr-width)
(if (not (search-backward " " (line-beginning-position) t))
(insert "\n")
(delete-char 1)
(unless (string-match "[ \t\n]\\'" text)
(delete-char -1))))))
+(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)))
+ (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")))