+ (mel-define-method mime-write-decoded-region (start end filename
+ (nil "base64"))
+ "Decode the region from START to END and write out to FILENAME."
+ (interactive "*r\nFWrite decoded region to file: ")
+ (let ((str (buffer-substring start end)))
+ (with-temp-buffer
+ (insert str)
+ (base64-decode-region (point-min) (point-max))
+ (write-region-as-binary (point-min) (point-max) filename))))