]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid compiler warnings.
authorDave Love <fx@gnu.org>
Wed, 8 Nov 2000 15:27:30 +0000 (15:27 +0000)
committerDave Love <fx@gnu.org>
Wed, 8 Nov 2000 15:27:30 +0000 (15:27 +0000)
Use (featurep 'xemacs).  Require cl when compiling.
(uudecode-char-int): New alias, replacing char-int.
(uudecode-decode-region): Don't call buffer-disable-undo.

lisp/gnus/uudecode.el

index 8f82ef83cba7ad1f3846f471c8576333554c7714..36640d5d13ccef241b0b32b00a5555adc775cacb 100644 (file)
 
 (eval-when-compile (require 'cl))
 
-(defalias 'uudecode-char-int
-  (if (fboundp 'char-int)
-      'char-int
-    'identity))
+(eval-and-compile
+  (defalias 'uudecode-char-int
+    (if (fboundp 'char-int)
+       'char-int
+      'identity))
+
+  (if (fboundp 'insert-char)
+      (defalias 'uudecode-insert-char 'insert-char)
+    (defun uudecode-insert-char (char &optional count ignored buffer)
+      (if (or (null buffer) (eq buffer (current-buffer)))
+         (insert-char char count)
+       (with-current-buffer buffer
+         (insert-char char count))))))
 
 (defcustom uudecode-decoder-program "uudecode"
   "*Non-nil value should be a string that names a uu decoder.
@@ -121,14 +130,6 @@ If FILE-NAME is non-nil, save the result to FILE-NAME."
       (and work-buffer (kill-buffer work-buffer))
       (ignore-errors (or file-name (delete-file tempfile))))))
 
-(if (featurep 'xemacs)
-    (defalias 'uudecode-insert-char 'insert-char)
-  (defun uudecode-insert-char (char &optional count ignored buffer)
-    (if (or (null buffer) (eq buffer (current-buffer)))
-       (insert-char char count)
-      (with-current-buffer buffer
-       (insert-char char count)))))
-
 ;;;###autoload
 
 (defun uudecode-decode-region (start end &optional file-name)