Don't infloop when we can't find a good place to break lines in shr
[bpt/emacs.git] / lisp / net / tramp-uu.el
index 318e26f..6cf5bae 100644 (file)
@@ -1,10 +1,10 @@
 ;;; tramp-uu.el --- uuencode in Lisp
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2013 Free Software Foundation, Inc.
 
 ;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
 ;; Keywords: comm, terminals
+;; Package: tramp
 
 ;; This file is part of GNU Emacs.
 
 
 ;;; Code:
 
-(defvar tramp-uu-b64-alphabet
+(defconst tramp-uu-b64-alphabet
   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
   "Mapping from base64-encoded character to the byte it represents.")
 
-(defvar tramp-uu-b64-char-to-byte
+(defconst tramp-uu-b64-char-to-byte
   (let ((i 0))
     (mapcar (lambda (c)
              (prog1
   "Return the byte that is encoded as CHAR."
   (cdr (assq char tramp-uu-b64-char-to-byte)))
 
+;;;###tramp-autoload
 (defun tramp-uuencode-region (beg end)
   "UU-encode the region between BEG and END."
   ;; First we base64 encode the region, then we transmogrify that into
   ;; uu encoding.
   (let ((len (base64-encode-region beg end t))
-       (padding 0)
        i c)
     (save-excursion
       (goto-char beg)
       (goto-char beg)
       (insert "begin 600 xxx\n"))))
 
+(add-hook 'tramp-unload-hook
+         (lambda ()
+           (unload-feature 'tramp-uu 'force)))
+
 (provide 'tramp-uu)
 
-;; arch-tag: 7153f2c6-8be5-4cd2-8c06-0fbcf5190ef6
 ;;; tramp-uu.el ends here
 
 ;; Local Variables: