From: morioka Date: Mon, 17 Mar 1997 14:39:40 +0000 (+0000) Subject: `mime-preview/cut-header' -> `mime-view-cut-header'. X-Git-Tag: Hokutetsu-Ishikawa-new~82 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26351e80ede756912f6a4b8555e0217929f36578;p=elisp%2Fsemi.git `mime-preview/cut-header' -> `mime-view-cut-header'. --- diff --git a/mime-view.el b/mime-view.el index 3608857..1191004 100644 --- a/mime-view.el +++ b/mime-view.el @@ -6,7 +6,7 @@ ;; Created: 1994/7/13 ;; Renamed: 1994/8/31 from tm-body.el ;; Renamed: 1997/02/19 from tm-view.el -;; Version: $Revision: 0.47 $ +;; Version: $Revision: 0.48 $ ;; Keywords: MIME, multimedia, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -40,7 +40,7 @@ ;;; (defconst mime-view-RCS-ID - "$Id: mime-view.el,v 0.47 1997-03-17 13:59:03 morioka Exp $") + "$Id: mime-view.el,v 0.48 1997-03-17 14:39:40 morioka Exp $") (defconst mime-view-version (get-version-string mime-view-RCS-ID)) @@ -290,28 +290,25 @@ Please redefine this function if you want to change default setting." ;;; @@ content header filter ;;; -(defun mime-preview/cut-header () +(defsubst mime-view-cut-header () (goto-char (point-min)) - (while (and - (re-search-forward mime-view-ignored-field-regexp nil t) - (let* ((beg (match-beginning 0)) - (end (match-end 0)) - (name (buffer-substring beg end)) - ) - (if (not (string-match mime-view-visible-field-regexp name)) - (delete-region - beg - (save-excursion - (and - (re-search-forward "^\\([^ \t]\\|$\\)" nil t) - (match-beginning 0) - ))) - ) - t))) - ) + (while (re-search-forward mime-view-ignored-field-regexp nil t) + (let* ((beg (match-beginning 0)) + (end (match-end 0)) + (name (buffer-substring beg end)) + ) + (or (member-if (function + (lambda (regexp) + (string-match regexp name) + )) mime-view-visible-field-list) + (delete-region beg + (if (re-search-forward "^\\([^ \t]\\|$\\)" nil t) + (match-beginning 0) + (point-max))) + )))) (defun mime-view-default-content-header-filter () - (mime-preview/cut-header) + (mime-view-cut-header) (eword-decode-header) )