From: yamaoka Date: Tue, 21 Dec 2004 06:07:50 +0000 (+0000) Subject: (mm-emacs-mule): New variable. X-Git-Tag: t-gnus-6_17_4-quimby-~624 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5dffe59cf8981255f224a3a3e444ba441f81f06;p=elisp%2Fgnus.git- (mm-emacs-mule): New variable. (mm-encode-coding-region): New function. (mm-decode-coding-region): New function. (mm-set-buffer-file-coding-system): New function. (mm-with-multibyte-buffer): New macro. --- diff --git a/ChangeLog b/ChangeLog index 35e4421..2d1a256 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-12-21 Katsumi Yamaoka + + * lisp/nnheader.el (mm-emacs-mule): New variable. + (mm-encode-coding-region): New function. + (mm-decode-coding-region): New function. + (mm-set-buffer-file-coding-system): New function. + (mm-with-multibyte-buffer): New macro. + 2004-12-20 Katsumi Yamaoka * lisp/dgnushack.el (dgnushack-dont-compile-files): Exclude mm-url.el. diff --git a/lisp/nnheader.el b/lisp/nnheader.el index 4528d1d..da99327 100644 --- a/lisp/nnheader.el +++ b/lisp/nnheader.el @@ -147,6 +147,8 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") (autoload 'gnus-buffer-live-p "gnus-util")) ;; mm-util stuff. +(defvar mm-emacs-mule t "True in Emacs with Mule.") + (unless (featurep 'mm-util) ;; Should keep track of `mm-image-load-path' in mm-util.el. (defun nnheader-image-load-path (&optional package) @@ -170,6 +172,9 @@ This variable is a substitute for `mm-text-coding-system-for-write'.") 'ignore)) (defalias 'mm-encode-coding-string 'encode-coding-string) (defalias 'mm-decode-coding-string 'decode-coding-string) + (defalias 'mm-encode-coding-region 'encode-coding-region) + (defalias 'mm-decode-coding-region 'decode-coding-region) + (defalias 'mm-set-buffer-file-coding-system 'set-buffer-file-coding-system) ;; Should keep track of `mm-detect-coding-region' in mm-util.el. (defun nnheader-detect-coding-region (start end) @@ -199,6 +204,18 @@ Use unibyte mode for this." (put 'mm-with-unibyte-buffer 'edebug-form-spec '(body)) (defalias 'mm-with-unibyte-buffer 'nnheader-with-unibyte-buffer) + ;; Should keep track of `mm-with-multibyte-buffer' in mm-util.el. + (defmacro nnheader-with-multibyte-buffer (&rest forms) + "Create a temporary buffer, and evaluate FORMS there like `progn'. +Use multibyte mode for this." + `(let ((default-enable-multibyte-characters t)) + (with-temp-buffer ,@forms))) + (put 'nnheader-with-multibyte-buffer 'lisp-indent-function 0) + (put 'nnheader-with-multibyte-buffer 'edebug-form-spec '(body)) + (put 'mm-with-multibyte-buffer 'lisp-indent-function 0) + (put 'mm-with-multibyte-buffer 'edebug-form-spec '(body)) + (defalias 'mm-with-multibyte-buffer 'nnheader-with-multibyte-buffer) + ;; Should keep track of `mm-with-unibyte-current-buffer' in mm-util.el. (defmacro nnheader-with-unibyte-current-buffer (&rest forms) "Evaluate FORMS with current current buffer temporarily made unibyte.