rmail-cease-edit fixes related to "^From " escaping
[bpt/emacs.git] / lisp / mail / rmail.el
index b16f501..c0fb7d1 100644 (file)
@@ -100,6 +100,10 @@ its character representation and its display representation.")
   "The current header display style choice, one of
 'normal (selected headers) or 'full (all headers).")
 
+(defvar rmail-mime-decoded nil
+  "Non-nil if message has been processed by `rmail-show-mime-function'.")
+(put 'rmail-mime-decoded 'permanent-local t) ; for rmail-edit
+
 (defgroup rmail nil
   "Mail reader for Emacs."
   :group 'mail)
@@ -2715,10 +2719,10 @@ It is not critical to set this to the correct value; it only affects
 how Rmail displays lines starting with \">*From \" in non-MIME messages.
 
 See also `unrmail-mbox-format'."
-  :type '(choice (const 'mboxrd)
-                (const 'mboxro))
+  :type '(choice (const mboxrd)
+                (const mboxro))
   :version "24.4"
-  :group 'rmail)
+  :group 'rmail-files)
 
 (defun rmail-show-message-1 (&optional msg)
   "Show message MSG (default: current message) using `rmail-view-buffer'.
@@ -2768,6 +2772,7 @@ The current mail message becomes the message displayed."
                 (re-search-forward "mime-version: 1.0" nil t))
            (let ((rmail-buffer mbox-buf)
                  (rmail-view-buffer view-buf))
+             (set (make-local-variable 'rmail-mime-decoded) t)
              (funcall rmail-show-mime-function))
          (setq body-start (search-forward "\n\n" nil t))
          (narrow-to-region beg (point))