From 1e5cdbc8af7363bbf89313aa232bc1bca4a52f13 Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 10 Feb 2000 05:49:31 +0000 Subject: [PATCH] (mime-preview-find-boundary-info): Fix problem when entity is in boundary of mother entity. (mime-preview-follow-current-entity): Check header information of `mime-view-situation' property. --- mime-view.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/mime-view.el b/mime-view.el index 5ea7d34..e33aecc 100644 --- a/mime-view.el +++ b/mime-view.el @@ -1397,7 +1397,7 @@ button-2 Move to point under the mouse cursor (save-excursion (goto-char p-end) (catch 'tag - (let (e) + (let (e i) (while (setq e (next-single-property-change (point) 'mime-view-entity)) @@ -1405,8 +1405,8 @@ button-2 Move to point under the mouse cursor (let ((rc (mime-entity-node-id (get-text-property (1- (point)) 'mime-view-entity)))) - (or (equal entity-node-id - (nthcdr (- (length rc) len) rc)) + (or (and (>= (setq i (- (length rc) len)) 0) + (equal entity-node-id (nthcdr i rc))) (throw 'tag nil))) (setq p-end e))) (setq p-end (point-max)))) @@ -1453,11 +1453,17 @@ It calls following-method selected from variable (setq p-beg (aref entity 0) p-end (aref entity 1) entity (aref entity 2)) - (setq ph-end - (next-single-property-change p-beg 'mime-view-entity-header)) - (if (or (null ph-end) - (> ph-end p-end)) - (setq ph-end p-end)) + (let ((situation (get-text-property (point) 'mime-view-situation))) + (if (eq (cdr (or (assq '*header situation) + (assq 'header situation))) + 'visible) + (progn + (setq ph-end + (next-single-property-change p-beg 'mime-view-entity-header)) + (if (or (null ph-end) + (> ph-end p-end)) + (setq ph-end p-end))) + (setq ph-end p-beg))) (let* ((mode (mime-preview-original-major-mode 'recursive)) (entity-node-id (mime-entity-node-id entity)) (new-name -- 1.7.10.4