From: tmorioka Date: Mon, 24 Feb 1997 09:57:03 +0000 (+0000) Subject: (eword-encode-header): Use function `assoc-if' instead of `ASSOC'; X-Git-Tag: Hokutetsu-Ishikawa-new~302 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a325e96b5d6b5c0b3f1d2a23e3e61f1160d441a;p=elisp%2Fsemi.git (eword-encode-header): Use function `assoc-if' instead of `ASSOC'; require cl instead of tl-list. --- diff --git a/eword-encode.el b/eword-encode.el index d3b796d..004c569 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Revision: 0.7 $ +;; Version: $Revision: 0.8 $ ;; Keywords: encoded-word, MIME, multilingual, header, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -28,14 +28,14 @@ (require 'mel) (require 'std11) (require 'mime-def) -(require 'tl-list) +(require 'cl) ;;; @ version ;;; (defconst eword-encode-RCS-ID - "$Id: eword-encode.el,v 0.7 1997-02-24 02:36:07 tmorioka Exp $") + "$Id: eword-encode.el,v 0.8 1997-02-24 09:57:03 tmorioka Exp $") (defconst eword-encode-version (get-version-string eword-encode-RCS-ID)) @@ -547,14 +547,14 @@ It refer variable `eword-field-encoding-method-alist'." (setq field-name (buffer-substring beg (1- (match-end 0)))) (setq end (std11-field-end)) (and (find-non-ascii-charset-region beg end) - (let ((ret (or (ASSOC (downcase field-name) - eword-field-encoding-method-alist - :test (function - (lambda (str1 str2) - (and (stringp str2) - (string= str1 - (downcase str2)) - )))) + (let ((ret (or (let ((fname (downcase field-name))) + (assoc-if + (function + (lambda (str) + (and (stringp str) + (string= fname (downcase str2)) + ))) + eword-field-encoding-method-alist)) (assq t eword-field-encoding-method-alist) ))) (if ret @@ -588,16 +588,14 @@ It refer variable `eword-field-encoding-method-alist'." (setq str (encode-mime-charset-string str - (or (cdr (ASSOC - "x-nsubject" - eword-field-encoding-method-alist - :test + (or (cdr (assoc-if (function - (lambda (str1 str2) - (and (stringp str2) - (string= str1 + (lambda (str) + (and (stringp str) + (string= "x-nsubject" (downcase str2)) - ))))) + ))) + eword-field-encoding-method-alist)) 'iso-2022-jp-2))) ) (insert (concat "\nX-Nsubject: " str))