diff options
| author | Dave Love | 2000-11-08 15:27:30 +0000 |
|---|---|---|
| committer | Dave Love | 2000-11-08 15:27:30 +0000 |
| commit | 05c2a83cfd5a696aca4d16170e484b95556b241b (patch) | |
| tree | 86be5dc0befd47606aab6d80d07b832ecc4be19c | |
| parent | 4515227fa50acefa4b6cb4ac037094eb1c7f95ad (diff) | |
| download | emacs-05c2a83cfd5a696aca4d16170e484b95556b241b.tar.gz emacs-05c2a83cfd5a696aca4d16170e484b95556b241b.zip | |
Avoid compiler warnings.
Use (featurep 'xemacs). Require cl when compiling.
(uudecode-char-int): New alias, replacing char-int.
(uudecode-decode-region): Don't call buffer-disable-undo.
| -rw-r--r-- | lisp/gnus/uudecode.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/gnus/uudecode.el b/lisp/gnus/uudecode.el index 8f82ef83cba..36640d5d13c 100644 --- a/lisp/gnus/uudecode.el +++ b/lisp/gnus/uudecode.el | |||
| @@ -36,10 +36,19 @@ | |||
| 36 | 36 | ||
| 37 | (eval-when-compile (require 'cl)) | 37 | (eval-when-compile (require 'cl)) |
| 38 | 38 | ||
| 39 | (defalias 'uudecode-char-int | 39 | (eval-and-compile |
| 40 | (if (fboundp 'char-int) | 40 | (defalias 'uudecode-char-int |
| 41 | 'char-int | 41 | (if (fboundp 'char-int) |
| 42 | 'identity)) | 42 | 'char-int |
| 43 | 'identity)) | ||
| 44 | |||
| 45 | (if (fboundp 'insert-char) | ||
| 46 | (defalias 'uudecode-insert-char 'insert-char) | ||
| 47 | (defun uudecode-insert-char (char &optional count ignored buffer) | ||
| 48 | (if (or (null buffer) (eq buffer (current-buffer))) | ||
| 49 | (insert-char char count) | ||
| 50 | (with-current-buffer buffer | ||
| 51 | (insert-char char count)))))) | ||
| 43 | 52 | ||
| 44 | (defcustom uudecode-decoder-program "uudecode" | 53 | (defcustom uudecode-decoder-program "uudecode" |
| 45 | "*Non-nil value should be a string that names a uu decoder. | 54 | "*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." | |||
| 121 | (and work-buffer (kill-buffer work-buffer)) | 130 | (and work-buffer (kill-buffer work-buffer)) |
| 122 | (ignore-errors (or file-name (delete-file tempfile)))))) | 131 | (ignore-errors (or file-name (delete-file tempfile)))))) |
| 123 | 132 | ||
| 124 | (if (featurep 'xemacs) | ||
| 125 | (defalias 'uudecode-insert-char 'insert-char) | ||
| 126 | (defun uudecode-insert-char (char &optional count ignored buffer) | ||
| 127 | (if (or (null buffer) (eq buffer (current-buffer))) | ||
| 128 | (insert-char char count) | ||
| 129 | (with-current-buffer buffer | ||
| 130 | (insert-char char count))))) | ||
| 131 | |||
| 132 | ;;;###autoload | 133 | ;;;###autoload |
| 133 | 134 | ||
| 134 | (defun uudecode-decode-region (start end &optional file-name) | 135 | (defun uudecode-decode-region (start end &optional file-name) |