summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2010-10-29 07:22:52 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-10-29 07:22:52 +0000
commit95de0327d08519791252386914c514db860d7588 (patch)
tree7e60bb38dbd72da62a444deefba48688f3db507c /lisp/gnus
parent9efcd22463b5414f1fe20314e371b4ad52dfcbe1 (diff)
downloademacs-95de0327d08519791252386914c514db860d7588.tar.gz
gnus-art.el (gnus-article-goto-part): Fix last change.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/gnus-art.el63
1 files changed, 33 insertions, 30 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 235aa87bd6a..6d777937584 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5563,36 +5563,39 @@ all parts."
"Go to MIME part N."
(when gnus-break-pages
(widen))
- (let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
- part handle end next handles)
- (when start
- (goto-char start)
- (unless (setq handle (get-text-property start 'gnus-data))
- ;; Go to the displayed subpart, assuming this is multipart/alternative.
- (setq part start
- end (point-at-eol))
- (while (and (not handle)
- part
- (< part end)
- (setq next (text-property-not-all part end
- 'gnus-data nil)))
- (setq part next
- handle (get-text-property part 'gnus-data))
- (push (cons handle part) handles)
- (unless (mm-handle-displayed-p handle)
- (setq handle nil
- part (text-property-any part end 'gnus-data nil))))
- (unless handle
- ;; No subpart is displayed, so we find preferred one.
- (setq part
- (cdr (assq (mm-preferred-alternative
- (nreverse (mapcar 'car handles)))
- handles)))))
- (when gnus-break-pages
- (gnus-narrow-to-page))
- (if part
- (goto-char (1+ part))
- start))))
+ (prog1
+ (let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
+ part handle end next handles)
+ (when start
+ (goto-char start)
+ (if (setq handle (get-text-property start 'gnus-data))
+ start
+ ;; Go to the displayed subpart, assuming this is
+ ;; multipart/alternative.
+ (setq part start
+ end (point-at-eol))
+ (while (and (not handle)
+ part
+ (< part end)
+ (setq next (text-property-not-all part end
+ 'gnus-data nil)))
+ (setq part next
+ handle (get-text-property part 'gnus-data))
+ (push (cons handle part) handles)
+ (unless (mm-handle-displayed-p handle)
+ (setq handle nil
+ part (text-property-any part end 'gnus-data nil))))
+ (unless handle
+ ;; No subpart is displayed, so we find preferred one.
+ (setq part
+ (cdr (assq (mm-preferred-alternative
+ (nreverse (mapcar 'car handles)))
+ handles))))
+ (if part
+ (goto-char (1+ part))
+ start))))
+ (when gnus-break-pages
+ (gnus-narrow-to-page))))
(defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed)
(let ((gnus-tmp-name