From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25523 Path: main.gmane.org!not-for-mail From: Didier Verna Newsgroups: gmane.emacs.gnus.general Subject: [COMMIT] Fix for the enable-multibyte-characters problem Date: 29 Sep 1999 11:44:28 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035162892 14389 80.91.224.250 (21 Oct 2002 01:14:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:14:52 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id GAA28133 for ; Wed, 29 Sep 1999 06:35:18 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id FAB10468; Wed, 29 Sep 1999 05:34:31 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 29 Sep 1999 05:34:50 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id FAA19064 for ; Wed, 29 Sep 1999 05:34:19 -0500 (CDT) Original-Received: from infres.enst.fr (infres.enst.fr [137.194.160.3]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id FAA27989 for ; Wed, 29 Sep 1999 05:44:36 -0400 (EDT) Original-Received: from metheny.enst.fr (metheny.enst.fr [137.194.204.4]) by infres.enst.fr (Postfix) with ESMTP id C524845410 for ; Wed, 29 Sep 1999 11:44:30 +0200 (MET DST) Original-Received: (from verna@localhost) by metheny.enst.fr (8.8.8/8.8.8) id LAA05619; Wed, 29 Sep 1999 11:44:29 +0200 (MET DST) Original-To: ding@gnus.org X-Attribution: dv X-Url: http://www.infres.enst.fr/~verna X-Web: http://www.infres.enst.fr/~verna X-Home-Page: http://www.infres.enst.fr/~verna X-Face: |j}\)O|k##MrRz#VK$Jy=0r=3Qc,,a/Tr6*JQbE73dy17]2YcmW$9Z&H21e}#~#pgc>dn(is5Bv1l!{1re+Q9suKIOUmOqZs2>QMxHlR;;}kaGYA@HR3D C6 X-Face: 6o|eiKqaHN.ANh8HXDzntcWUOCg\]RsOd.ctvm~*y}Y^R&*a+Co,\s#=HWsw3x$b_n2kJ#g (7u?J^@^xP)f,jUF|0Z'J:|G/bMA5O12*b,7`-Q`=pKsCRIpso07.Y>YB2H{7`?u&yh;C_ZtLHfj * binhex.el (binhex-decode-region): don't consider the value of `enable-multibyte-characters' in XEmacs. * gnus-start.el (gnus-read-descriptions-file): ditto. * mm-util.el (mm-multibyte-p): ditto. (mm-with-unibyte-buffer): ditto. (mm-find-charset-region): use `mm-multibyte-p'. * mm-bodies.el (mm-decode-body): ditto. (mm-decode-string): ditto. * lpath.el ((string-match "XEmacs" emacs-version)): Don't define `enable-multibyte-characters' in XEmacs. Index: lisp/binhex.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/binhex.el,v retrieving revision 5.6 diff -u -u -r5.6 binhex.el --- lisp/binhex.el 1999/02/01 21:18:18 5.6 +++ lisp/binhex.el 1999/09/29 09:25:57 @@ -199,12 +199,12 @@ (save-excursion (goto-char start) (when (re-search-forward binhex-begin-line end t) - (if (boundp 'enable-multibyte-characters) + (if (and (not (string-match "XEmacs\\|Lucid" emacs-version)) + (boundp 'enable-multibyte-characters)) (let ((multibyte (default-value 'enable-multibyte-characters))) (setq-default enable-multibyte-characters nil) - (setq work-buffer - (generate-new-buffer " *binhex-work*")) + (setq work-buffer (generate-new-buffer " *binhex-work*")) (setq-default enable-multibyte-characters multibyte)) (setq work-buffer (generate-new-buffer " *binhex-work*"))) (buffer-disable-undo work-buffer) Index: lisp/gnus-start.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-start.el,v retrieving revision 5.28 diff -u -u -r5.28 gnus-start.el --- lisp/gnus-start.el 1999/08/27 13:18:10 5.28 +++ lisp/gnus-start.el 1999/09/29 09:25:58 @@ -2547,8 +2547,9 @@ (let ((str (buffer-substring (point) (progn (end-of-line) (point)))) (coding - (and (boundp 'enable-multibyte-characters) - enable-multibyte-characters + (and (or gnus-xemacs + (and (boundp 'enable-multibyte-characters) + enable-multibyte-characters)) (fboundp 'gnus-mule-get-coding-system) (gnus-mule-get-coding-system (symbol-name group))))) (when coding Index: lisp/lpath.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/lpath.el,v retrieving revision 5.25 diff -u -u -r5.25 lpath.el --- lisp/lpath.el 1999/09/27 15:19:01 5.25 +++ lisp/lpath.el 1999/09/29 09:25:59 @@ -48,7 +48,7 @@ font-lock-defaults user-full-name user-login-name gnus-newsgroup-name gnus-article-x-face-too-ugly gnus-newsgroup-charset gnus-newsgroup-emphasis-alist - mail-mode-hook enable-multibyte-characters + mail-mode-hook adaptive-fill-first-line-regexp adaptive-fill-regexp url-current-mime-headers buffer-file-coding-system w3-image-mappings url-current-mime-type Index: lisp/mm-bodies.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mm-bodies.el,v retrieving revision 5.38 diff -u -u -r5.38 mm-bodies.el --- lisp/mm-bodies.el 1999/08/27 13:18:16 5.38 +++ lisp/mm-bodies.el 1999/09/29 09:25:59 @@ -209,7 +209,7 @@ ;; buffer-file-coding-system ;;Article buffer is nil coding system ;;in XEmacs - enable-multibyte-characters + (mm-multibyte-p) (or (not (eq mule-charset 'ascii)) (setq mule-charset mail-parse-charset))) (mm-decode-coding-region (point-min) (point-max) mule-charset)))))) @@ -225,7 +225,7 @@ (let (mule-charset) (when (and charset (setq mule-charset (mm-charset-to-coding-system charset)) - enable-multibyte-characters + (mm-multibyte-p) (or (not (eq mule-charset 'ascii)) (setq mule-charset mail-parse-charset))) (mm-decode-coding-string string mule-charset)))) Index: lisp/mm-util.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/mm-util.el,v retrieving revision 5.47 diff -u -u -r5.47 mm-util.el --- lisp/mm-util.el 1999/09/27 15:19:03 5.47 +++ lisp/mm-util.el 1999/09/29 09:25:59 @@ -235,15 +235,17 @@ (defsubst mm-multibyte-p () "Say whether multibyte is enabled." - (and (boundp 'enable-multibyte-characters) - enable-multibyte-characters)) + (or (string-match "XEmacs\\|Lucid" emacs-version) + (and (boundp 'enable-multibyte-characters) + enable-multibyte-characters))) (defmacro mm-with-unibyte-buffer (&rest forms) "Create a temporary buffer, and evaluate FORMS there like `progn'. See also `with-temp-file' and `with-output-to-string'." (let ((temp-buffer (make-symbol "temp-buffer")) (multibyte (make-symbol "multibyte"))) - `(if (not (boundp 'enable-multibyte-characters)) + `(if (or (string-match "XEmacs\\|Lucid" emacs-version) + (not (boundp 'enable-multibyte-characters))) (with-temp-buffer ,@forms) (let ((,multibyte (default-value 'enable-multibyte-characters)) ,temp-buffer) @@ -267,8 +269,7 @@ (defun mm-find-charset-region (b e) "Return a list of charsets in the region." (cond - ((and (boundp 'enable-multibyte-characters) - enable-multibyte-characters + ((and (mm-multibyte-p) (fboundp 'find-charset-region)) (find-charset-region b e)) ((not (boundp 'current-language-environment)) -- / / _ _ Didier Verna http://www.inf.enst.fr/~verna/ - / / - / / /_/ / ENST, INFRES C201.1 mailto:verna@inf.enst.fr /_/ / /_/ / /__ / 46 rue Barrault Tel. +33 (1) 45 81 73 46 75013 Paris, France Fax. +33 (1) 45 81 31 19