adfca8
commit 9ad0fcc54442a9a01d41be19880250783426db70
adfca8
Author: Lars Ingebrigtsen <larsi@gnus.org>
adfca8
Date:   Fri Sep 8 20:23:31 2017 -0700
adfca8
adfca8
    Remove unsafe enriched mode translations
adfca8
    
adfca8
    * lisp/gnus/mm-view.el (mm-inline-text):
adfca8
    Do not worry about enriched or richtext type.
adfca8
    * lisp/textmodes/enriched.el (enriched-translations):
adfca8
    Remove translations for FUNCTION, display (Bug#28350).
adfca8
    (enriched-handle-display-prop, enriched-decode-display-prop): Remove.
adfca8
adfca8
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
adfca8
index e5859d002c..77ad271d1d 100644
adfca8
--- a/lisp/gnus/mm-view.el
adfca8
+++ b/lisp/gnus/mm-view.el
adfca8
@@ -383,10 +383,6 @@
adfca8
 	(goto-char (point-max))))
adfca8
     (save-restriction
adfca8
       (narrow-to-region b (point))
adfca8
-      (when (member type '("enriched" "richtext"))
adfca8
-        (set-text-properties (point-min) (point-max) nil)
adfca8
-	(ignore-errors
adfca8
-	  (enriched-decode (point-min) (point-max))))
adfca8
       (mm-handle-set-undisplayer
adfca8
        handle
adfca8
        `(lambda ()
adfca8
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
adfca8
index beb6c6dda3..a8f0d3891a 100644
adfca8
--- a/lisp/textmodes/enriched.el
adfca8
+++ b/lisp/textmodes/enriched.el
adfca8
@@ -117,12 +117,7 @@ expression, which is evaluated to get the string to insert.")
adfca8
 		   (full        "flushboth")
adfca8
 		   (center      "center"))
adfca8
     (PARAMETER     (t           "param")) ; Argument of preceding annotation
adfca8
-    ;; The following are not part of the standard:
adfca8
-    (FUNCTION      (enriched-decode-foreground "x-color")
adfca8
-		   (enriched-decode-background "x-bg-color")
adfca8
-		   (enriched-decode-display-prop "x-display"))
adfca8
     (read-only     (t           "x-read-only"))
adfca8
-    (display	   (nil		enriched-handle-display-prop))
adfca8
     (unknown       (nil         format-annotate-value))
adfca8
 ;   (font-size     (2           "bigger")       ; unimplemented
adfca8
 ;		   (-2          "smaller"))
adfca8
@@ -477,32 +472,5 @@ Return value is \(begin end name positive-p), or nil if none was found."
adfca8
     (message "Warning: no color specified for <x-bg-color>")
adfca8
     nil))
adfca8
 
adfca8
-;;; Handling the `display' property.
adfca8
-
adfca8
-
adfca8
-(defun enriched-handle-display-prop (old new)
adfca8
-  "Return a list of annotations for a change in the `display' property.
adfca8
-OLD is the old value of the property, NEW is the new value.  Value
adfca8
-is a list `(CLOSE OPEN)', where CLOSE is a list of annotations to
adfca8
-close and OPEN a list of annotations to open.  Each of these lists
adfca8
-has the form `(ANNOTATION PARAM ...)'."
adfca8
-  (let ((annotation "x-display")
adfca8
-	(param (prin1-to-string (or old new))))
adfca8
-    (if (null old)
adfca8
-        (cons nil (list (list annotation param)))
adfca8
-      (cons (list (list annotation param)) nil))))
adfca8
-
adfca8
-(defun enriched-decode-display-prop (start end &optional param)
adfca8
-  "Decode a `display' property for text between START and END.
adfca8
-PARAM is a `<param>' found for the property.
adfca8
-Value is a list `(START END SYMBOL VALUE)' with START and END denoting
adfca8
-the range of text to assign text property SYMBOL with value VALUE."
adfca8
-  (let ((prop (when (stringp param)
adfca8
-		(condition-case ()
adfca8
-		    (car (read-from-string param))
adfca8
-		  (error nil)))))
adfca8
-    (unless prop
adfca8
-      (message "Warning: invalid <x-display> parameter %s" param))
adfca8
-    (list start end 'display prop)))
adfca8
 
adfca8
 ;;; enriched.el ends here