Mercurial > emacs
comparison lisp/gnus/shr.el @ 110898:069deed4cdec
Merge changes made in Gnus trunk.
nnimap.el (nnimap-open-connection): If we have gnutls loaded, then try to use that for the tls stream.
nnimap.el (nnimap-retrieve-group-data-early): Rework the marks code to heed UIDVALIDITY and find out which groups are read-only and not.
nnimap.el (nnimap-get-flags): Use the same marks parsing code as the rest of nnimap.
nnimap.el (nnmail-expiry-target-group): Say that every expiry target group is the "last".
nnir.el (nnir-engines): Fix too many arguments.
nnimap.el: Start implementing QRESYNC support.
gnus.el (gnus-group-set-parameter): Fix typo.
shr.el: Rework the way things are indented by <li> slightly.
spam.el (gnus-summary-mode-map): Bind to "$".
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 10 Oct 2010 00:15:21 +0000 |
parents | d98a67277730 |
children | 3243e7055d49 |
comparison
equal
deleted
inserted
replaced
110897:ddcc974a9f3d | 110898:069deed4cdec |
---|---|
228 (unless (zerop (current-column)) | 228 (unless (zerop (current-column)) |
229 (insert "\n"))) | 229 (insert "\n"))) |
230 | 230 |
231 (defun shr-ensure-paragraph () | 231 (defun shr-ensure-paragraph () |
232 (unless (bobp) | 232 (unless (bobp) |
233 (if (bolp) | 233 (if (<= (current-column) shr-indentation) |
234 (unless (save-excursion | 234 (unless (save-excursion |
235 (forward-line -1) | 235 (forward-line -1) |
236 (looking-at " *$")) | 236 (looking-at " *$")) |
237 (insert "\n")) | 237 (insert "\n")) |
238 (if (save-excursion | 238 (if (save-excursion |
240 (looking-at " *$")) | 240 (looking-at " *$")) |
241 (insert "\n") | 241 (insert "\n") |
242 (insert "\n\n"))))) | 242 (insert "\n\n"))))) |
243 | 243 |
244 (defun shr-indent () | 244 (defun shr-indent () |
245 (insert (make-string shr-indentation ? ))) | 245 (when (> shr-indentation 0) |
246 (insert (make-string shr-indentation ? )))) | |
246 | 247 |
247 (defun shr-fontize-cont (cont &rest types) | 248 (defun shr-fontize-cont (cont &rest types) |
248 (let (shr-start) | 249 (let (shr-start) |
249 (shr-generic cont) | 250 (shr-generic cont) |
250 (dolist (type types) | 251 (dolist (type types) |
330 | 331 |
331 ;;; Tag-specific rendering rules. | 332 ;;; Tag-specific rendering rules. |
332 | 333 |
333 (defun shr-tag-p (cont) | 334 (defun shr-tag-p (cont) |
334 (shr-ensure-paragraph) | 335 (shr-ensure-paragraph) |
336 (shr-indent) | |
335 (shr-generic cont) | 337 (shr-generic cont) |
336 (shr-ensure-paragraph)) | 338 (shr-ensure-paragraph)) |
337 | 339 |
338 (defun shr-tag-b (cont) | 340 (defun shr-tag-b (cont) |
339 (shr-fontize-cont cont 'bold)) | 341 (shr-fontize-cont cont 'bold)) |
402 (setq shr-state 'image)))) | 404 (setq shr-state 'image)))) |
403 | 405 |
404 (defun shr-tag-pre (cont) | 406 (defun shr-tag-pre (cont) |
405 (let ((shr-folding-mode 'none)) | 407 (let ((shr-folding-mode 'none)) |
406 (shr-ensure-newline) | 408 (shr-ensure-newline) |
409 (shr-indent) | |
407 (shr-generic cont) | 410 (shr-generic cont) |
408 (shr-ensure-newline))) | 411 (shr-ensure-newline))) |
409 | 412 |
410 (defun shr-tag-blockquote (cont) | 413 (defun shr-tag-blockquote (cont) |
411 (shr-ensure-paragraph) | 414 (shr-ensure-paragraph) |
415 (shr-indent) | |
412 (let ((shr-indentation (+ shr-indentation 4))) | 416 (let ((shr-indentation (+ shr-indentation 4))) |
413 (shr-generic cont)) | 417 (shr-generic cont)) |
414 (shr-ensure-paragraph)) | 418 (shr-ensure-paragraph)) |
415 | 419 |
416 (defun shr-tag-ul (cont) | 420 (defun shr-tag-ul (cont) |
424 (let ((shr-list-mode 1)) | 428 (let ((shr-list-mode 1)) |
425 (shr-generic cont)) | 429 (shr-generic cont)) |
426 (shr-ensure-paragraph)) | 430 (shr-ensure-paragraph)) |
427 | 431 |
428 (defun shr-tag-li (cont) | 432 (defun shr-tag-li (cont) |
429 (shr-ensure-newline) | 433 (shr-ensure-paragraph) |
434 (shr-indent) | |
430 (let* ((bullet | 435 (let* ((bullet |
431 (if (numberp shr-list-mode) | 436 (if (numberp shr-list-mode) |
432 (prog1 | 437 (prog1 |
433 (format "%d " shr-list-mode) | 438 (format "%d " shr-list-mode) |
434 (setq shr-list-mode (1+ shr-list-mode))) | 439 (setq shr-list-mode (1+ shr-list-mode))) |
437 (insert bullet) | 442 (insert bullet) |
438 (shr-generic cont))) | 443 (shr-generic cont))) |
439 | 444 |
440 (defun shr-tag-br (cont) | 445 (defun shr-tag-br (cont) |
441 (unless (bobp) | 446 (unless (bobp) |
442 (insert "\n")) | 447 (insert "\n") |
448 (shr-indent)) | |
443 (shr-generic cont)) | 449 (shr-generic cont)) |
444 | 450 |
445 (defun shr-tag-h1 (cont) | 451 (defun shr-tag-h1 (cont) |
446 (shr-heading cont 'bold 'underline)) | 452 (shr-heading cont 'bold 'underline)) |
447 | 453 |