changeset 42567:b1eda5349a48

(enriched-make-annotation): Fix the change from 2002-01-05. (enriched-handle-display-prop): Return proper values.
author Pavel Janík <Pavel@Janik.cz>
date Sun, 06 Jan 2002 11:35:17 +0000
parents 6c1d733d1794
children 049f9a72129f
files lisp/enriched.el
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/enriched.el	Sat Jan 05 23:37:58 2002 +0000
+++ b/lisp/enriched.el	Sun Jan 06 11:35:17 2002 +0000
@@ -315,16 +315,16 @@
 INTERNAL-ANN may be a string, for a flag, or a list of the form (PARAM VALUE).
 If POSITIVE is non-nil, this is the opening annotation;
 if nil, the matching close."
-  (cond ((stringp name)
-	 (format enriched-annotation-format (if positive "" "/") name))
+  (cond ((stringp internal-ann)
+	 (format enriched-annotation-format (if positive "" "/") internal-ann))
 	;; Otherwise it is an annotation with parameters, represented as a list
 	(positive
-	 (let ((item (car name))
-	       (params (cdr name)))
+	 (let ((item (car internal-ann))
+	       (params (cdr internal-ann)))
 	   (concat (format enriched-annotation-format "" item)
 		   (mapconcat (lambda (i) (concat "<param>" i "</param>"))
 			      params ""))))
-	(t (format enriched-annotation-format "/" (car name)))))
+	(t (format enriched-annotation-format "/" (car internal-ann)))))
 
 (defun enriched-encode-other-face (old new)
   "Generate annotations for random face change.
@@ -465,9 +465,8 @@
   (let ((annotation "x-display")
 	(param (prin1-to-string (or old new))))
     (if (null old)
-	(list nil (list annotation param))
-      (list (list annotation param)))))
-
+        (cons nil (list (list annotation param)))
+      (cons (list (list annotation param)) nil))))
 
 (defun enriched-decode-display-prop (start end &optional param)
   "Decode a `display' property for text between START and END.