* reftex.texi (AUCTeX): Update links, section name.
[bpt/emacs.git] / lisp / lazy-lock.el
index 04a7778..3547674 100644 (file)
@@ -38,7 +38,7 @@
 ;; See also the fast-lock package.  (But don't use them at the same time!)
 
 ;; Installation:
-;; 
+;;
 ;; Put in your ~/.emacs:
 ;;
 ;; (setq font-lock-support-mode 'lazy-lock-mode)
  (defmacro save-buffer-state (varlist &rest body)
    "Bind variables according to VARLIST and eval BODY restoring buffer state."
    `(let* (,@(append varlist
-                     '((modified (buffer-modified-p)) (buffer-undo-list t)
-                       (inhibit-read-only t) (inhibit-point-motion-hooks t)
-                       before-change-functions after-change-functions
-                       deactivate-mark buffer-file-name buffer-file-truename)))
+                  '((modified (buffer-modified-p))
+                    (buffer-undo-list t)
+                    (inhibit-read-only t)
+                    (inhibit-point-motion-hooks t)
+                    (inhibit-modification-hooks t)
+                    deactivate-mark
+                    buffer-file-name
+                    buffer-file-truename)))
      ,@body
      (when (and (not modified) (buffer-modified-p))
-       (set-buffer-modified-p nil))))
+       (restore-buffer-modified-p nil))))
  (put 'save-buffer-state 'lisp-indent-function 1)
  ;;
  ;; We use this for clarity and speed.  Naughty but nice.
@@ -445,7 +449,7 @@ To reduce machine load during stealth fontification, at the cost of stealth
 taking longer to fontify, you could increase the value of this variable.
 See also `lazy-lock-stealth-load'."
   :type '(choice (const :tag "never" nil)
-                (number :tag "seconds"))         
+                (number :tag "seconds"))
   :group 'lazy-lock)
 
 (defcustom lazy-lock-stealth-verbose
@@ -465,6 +469,10 @@ automatically in your `~/.emacs' by:
 
  (setq font-lock-support-mode 'lazy-lock-mode)
 
+For a newer font-lock support mode with similar functionality, see
+`jit-lock-mode'.  Eventually, Lazy Lock mode will be deprecated in
+JIT Lock's favor.
+
 When Lazy Lock mode is enabled, fontification can be lazy in a number of ways:
 
 - Demand-driven buffer fontification if `lazy-lock-minimum-size' is non-nil.
@@ -1042,4 +1050,5 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
 
 (provide 'lazy-lock)
 
+;;; arch-tag: c1776846-f046-4a45-9684-54b951b12fc9
 ;;; lazy-lock.el ends here