comparison lisp/gnus/gnus-art.el @ 111225:558e2acd682c

gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 29 Oct 2010 07:13:33 +0000
parents b01067bf2ec9
children 5fcc7b3a72d5
comparison
equal deleted inserted replaced
111224:b9e560ce3ab6 111225:558e2acd682c
5559 handle id (list (mm-handle-displayed-p handle))) 5559 handle id (list (mm-handle-displayed-p handle)))
5560 (goto-char point)))) 5560 (goto-char point))))
5561 5561
5562 (defun gnus-article-goto-part (n) 5562 (defun gnus-article-goto-part (n)
5563 "Go to MIME part N." 5563 "Go to MIME part N."
5564 (when gnus-break-pages
5565 (widen))
5564 (let ((start (text-property-any (point-min) (point-max) 'gnus-part n)) 5566 (let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
5565 part handle end next handles) 5567 part handle end next handles)
5566 (when start 5568 (when start
5567 (goto-char start) 5569 (goto-char start)
5568 (if (setq handle (get-text-property start 'gnus-data)) 5570 (unless (setq handle (get-text-property start 'gnus-data))
5569 start
5570 ;; Go to the displayed subpart, assuming this is multipart/alternative. 5571 ;; Go to the displayed subpart, assuming this is multipart/alternative.
5571 (setq part start 5572 (setq part start
5572 end (point-at-eol)) 5573 end (point-at-eol))
5573 (while (and (not handle) 5574 (while (and (not handle)
5574 part 5575 part
5584 (unless handle 5585 (unless handle
5585 ;; No subpart is displayed, so we find preferred one. 5586 ;; No subpart is displayed, so we find preferred one.
5586 (setq part 5587 (setq part
5587 (cdr (assq (mm-preferred-alternative 5588 (cdr (assq (mm-preferred-alternative
5588 (nreverse (mapcar 'car handles))) 5589 (nreverse (mapcar 'car handles)))
5589 handles)))) 5590 handles)))))
5590 (if part 5591 (when gnus-break-pages
5591 (goto-char (1+ part)) 5592 (gnus-narrow-to-page))
5592 start))))) 5593 (if part
5594 (goto-char (1+ part))
5595 start))))
5593 5596
5594 (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) 5597 (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed)
5595 (let ((gnus-tmp-name 5598 (let ((gnus-tmp-name
5596 (or (mail-content-type-get (mm-handle-type handle) 'name) 5599 (or (mail-content-type-get (mm-handle-type handle) 'name)
5597 (mail-content-type-get (mm-handle-disposition handle) 'filename) 5600 (mail-content-type-get (mm-handle-disposition handle) 'filename)