Mercurial > emacs
comparison lisp/gnus/uudecode.el @ 75555:d276dce1561f
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 197-199)
- Merge from emacs--devo--0
- Update from CVS
2007-01-28 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
* lisp/gnus/nnslashdot.el (nnslashdot-request-article): Update end-of-article
regexp.
2007-01-24 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/uudecode.el (uudecode-string-to-multibyte): New function emulating
string-to-multibyte.
(uudecode-decode-region-internal): Use it.
2007-01-28 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
* man/gnus.texi (Batching Agents): Fix example. Reported by Tassilo Horn
<tassilo@member.fsf.org>.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-621
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 30 Jan 2007 22:18:03 +0000 |
parents | e3694f1cb928 |
children | 24202b793a08 f83d17e1ace6 |
comparison
equal
deleted
inserted
replaced
75554:26b46f8828ba | 75555:d276dce1561f |
---|---|
125 (delete-region start end) | 125 (delete-region start end) |
126 (let (format-alist) | 126 (let (format-alist) |
127 (insert-file-contents-literally tempfile))) | 127 (insert-file-contents-literally tempfile))) |
128 (message "Can not uudecode"))) | 128 (message "Can not uudecode"))) |
129 (ignore-errors (or file-name (delete-file tempfile)))))) | 129 (ignore-errors (or file-name (delete-file tempfile)))))) |
130 | |
131 (eval-and-compile | |
132 (defalias 'uudecode-string-to-multibyte | |
133 (cond | |
134 ((featurep 'xemacs) | |
135 'identity) | |
136 ((fboundp 'string-to-multibyte) | |
137 'string-to-multibyte) | |
138 (t | |
139 (lambda (string) | |
140 "Return a multibyte string with the same individual chars as string." | |
141 (mapconcat | |
142 (lambda (ch) (string-as-multibyte (char-to-string ch))) | |
143 string "")))))) | |
130 | 144 |
131 ;;;###autoload | 145 ;;;###autoload |
132 (defun uudecode-decode-region-internal (start end &optional file-name) | 146 (defun uudecode-decode-region-internal (start end &optional file-name) |
133 "Uudecode region between START and END without using an external program. | 147 "Uudecode region between START and END without using an external program. |
134 If FILE-NAME is non-nil, save the result to FILE-NAME." | 148 If FILE-NAME is non-nil, save the result to FILE-NAME." |
204 (with-temp-file file-name | 218 (with-temp-file file-name |
205 (insert (apply 'concat (nreverse result))))) | 219 (insert (apply 'concat (nreverse result))))) |
206 (or (markerp end) (setq end (set-marker (make-marker) end))) | 220 (or (markerp end) (setq end (set-marker (make-marker) end))) |
207 (goto-char start) | 221 (goto-char start) |
208 (if enable-multibyte-characters | 222 (if enable-multibyte-characters |
209 (mapc #'(lambda (x) (insert (string-to-multibyte x))) | 223 (mapc #'(lambda (x) (insert (uudecode-string-to-multibyte x))) |
210 (nreverse result)) | 224 (nreverse result)) |
211 (insert (apply 'concat (nreverse result)))) | 225 (insert (apply 'concat (nreverse result)))) |
212 (delete-region (point) end)))))) | 226 (delete-region (point) end)))))) |
213 | 227 |
214 ;;;###autoload | 228 ;;;###autoload |