2001-11-16 Per Abrahamsen <abraham@dina.kvl.dk>
authorPer Abrahamsen <abraham@dina.kvl.dk>
Fri, 16 Nov 2001 15:54:03 +0000 (15:54 +0000)
committerPer Abrahamsen <abraham@dina.kvl.dk>
Fri, 16 Nov 2001 15:54:03 +0000 (15:54 +0000)
* message.el (message-strip-special-text-properties): New option.
(message-strip-forbidden-properties): Obey it.

lisp/ChangeLog
lisp/message.el

index 61f4727..dc0131c 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-16  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * message.el (message-strip-special-text-properties): New option.
+       (message-strip-forbidden-properties): Obey it.
+
 2001-11-14  Sam Steingold  <sds@gnu.org>
 
        * gnus-score.el: Fixed some doc strings to properly quote symbols.
index c0c7a28..9a88ad1 100644 (file)
@@ -1606,6 +1606,18 @@ Point is left at the beginning of the narrowed-to region."
 ;; that interfer with the normal function of message mode out of the
 ;; buffer. 
 
+(defcustom message-strip-special-text-properties t
+  "Strip special properties from the message buffer.
+
+Emacs has a number of special text properties which can break message
+composing in various ways.  If this option is set, message will strip
+these properties from the message composition buffer.  However, some
+packages like Tamago requires these properties to be present in order
+to work.  If you use one of these packages, turn this option off, and
+hope the message composition doesn't break too bad."
+  :group 'message-various
+  :type 'boolean)
+
 (defconst message-forbidden-properties 
   ;; No reason this should be clutter up customize.  We make it a
   ;; property list (rather than a list of property symbols), to be
@@ -1625,7 +1637,8 @@ The values of the properties are ignored, only the property names are used.")
   "Strip forbidden properties between BEGIN and END, ignoring the third arg.
 This function is intended to be called from `after-change-functions'.
 See also `message-forbidden-properties'."
-  (remove-text-properties begin end message-forbidden-properties))
+  (when message-strip-special-text-properties
+    (remove-text-properties begin end message-forbidden-properties)))
 
 ;;;###autoload
 (define-derived-mode message-mode text-mode "Message"