Function: rmail--decode-and-apply

rmail--decode-and-apply is a byte-compiled function defined in rmailsum.el.gz.

Signature

(rmail--decode-and-apply FUNCTION &rest ARGS)

Documentation

Make an RFC2047-decoded copy of current buffer, apply FUNCTION with ARGS.

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmailsum.el.gz
(defun rmail--decode-and-apply (function &rest args)
  "Make an RFC2047-decoded copy of current buffer, apply FUNCTION with ARGS."
  (let ((buff (current-buffer)))
    (with-temp-buffer
      (insert-buffer-substring buff)
      (goto-char (point-min))
      ;; FIXME?  In rmail-show-message-1, decoding depends on
      ;; rmail-enable-mime being non-nil (?).
      (rfc2047-decode-region (point-min)
			     (save-excursion
			       (progn
				 (search-forward "\n\n" nil 'move)
				 (point))))
      (apply function args))))