From 473037fb866e99e3a805703da9f9aed09d483a84 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 20 Dec 2004 12:44:11 +0000 Subject: [PATCH] * dgnushack.el (dgnushack-dont-compile-files): Exclude mm-url.el. * mm-url.el: Require nnheader instead of mm-util. * nnheader.el (mm-char-or-char-int-p): New function. --- ChangeLog | 8 +++++++ lisp/dgnushack.el | 4 ++-- lisp/mm-url.el | 2 +- lisp/nnheader.el | 60 +++++++++++++++++++++++++++++------------------------ 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23b5839..35e4421 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-12-20 Katsumi Yamaoka + + * lisp/dgnushack.el (dgnushack-dont-compile-files): Exclude mm-url.el. + + * lisp/mm-url.el: Require nnheader instead of mm-util. + + * lisp/nnheader.el (mm-char-or-char-int-p): New function. + 2004-12-06 Reiner Steib * GNUS-NEWS: Generated. diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index bd04d08..6d82064 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -449,8 +449,8 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (defconst dgnushack-dont-compile-files '("gnus-load.el" "mm-bodies.el" "mm-decode.el" "mm-encode.el" "mm-extern.el" - "mm-partial.el" "mm-url.el" "mm-uu.el" "mm-view.el" "mml-sec.el" - "mml-smime.el" "mml.el" "mml1991.el" "mml2015.el") + "mm-partial.el" "mm-uu.el" "mm-view.el" "mml-sec.el" "mml-smime.el" + "mml.el" "mml1991.el" "mml2015.el") "Files which should not be byte-compiled.") (defun dgnushack-compile-verbosely () diff --git a/lisp/mm-url.el b/lisp/mm-url.el index c5b5256..b261077 100644 --- a/lisp/mm-url.el +++ b/lisp/mm-url.el @@ -31,7 +31,7 @@ (eval-when-compile (require 'cl)) -(require 'mm-util) +(require 'nnheader) ;; for `mm-char-or-char-int-p'. (require 'gnus) (eval-and-compile diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 94f4ca8..4528d1d 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -189,10 +189,10 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") ;; Should keep track of `mm-with-unibyte-buffer' in mm-util.el. (defmacro nnheader-with-unibyte-buffer (&rest forms) - "Create a temporary buffer, and evaluate FORMS there like `progn'. + "Create a temporary buffer, and evaluate FORMS there like `progn'. Use unibyte mode for this." - `(let (default-enable-multibyte-characters) - (with-temp-buffer ,@forms))) + `(let (default-enable-multibyte-characters) + (with-temp-buffer ,@forms))) (put 'nnheader-with-unibyte-buffer 'lisp-indent-function 0) (put 'nnheader-with-unibyte-buffer 'edebug-form-spec '(body)) (put 'mm-with-unibyte-buffer 'lisp-indent-function 0) @@ -239,29 +239,29 @@ nil, ." ;; Should keep track of `mm-guess-mime-charset' in mm-util.el. (defun nnheader-guess-mime-charset () - "Guess the default MIME charset from the language environment." - (let ((language-info - (and (boundp 'current-language-environment) - (assoc current-language-environment - language-info-alist))) - item) - (cond - ((null language-info) - 'iso-8859-1) - ((setq item - (cadr - (or (assq 'coding-priority language-info) - (assq 'coding-system language-info)))) - (if (fboundp 'coding-system-get) - (or (coding-system-get item 'mime-charset) - item) - item)) - ((setq item (car (last (assq 'charset language-info)))) - (if (eq item 'ascii) - 'iso-8859-1 - (charsets-to-mime-charset (list item)))) - (t - 'iso-8859-1)))) + "Guess the default MIME charset from the language environment." + (let ((language-info + (and (boundp 'current-language-environment) + (assoc current-language-environment + language-info-alist))) + item) + (cond + ((null language-info) + 'iso-8859-1) + ((setq item + (cadr + (or (assq 'coding-priority language-info) + (assq 'coding-system language-info)))) + (if (fboundp 'coding-system-get) + (or (coding-system-get item 'mime-charset) + item) + item)) + ((setq item (car (last (assq 'charset language-info)))) + (if (eq item 'ascii) + 'iso-8859-1 + (charsets-to-mime-charset (list item)))) + (t + 'iso-8859-1)))) (defalias 'mm-guess-mime-charset 'nnheader-guess-mime-charset) (defalias 'mm-char-int 'char-int) @@ -311,7 +311,13 @@ nil, ." (defalias 'mm-string-make-unibyte (if (fboundp 'string-make-unibyte) 'string-make-unibyte - 'identity))) + 'identity)) + + (defalias 'mm-char-or-char-int-p + (cond + ((fboundp 'char-or-char-int-p) 'char-or-char-int-p) + ((fboundp 'char-valid-p) 'char-valid-p) + (t 'identity)))) ;; mail-parse stuff. (unless (featurep 'mail-parse) -- 1.7.10.4