[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] Changes to auctex/tex-fold.el
From: |
Ralf Angeli |
Subject: |
[AUCTeX-diffs] Changes to auctex/tex-fold.el |
Date: |
Thu, 14 Apr 2005 03:22:38 -0400 |
Index: auctex/tex-fold.el
diff -u auctex/tex-fold.el:1.40 auctex/tex-fold.el:1.41
--- auctex/tex-fold.el:1.40 Sun Apr 3 18:09:39 2005
+++ auctex/tex-fold.el Thu Apr 14 07:22:38 2005
@@ -35,11 +35,11 @@
;; The display string of content which should display part of itself
;; is made by copying the text from the buffer together with its text
;; properties. If fontification has not happened when this is done
-;; (e.g. because of lazy font locking) the intended fontification will
-;; not show up. Maybe this could be improved by using some sort of
-;; "lazy folding" or refreshing the window upon scrolling. As a
-;; workaround you can leave Emacs idle a few seconds and wait for
-;; stealth font locking to finish before you fold the buffer.
+;; (e.g. because of lazy or just-in-time font locking) the intended
+;; fontification will not show up. Maybe this could be improved by
+;; using some sort of "lazy folding" or refreshing the window upon
+;; scrolling. As a workaround fontification of the whole buffer
+;; currently is forced before folding it.
;;; Code:
@@ -126,6 +126,11 @@
:type 'integer
:group 'TeX-fold)
+(defcustom TeX-fold-force-fontify t
+ "Force the buffer to be fully fontified by folding it."
+ :group 'TeX-fold
+ :type 'boolean)
+
(defface TeX-fold-folded-face
'((((class color) (background light))
(:foreground "SlateBlue"))
@@ -198,6 +203,13 @@
and environments in `TeX-fold-env-spec-list'."
(interactive)
(TeX-fold-clearout-region (point-min) (point-max))
+ (when (and TeX-fold-force-fontify
+ (boundp 'jit-lock-mode)
+ jit-lock-mode
+ (fboundp 'jit-lock-fontify-now))
+ ;; We force fontification here only because it should rarely be
+ ;; needed for the other folding commands.
+ (jit-lock-fontify-now))
(TeX-fold-region (point-min) (point-max)))
(defun TeX-fold-paragraph ()
@@ -298,6 +310,10 @@
item-end))
"[Error: No content found]")
display-string-spec))
+;; (apply #'propertize
+;; display-string-spec
+;; (text-properties-at
+;; (point)))))
(ov (TeX-fold-make-overlay item-start item-end type
display-string-spec
display-string)))
@@ -406,6 +422,8 @@
item-end))
"[Error: No content found]")
display-string-spec))
+;; (apply #'propertize display-string-spec
+;; (text-properties-at (point)))))
(ov (TeX-fold-make-overlay item-start item-end type
display-string-spec
display-string)))
- [AUCTeX-diffs] Changes to auctex/tex-fold.el,
Ralf Angeli <=