Mercurial > emacs
comparison lisp/gnus/shr.el @ 111019:615617bd614d
shr.el (shr-tag-img): Don't align images -- since we're not rescaling, this often leads to ugly displays.
gnus-sum.el (gnus-summary-refer-thread): Bug fix. Add the thread headers to gnus-newsgroup-headers.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 17 Oct 2010 00:04:06 +0000 |
parents | e172bc1db402 |
children | 7aa9d9b402c8 |
comparison
equal
deleted
inserted
replaced
111018:de901820e0bc | 111019:615617bd614d |
---|---|
424 (when cont | 424 (when cont |
425 (when (and (> (current-column) 0) | 425 (when (and (> (current-column) 0) |
426 (not (eq shr-state 'image))) | 426 (not (eq shr-state 'image))) |
427 (insert "\n")) | 427 (insert "\n")) |
428 (let ((alt (cdr (assq :alt cont))) | 428 (let ((alt (cdr (assq :alt cont))) |
429 (url (cdr (assq :src cont))) | 429 (url (cdr (assq :src cont)))) |
430 (width (cdr (assq :width cont)))) | |
431 ;; Only respect align if width specified. | |
432 (when width | |
433 ;; Check that width is not larger than max width, otherwise ignore | |
434 ;; align | |
435 (let ((max-width (* shr-width (frame-char-width))) | |
436 (width (string-to-number width))) | |
437 (when (< width max-width) | |
438 (let ((align (cdr (assq :align cont)))) | |
439 (cond | |
440 ((string= align "right") | |
441 (insert (propertize | |
442 " " 'display | |
443 `(space . (:align-to | |
444 ,(list (- max-width width))))))) | |
445 ((string= align "center") | |
446 (insert (propertize | |
447 " " 'display | |
448 `(space . (:balign-to | |
449 ,(list (- (/ max-width 2) width)))))))))))) | |
450 (let ((start (point-marker))) | 430 (let ((start (point-marker))) |
451 (when (zerop (length alt)) | 431 (when (zerop (length alt)) |
452 (setq alt "[img]")) | 432 (setq alt "[img]")) |
453 (cond | 433 (cond |
454 ((and (not shr-inhibit-images) | 434 ((and (not shr-inhibit-images) |