changeset 14452:7074747f9a8c

(format-deannotate-region): Fixed bug that created double marking of multi-annotation text-properties (eg, bold-italic).
author Richard M. Stallman <rms@gnu.org>
date Thu, 01 Feb 1996 00:19:50 +0000
parents fc22eb3a4146
children 58afa829c736
files lisp/format.el
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/format.el	Wed Jan 31 22:36:08 1996 +0000
+++ b/lisp/format.el	Thu Feb 01 00:19:50 1996 +0000
@@ -500,8 +500,21 @@
 						    (assoc r open-ans))
 						  ans))
 				    nil	; multiple ans not satisfied
-				  ;; Yes, use the current property name &
-				  ;; value.  Set loop variables to nil so loop
+				  ;; Yes, all set.
+				  ;; If there are multiple annotations going
+				  ;; into one text property, adjust the 
+				  ;; begin points of the other annotations
+				  ;; so that we don't get double marking.
+				  (let ((to-reset ans)
+					this-one)
+				    (while to-reset
+				      (setq this-one
+					    (assoc (car to-reset) 
+						   (cdr open-ans)))
+				      (if this-one
+					  (setcdr this-one (list loc)))
+				      (setq to-reset (cdr to-reset))))
+				  ;; Set loop variables to nil so loop
 				  ;; will exit.
 				  (setq alist nil aalist nil matched t
 					;; pop annotation off stack.