summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-02-01 00:19:50 +0000
committerRichard M. Stallman <rms@gnu.org>1996-02-01 00:19:50 +0000
commit919620c767fd89feb7f5d0572039e0162373d28e (patch)
tree63587f7f9deb3b802db81c41c57fd0b2c0c2bdc0
parentaba76cc97f2f7a49af66a1bfcd886cb76e0f1c48 (diff)
downloademacs-919620c767fd89feb7f5d0572039e0162373d28e.tar.gz
(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."
(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.