Mercurial > emacs
comparison lisp/gnus/mm-util.el @ 74214:7cf0e45e7c70
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 168)
- Update from CVS
2006-11-21 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/mm-util.el (mm-string-to-multibyte): Alias to identity in XEmacs.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-527
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 27 Nov 2006 00:37:36 +0000 |
parents | b8d97ed52a0a |
children | e3694f1cb928 f1d13e615070 |
comparison
equal
deleted
inserted
replaced
74213:085dfebf66c5 | 74214:7cf0e45e7c70 |
---|---|
90 ;; Here is an approximate equivalence table to help think about it: | 90 ;; Here is an approximate equivalence table to help think about it: |
91 ;; (string-as-multibyte s) ~= (decode-coding-string s 'emacs-mule) | 91 ;; (string-as-multibyte s) ~= (decode-coding-string s 'emacs-mule) |
92 ;; (string-to-multibyte s) ~= (decode-coding-string s 'binary) | 92 ;; (string-to-multibyte s) ~= (decode-coding-string s 'binary) |
93 ;; (string-make-multibyte s) ~= (decode-coding-string s locale-coding-system) | 93 ;; (string-make-multibyte s) ~= (decode-coding-string s locale-coding-system) |
94 (string-as-multibyte . identity) | 94 (string-as-multibyte . identity) |
95 (string-to-multibyte | |
96 . (lambda (string) | |
97 "Return a multibyte string with the same individual chars as string." | |
98 (mapconcat | |
99 (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) | |
100 string ""))) | |
101 (multibyte-string-p . ignore) | 95 (multibyte-string-p . ignore) |
102 (insert-byte . insert-char) | 96 (insert-byte . insert-char) |
103 (multibyte-char-to-unibyte . identity)))) | 97 (multibyte-char-to-unibyte . identity)))) |
104 | 98 |
105 (eval-and-compile | 99 (eval-and-compile |
125 (while (string-match regexp string start) | 119 (while (string-match regexp string start) |
126 (setq tail (- (length string) (match-end 0))) | 120 (setq tail (- (length string) (match-end 0))) |
127 (setq string (replace-match newtext nil literal string)) | 121 (setq string (replace-match newtext nil literal string)) |
128 (setq start (- (length string) tail)))) | 122 (setq start (- (length string) tail)))) |
129 string)))) | 123 string)))) |
124 | |
125 (defalias 'mm-string-to-multibyte | |
126 (cond | |
127 ((featurep 'xemacs) | |
128 'identity) | |
129 ((fboundp 'string-to-multibyte) | |
130 'string-to-multibyte) | |
131 (t | |
132 (lambda (string) | |
133 "Return a multibyte string with the same individual chars as string." | |
134 (mapconcat | |
135 (lambda (ch) (mm-string-as-multibyte (char-to-string ch))) | |
136 string ""))))) | |
130 | 137 |
131 (eval-and-compile | 138 (eval-and-compile |
132 (defalias 'mm-char-or-char-int-p | 139 (defalias 'mm-char-or-char-int-p |
133 (cond | 140 (cond |
134 ((fboundp 'char-or-char-int-p) 'char-or-char-int-p) | 141 ((fboundp 'char-or-char-int-p) 'char-or-char-int-p) |