[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/gnus/uudecode.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/gnus/uudecode.el,v |
Date: |
Tue, 30 Jan 2007 22:18:04 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/01/30 22:18:03
Index: lisp/gnus/uudecode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/uudecode.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- lisp/gnus/uudecode.el 21 Jan 2007 02:54:13 -0000 1.17
+++ lisp/gnus/uudecode.el 30 Jan 2007 22:18:03 -0000 1.18
@@ -128,6 +128,20 @@
(message "Can not uudecode")))
(ignore-errors (or file-name (delete-file tempfile))))))
+(eval-and-compile
+ (defalias 'uudecode-string-to-multibyte
+ (cond
+ ((featurep 'xemacs)
+ 'identity)
+ ((fboundp 'string-to-multibyte)
+ 'string-to-multibyte)
+ (t
+ (lambda (string)
+ "Return a multibyte string with the same individual chars as string."
+ (mapconcat
+ (lambda (ch) (string-as-multibyte (char-to-string ch)))
+ string ""))))))
+
;;;###autoload
(defun uudecode-decode-region-internal (start end &optional file-name)
"Uudecode region between START and END without using an external program.
@@ -206,7 +220,7 @@
(or (markerp end) (setq end (set-marker (make-marker) end)))
(goto-char start)
(if enable-multibyte-characters
- (mapc #'(lambda (x) (insert (string-to-multibyte x)))
+ (mapc #'(lambda (x) (insert (uudecode-string-to-multibyte x)))
(nreverse result))
(insert (apply 'concat (nreverse result))))
(delete-region (point) end))))))