/[auctex]/auctex/tex-fold.el
ViewVC logotype

Diff of /auctex/tex-fold.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by angeli, Sun Apr 3 18:09:39 2005 UTC revision 1.41 by angeli, Thu Apr 14 07:22:38 2005 UTC
# Line 35  Line 35 
35  ;; The display string of content which should display part of itself  ;; The display string of content which should display part of itself
36  ;; is made by copying the text from the buffer together with its text  ;; is made by copying the text from the buffer together with its text
37  ;; properties.  If fontification has not happened when this is done  ;; properties.  If fontification has not happened when this is done
38  ;; (e.g. because of lazy font locking) the intended fontification will  ;; (e.g. because of lazy or just-in-time font locking) the intended
39  ;; not show up.  Maybe this could be improved by using some sort of  ;; fontification will not show up.  Maybe this could be improved by
40  ;; "lazy folding" or refreshing the window upon scrolling.  As a  ;; using some sort of "lazy folding" or refreshing the window upon
41  ;; workaround you can leave Emacs idle a few seconds and wait for  ;; scrolling.  As a workaround fontification of the whole buffer
42  ;; stealth font locking to finish before you fold the buffer.  ;; currently is forced before folding it.
43    
44  ;;; Code:  ;;; Code:
45    
# Line 126  Set it to zero in order to disable help Line 126  Set it to zero in order to disable help
126    :type 'integer    :type 'integer
127    :group 'TeX-fold)    :group 'TeX-fold)
128    
129    (defcustom TeX-fold-force-fontify t
130      "Force the buffer to be fully fontified by folding it."
131      :group 'TeX-fold
132      :type 'boolean)
133    
134  (defface TeX-fold-folded-face  (defface TeX-fold-folded-face
135    '((((class color) (background light))    '((((class color) (background light))
136       (:foreground "SlateBlue"))       (:foreground "SlateBlue"))
# Line 198  The relevant macros are specified in the Line 203  The relevant macros are specified in the
203  and environments in `TeX-fold-env-spec-list'."  and environments in `TeX-fold-env-spec-list'."
204    (interactive)    (interactive)
205    (TeX-fold-clearout-region (point-min) (point-max))    (TeX-fold-clearout-region (point-min) (point-max))
206      (when (and TeX-fold-force-fontify
207                 (boundp 'jit-lock-mode)
208                 jit-lock-mode
209                 (fboundp 'jit-lock-fontify-now))
210        ;; We force fontification here only because it should rarely be
211        ;; needed for the other folding commands.
212        (jit-lock-fontify-now))
213    (TeX-fold-region (point-min) (point-max)))    (TeX-fold-region (point-min) (point-max)))
214    
215  (defun TeX-fold-paragraph ()  (defun TeX-fold-paragraph ()
# Line 298  environments or 'macro for macros." Line 310  environments or 'macro for macros."
310                                                      item-end))                                                      item-end))
311                                                   "[Error: No content found]")                                                   "[Error: No content found]")
312                                             display-string-spec))                                             display-string-spec))
313    ;;                                         (apply #'propertize
314    ;;                                                display-string-spec
315    ;;                                                (text-properties-at
316    ;;                                                 (point)))))
317                           (ov (TeX-fold-make-overlay item-start item-end type                           (ov (TeX-fold-make-overlay item-start item-end type
318                                                      display-string-spec                                                      display-string-spec
319                                                      display-string)))                                                      display-string)))
# Line 406  Return non-nil if an item was found and Line 422  Return non-nil if an item was found and
422                                                       item-end))                                                       item-end))
423                                         "[Error: No content found]")                                         "[Error: No content found]")
424                                   display-string-spec))                                   display-string-spec))
425    ;;                               (apply #'propertize display-string-spec
426    ;;                                      (text-properties-at (point)))))
427                 (ov (TeX-fold-make-overlay item-start item-end type                 (ov (TeX-fold-make-overlay item-start item-end type
428                                            display-string-spec                                            display-string-spec
429                                            display-string)))                                            display-string)))

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26