Mercurial > emacs
comparison lisp/gnus/gnus-util.el @ 110747:0defef1647a5
Merge changes made in Gnus trunk.
shr.el: Rename the tag functions a bit, and add some new ones.
gnus-sum.el (gnus-summary-select-article-buffer): If the article buffer isn't shown, then select the current article first instead of bugging out.
gnus-sum.el (gnus-summary-select-article-buffer): Show both the article and summary buffers again.
shr.el (shr-tag-blockquote): Convert name.
shr.el (shr-rescale-image): Use the right image-size variant.
shr.el (shr-tag-p): Don't insert newlines at the start of the buffer.
shr.el: Implement indentation in blockquotes.
gnus-sum.el (gnus-summary-select-article-buffer): Really select the article buffer again.
shr.el (shr-ensure-paragraph): Don't insert newlines on empty tags at the beginning of the buffer.
gnus-ems.el, gnus-util.el, mm-decode.el, mm-view.el: Add resize for large images in mm.
gnus-html.el (gnus-html-put-image): Use gnus-rescale-image.
shr.el (shr-tag-p): Don't insert newlines on empty tags at the beginning of the buffer.
gnus-ems.el, gnus-html.el, gnus-util.el, mm-decode.el, mm-view.el: Support image resizing.
shr.el: Add headings.
shr.el (shr-ensure-paragraph): Actually work.
shr.el (shr-tag-li): Make <ul> prettier.
shr.el (shr-insert): Get white space at the beginning/end of elements right.
shr.el (shr-tag-li): Tweak <li> rendering.
shr.el (shr-tag-p): Collapse subsequent <p>s.
shr.el (shr-ensure-paragraph): Don't insert double line feeds after blank lines.
shr.el (shr-tag-h6): Add.
shr.el (shr-insert): \t is also space.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 04 Oct 2010 00:17:16 +0000 |
parents | c560ce068799 |
children | 0fe64d68a522 |
comparison
equal
deleted
inserted
replaced
110746:5c1a707ab452 | 110747:0defef1647a5 |
---|---|
1930 (if (sequencep ,display-table) | 1930 (if (sequencep ,display-table) |
1931 (aref ,display-table ,character) | 1931 (aref ,display-table ,character) |
1932 (get-char-table ,character ,display-table))) | 1932 (get-char-table ,character ,display-table))) |
1933 `(aref ,display-table ,character))) | 1933 `(aref ,display-table ,character))) |
1934 | 1934 |
1935 (defun gnus-rescale-image (image size) | |
1936 "Rescale IMAGE to SIZE if possible. | |
1937 SIZE is in format (WIDTH . HEIGHT). Return a new image. | |
1938 Sizes are in pixels." | |
1939 (if (or (not (fboundp 'imagemagick-types)) | |
1940 (not (get-buffer-window (current-buffer)))) | |
1941 image | |
1942 (let ((new-width (car size)) | |
1943 (new-height (cdr size))) | |
1944 (when (> (cdr (image-size image t)) new-height) | |
1945 (setq image (or (create-image (plist-get (cdr image) :data) 'imagemagick t | |
1946 :height new-height) | |
1947 image))) | |
1948 (when (> (car (image-size image t)) new-width) | |
1949 (setq image (or | |
1950 (create-image (plist-get (cdr image) :data) 'imagemagick t | |
1951 :width new-width) | |
1952 image))) | |
1953 image))) | |
1954 | |
1935 (provide 'gnus-util) | 1955 (provide 'gnus-util) |
1936 | 1956 |
1937 ;;; gnus-util.el ends here | 1957 ;;; gnus-util.el ends here |