;;; Code:
(require 'emu)
-(require 'mel)
+(require 'mime-def)
;;; @ variables
(defvar uuencode-external-encoder '("uuencode" "-")
"*list of uuencode encoder program name and its arguments.")
-(defvar uuencode-external-decoder
- (list "sh" "-c" (format "(cd %s; uudecode)" mime-temp-directory))
+(defvar uuencode-external-decoder '("sh" "-c" "uudecode")
"*list of uuencode decoder program name and its arguments.")
(if (looking-at ".+$")
(buffer-substring (match-beginning 0)
(match-end 0))
- ))))))
+ )))))
+ (default-directory mime-temp-directory))
(if filename
(as-binary-process
(apply (function call-process-region)
start end (car uuencode-external-decoder)
t nil nil (cdr uuencode-external-decoder))
- (setq filename (expand-file-name filename mime-temp-directory))
(as-binary-input-file (insert-file-contents filename))
;; The previous line causes the buffer to be made read-only, I
;; do not pretend to understand the control flow leading to this
))
)))
-(defalias 'uuencode-encode-region 'uuencode-external-encode-region)
-(defalias 'uuencode-decode-region 'uuencode-external-decode-region)
-
;;; @ uuencode encoder/decoder for file
;;;
-(defun uuencode-insert-encoded-file (filename)
+(defun uuencode-external-insert-encoded-file (filename)
"Insert file encoded by unofficial uuencode format.
This function uses external uuencode encoder which is specified by
variable `uuencode-external-encoder'."
(file-name-nondirectory filename))
)
-(defun uuencode-write-decoded-region (start end filename)
+(defun uuencode-external-write-decoded-region (start end filename)
"Decode and write current region encoded by uuencode into FILENAME.
START and END are buffer positions."
(interactive
(buffer-substring (match-beginning 0)
(match-end 0))
)))))
- (default-directory (or (getenv "TMP")(getenv "TEMP") "/tmp")))
+ (default-directory mime-temp-directory))
(if file
(as-binary-process
(apply (function call-process-region)