aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-02-01 00:19:50 +0000
committerRichard M. Stallman1996-02-01 00:19:50 +0000
commit059a4a904fbf63a77b2c727b9458b9012bfa22eb (patch)
tree38972a8ef55e8e3f05f67c3d5fb1520a56bec633
parent4b3d19094a079d42cd97982010a694bb1fae1def (diff)
downloademacs-059a4a904fbf63a77b2c727b9458b9012bfa22eb.tar.gz
emacs-059a4a904fbf63a77b2c727b9458b9012bfa22eb.zip
(format-deannotate-region): Fixed bug that created
double marking of multi-annotation text-properties (eg, bold-italic).
-rw-r--r--lisp/format.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/format.el b/lisp/format.el
index 2a66b56846a..929be66cdef 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -500,8 +500,21 @@ to write these unknown annotations back into the file."
500 (assoc r open-ans)) 500 (assoc r open-ans))
501 ans)) 501 ans))
502 nil ; multiple ans not satisfied 502 nil ; multiple ans not satisfied
503 ;; Yes, use the current property name & 503 ;; Yes, all set.
504 ;; value. Set loop variables to nil so loop 504 ;; If there are multiple annotations going
505 ;; into one text property, adjust the
506 ;; begin points of the other annotations
507 ;; so that we don't get double marking.
508 (let ((to-reset ans)
509 this-one)
510 (while to-reset
511 (setq this-one
512 (assoc (car to-reset)
513 (cdr open-ans)))
514 (if this-one
515 (setcdr this-one (list loc)))
516 (setq to-reset (cdr to-reset))))
517 ;; Set loop variables to nil so loop
505 ;; will exit. 518 ;; will exit.
506 (setq alist nil aalist nil matched t 519 (setq alist nil aalist nil matched t
507 ;; pop annotation off stack. 520 ;; pop annotation off stack.