Index: auctex/tex-fold.el
diff -u auctex/tex-fold.el:1.47 auctex/tex-fold.el:1.48
--- auctex/tex-fold.el:1.47     Thu May 12 13:14:15 2005
+++ auctex/tex-fold.el  Thu May 12 16:27:44 2005
@@ -364,9 +364,12 @@
 DISPLAY-STRING-SPEC is the original specification of the display
 string in the variables `TeX-fold-macro-spec-list' or
 `TeX-fold-env-spec-list' and may be a string or an integer."
-  (let ((ov (make-overlay ov-start ov-end (current-buffer) t nil)))
+  ;; Calculate priority before the overlay is instantiated.  We don't
+  ;; want `TeX-overlay-prioritize' to pick up a non-prioritized one.
+  (let ((priority (TeX-overlay-prioritize ov-start ov-end))
+       (ov (make-overlay ov-start ov-end (current-buffer) t nil)))
     (overlay-put ov 'category 'TeX-fold)
-    (overlay-put ov 'priority (TeX-overlay-prioritize ov-start ov-end))
+    (overlay-put ov 'priority priority)
     (overlay-put ov 'evaporate t)
     (overlay-put ov 'TeX-fold-type type)
     (overlay-put ov 'TeX-fold-display-string-spec display-string-spec)


_______________________________________________
auctex-diffs mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/auctex-diffs

Reply via email to