-(defun quoted-printable-ccl-decode-string (string)
- "Decode quoted-printable encoded STRING."
- (encode-coding-string
- string
- 'mel-ccl-quoted-printable-lf-lf-rev))
-
-(defun quoted-printable-ccl-decode-region (start end)
- "Decode the region from START to END with quoted-printable
+ (cond
+ ((eval-when-compile
+ (and (eq emacs-major-version 23)
+ (eq emacs-minor-version 1)))
+ (defun quoted-printable-ccl-decode-string (string)
+ "Decode quoted-printable encoded STRING."
+ (ccl-execute-on-string 'mel-ccl-decode-quoted-printable-lf-lf
+ (make-vector 9 0) string nil t))
+
+ (defun quoted-printable-ccl-decode-region (start end)
+ "Decode the region from START to END with quoted-printable
+encoding."
+ (interactive "*r")
+ (save-excursion
+ (goto-char start)
+ (insert (prog1 (quoted-printable-ccl-decode-string
+ (buffer-substring start end))
+ (delete-region start end)))))
+
+ (defun quoted-printable-ccl-write-decoded-region (start end filename)
+ "Decode quoted-printable encoded current region and write out to FILENAME."
+ (interactive "*r\nFWrite decoded region to file: ")
+ (let ((string (quoted-printable-ccl-decode-string
+ (buffer-substring start end)))
+ (coding-system-for-write 'binary)
+ jka-compr-compression-info-list jam-zcat-filename-list)
+ (with-temp-file filename
+ (insert string)))))
+ (t
+ (defun quoted-printable-ccl-decode-string (string)
+ "Decode quoted-printable encoded STRING."
+ (encode-coding-string
+ string
+ 'mel-ccl-quoted-printable-lf-lf-rev))
+
+ (defun quoted-printable-ccl-decode-region (start end)
+ "Decode the region from START to END with quoted-printable