Function: rmail-mime-toggle-raw
rmail-mime-toggle-raw is a byte-compiled function defined in
rmailmm.el.gz.
Signature
(rmail-mime-toggle-raw &optional STATE)
Documentation
Toggle on and off the raw display mode of MIME-entity at point.
With optional argument STATE, force the specified display mode.
Use raw for raw mode, and any other non-nil value for decoded mode.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmailmm.el.gz
(defun rmail-mime-toggle-raw (&optional state)
"Toggle on and off the raw display mode of MIME-entity at point.
With optional argument STATE, force the specified display mode.
Use `raw' for raw mode, and any other non-nil value for decoded mode."
(let* ((pos (if (eobp) (1- (point-max)) (point)))
(entity (get-text-property pos 'rmail-mime-entity))
(current (aref (rmail-mime-entity-display entity) 0))
(segment (rmail-mime-entity-segment pos entity)))
(if (or (eq state 'raw)
(not (or state
(eq (rmail-mime-display-header current) 'raw))))
;; Enter the raw mode.
(rmail-mime-raw-mode entity)
;; Enter the shown mode.
(rmail-mime-shown-mode entity)
(let ((inhibit-read-only t)
(modified (buffer-modified-p)))
(save-excursion
(goto-char (aref segment 1))
(rmail-mime-insert entity)
(restore-buffer-modified-p modified))))))