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