message: insert mail-header-separator read-only and intangible
authorJulien Danjou <julien@danjou.info>
Thu, 3 Feb 2011 15:26:11 +0000 (16:26 +0100)
committerJulien Danjou <julien@danjou.info>
Thu, 3 Feb 2011 16:27:04 +0000 (17:27 +0100)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/gnus-draft.el
lisp/message.el

index 894bc72..7ea9425 100644 (file)
@@ -9,6 +9,8 @@
 
        * message.el (message-setup-1): Always generate References first.
        (message-mail): Return the return value of message-setup, not always t.
+       (message-setup-1): Insert mail-header-separator with read-only and
+       intangible properties set.
 
        * gnus.el (gnus-summary-line-format): Add missing semi-colon for
        user-date in docstring.
index 78ef713..02d6393 100644 (file)
@@ -257,7 +257,8 @@ Obeys the standard process/prefix convention."
       (gnus-setup-message 'forward
        (let ((article narticle))
          (message-mail)
-         (erase-buffer)
+          (let ((inhibit-read-only t))
+            (erase-buffer))
          (if (not (gnus-request-restore-buffer article group))
              (error "Couldn't restore the article")
            (when (and restore
index 42ca73c..595a803 100644 (file)
@@ -6444,7 +6444,9 @@ are not included."
          (funcall message-default-headers)
        message-default-headers))
     (or (bolp) (insert ?\n)))
-  (insert mail-header-separator "\n")
+  (let ((message-forbidden-properties nil))
+    (insert (propertize (concat mail-header-separator "\n")
+                        'read-only t 'rear-nonsticky t 'intangible t)))
   (forward-line -1)
   ;; If a crash happens while replying, the auto-save file would *not* have a
   ;; `References:' header if `message-generate-headers-first' was nil.