Mercurial > emacs
comparison lisp/gnus/shr.el @ 110968:3958dbde1223
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.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 13 Oct 2010 22:21:20 +0000 |
parents | 0272ba632fc2 |
children | e65b79c36e50 |
comparison
equal
deleted
inserted
replaced
110967:188673195616 | 110968:3958dbde1223 |
---|---|
217 ;; upwards the first point in the buffer where the text really | 217 ;; upwards the first point in the buffer where the text really |
218 ;; starts. | 218 ;; starts. |
219 (unless shr-start | 219 (unless shr-start |
220 (setq shr-start (point))) | 220 (setq shr-start (point))) |
221 (insert elem) | 221 (insert elem) |
222 (when (> (shr-current-column) shr-width) | 222 (while (> (current-column) shr-width) |
223 (if (not (search-backward " " (line-beginning-position) t)) | 223 (if (not (shr-find-fill-point)) |
224 (insert "\n") | 224 (insert "\n") |
225 (delete-char 1) | 225 (delete-char 1) |
226 (insert "\n") | 226 (insert "\n") |
227 (put-text-property (1- (point)) (point) 'shr-break t) | 227 (put-text-property (1- (point)) (point) 'shr-break t) |
228 (when (> shr-indentation 0) | 228 (when (> shr-indentation 0) |
233 (delete-char -1)))))) | 233 (delete-char -1)))))) |
234 | 234 |
235 (defun shr-find-fill-point () | 235 (defun shr-find-fill-point () |
236 (let ((found nil)) | 236 (let ((found nil)) |
237 (while (and (not found) | 237 (while (and (not found) |
238 (not (bolp))) | 238 (> (current-column) shr-indentation)) |
239 (when (or (eq (preceding-char) ? ) | 239 (when (and (or (eq (preceding-char) ? ) |
240 (aref fill-find-break-point-function-table (preceding-char))) | 240 (aref fill-find-break-point-function-table |
241 (preceding-char))) | |
242 (<= (current-column) shr-width)) | |
241 (setq found (point))) | 243 (setq found (point))) |
242 (backward-char 1)) | 244 (backward-char 1)) |
243 (or found | 245 (or found |
244 (end-of-line)))) | 246 (end-of-line)))) |
245 | |
246 (defun shr-current-column () | |
247 (let ((column 0)) | |
248 (save-excursion | |
249 (beginning-of-line) | |
250 (while (not (eolp)) | |
251 (incf column (char-width (following-char))) | |
252 (forward-char 1))) | |
253 column)) | |
254 | 247 |
255 (defun shr-ensure-newline () | 248 (defun shr-ensure-newline () |
256 (unless (zerop (current-column)) | 249 (unless (zerop (current-column)) |
257 (insert "\n"))) | 250 (insert "\n"))) |
258 | 251 |