From 0ffb553dace919b4ef71f0f092e620c515a21144 Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 13 Mar 1998 17:36:04 +0000 Subject: [PATCH] Rename `mime-raw-rcnum-to-cinfo' -> `mime-raw-reversed-entity-number-to-entity-info'. --- mime-pgp.el | 10 +++++----- mime-view.el | 51 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/mime-pgp.el b/mime-pgp.el index 0be4d5e..d1e2446 100644 --- a/mime-pgp.el +++ b/mime-pgp.el @@ -119,8 +119,8 @@ (defun mime-method-to-verify-multipart/signed (beg end cal) "Internal method to check multipart/signed." (let* ((rcnum (reverse (mime-raw-point-to-entity-number beg))) - (oinfo (mime-raw-rcnum-to-cinfo (cons '1 rcnum) - mime-raw-message-info)) + (oinfo (mime-raw-reversed-entity-number-to-entity-info + (cons 1 rcnum) mime-raw-message-info)) ) (mime-playback-entity oinfo (cdr (assq 'mode cal))) )) @@ -183,7 +183,7 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (1- knum) (1+ knum))) (raw-buf (current-buffer)) - (oinfo (mime-raw-rcnum-to-cinfo (cons onum rmcnum) + (oinfo (mime-raw-reversed-entity-number-to-entity-info (cons onum rmcnum) mime-raw-message-info)) kbuf (basename (expand-file-name "tm" mime-temp-directory)) @@ -268,8 +268,8 @@ It should be ISO 639 2 letter language code such as en, ja, ...") (onum (if (> knum 0) (1- knum) (1+ knum))) - (oinfo (mime-raw-rcnum-to-cinfo (cons onum rmcnum) - mime-raw-message-info)) + (oinfo (mime-raw-reversed-entity-number-to-entity-info + (cons onum rmcnum) mime-raw-message-info)) (obeg (mime-entity-info-point-min oinfo)) (oend (mime-entity-info-point-max oinfo)) ) diff --git a/mime-view.el b/mime-view.el index f28e23d..0148d9f 100644 --- a/mime-view.el +++ b/mime-view.el @@ -218,7 +218,8 @@ Please redefine this function if you want to change default setting." (or (eq media-subtype 'x-selection) (and (eq media-subtype 'octet-stream) (let ((entity-info - (mime-raw-rcnum-to-cinfo (cdr rcnum) cinfo))) + (mime-raw-reversed-entity-number-to-entity-info + (cdr rcnum) cinfo))) (and (eq (mime-entity-info-media-type entity-info) 'multipart) (eq (mime-entity-info-media-subtype entity-info) @@ -601,9 +602,12 @@ If optional argument MESSAGE-INFO is not specified, ))) t)))) -(defsubst mime-raw-rcnum-to-cinfo (rnum &optional cinfo) - (mime-raw-entity-number-to-entity-info (reverse rnum) cinfo) - ) +(defsubst mime-raw-reversed-entity-number-to-entity-info + (entity-number &optional message-info) + "Return entity-info from REVERSED-ENTITY-NUMBER in mime-raw-buffer. +If optional argument MESSAGE-INFO is not specified, +`mime-raw-message-info' is used." + (mime-raw-entity-number-to-entity-info (reverse entity-number) message-info)) (defun mime-raw-entity-number-to-entity-info (entity-number &optional message-info) @@ -644,7 +648,8 @@ If optional argument MESSAGE-INFO is not specified, "Return non-nil if header of current entity is visible." (or (null rcnum) (member (mime-entity-info-type/subtype - (mime-raw-rcnum-to-cinfo (cdr rcnum) cinfo)) + (mime-raw-reversed-entity-number-to-entity-info + (cdr rcnum) cinfo)) mime-view-childrens-header-showing-Content-Type-list) )) @@ -657,7 +662,9 @@ If optional argument MESSAGE-INFO is not specified, (and (member ctype mime-view-visible-media-type-list) (if (and (eq media-type 'application) (eq media-subtype 'octet-stream)) - (let ((ccinfo (mime-raw-rcnum-to-cinfo rcnum cinfo))) + (let ((ccinfo + (mime-raw-reversed-entity-number-to-entity-info + rcnum cinfo))) (member (mime-entity-info-encoding ccinfo) '(nil "7bit" "8bit")) ) @@ -964,19 +971,23 @@ It calls following-method selected from variable (goto-char (point-min)) (let ((rcnum (mime-entity-info-rnum cinfo)) ci str) (while (progn - (setq str - (save-excursion - (set-buffer a-buf) - (setq ci (mime-raw-rcnum-to-cinfo rcnum)) - (save-restriction - (narrow-to-region - (mime-entity-info-point-min ci) - (mime-entity-info-point-max ci) - ) - (std11-header-string-except - (concat "^" - (apply (function regexp-or) fields) - ":") "")))) + (setq + str + (save-excursion + (set-buffer a-buf) + (setq + ci + (mime-raw-reversed-entity-number-to-entity-info + rcnum)) + (save-restriction + (narrow-to-region + (mime-entity-info-point-min ci) + (mime-entity-info-point-max ci) + ) + (std11-header-string-except + (concat "^" + (apply (function regexp-or) fields) + ":") "")))) (if (and (eq (mime-entity-info-media-type ci) 'message) (eq (mime-entity-info-media-subtype ci) 'rfc822)) @@ -1042,7 +1053,7 @@ If there is no upper entity, call function `mime-preview-quit'." (while (null (setq cinfo (get-text-property (point) 'mime-view-cinfo))) (backward-char) ) - (let ((r (mime-raw-rcnum-to-cinfo + (let ((r (mime-raw-reversed-entity-number-to-entity-info (cdr (mime-entity-info-rnum cinfo)) (get-text-property 1 'mime-view-cinfo))) point) -- 1.7.10.4