# HG changeset patch # User Richard M. Stallman # Date 823133990 0 # Node ID 7074747f9a8c8f7c0e7f7175440b0479a10a6302 # Parent fc22eb3a414654c439c5204e50a78fdb332242e5 (format-deannotate-region): Fixed bug that created double marking of multi-annotation text-properties (eg, bold-italic). diff -r fc22eb3a4146 -r 7074747f9a8c lisp/format.el --- 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.