[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-commit] Changes to auctex/tex-fold.el,v
From: |
Masayuki Ataka |
Subject: |
[AUCTeX-commit] Changes to auctex/tex-fold.el,v |
Date: |
Thu, 15 Feb 2007 07:01:49 +0000 |
CVSROOT: /sources/auctex
Module name: auctex
Changes by: Masayuki Ataka <ataka> 07/02/15 07:01:49
Index: tex-fold.el
===================================================================
RCS file: /sources/auctex/auctex/tex-fold.el,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- tex-fold.el 10 Feb 2007 15:59:19 -0000 1.57
+++ tex-fold.el 15 Feb 2007 07:01:49 -0000 1.58
@@ -175,6 +175,12 @@
:group 'TeX-fold
:type 'boolean)
+(defcustom TeX-fold-auto t
+ "If non-nil, fold macros automatically after `TeX-insert-macro'."
+ :group 'TeX-fold
+ :type 'boolean)
+
+
(defface TeX-fold-folded-face
'((((class color) (background light))
(:foreground "SlateBlue"))
@@ -843,6 +849,13 @@
(set (make-local-variable 'search-invisible) t)
(add-hook 'post-command-hook 'TeX-fold-post-command nil t)
(add-hook 'LaTeX-fill-newline-hook 'TeX-fold-update-at-point nil t)
+ (add-hook 'TeX-after-insert-macro-hook (lambda ()
+ (when (and TeX-fold-mode
TeX-fold-auto)
+ (save-excursion
+ (backward-char)
+ (or (TeX-fold-item 'macro)
+ (TeX-fold-item 'math)
+ (TeX-fold-item
'env))))))
;; Update the `TeX-fold-*-spec-list-internal' variables.
(dolist (elt '("macro" "env" "math"))
(set (intern (format "TeX-fold-%s-spec-list-internal" elt))