]> code.delx.au - gnu-emacs/blobdiff - lisp/lazy-lock.el
Added checks that distinguish between cygwin and windows in some
[gnu-emacs] / lisp / lazy-lock.el
index 04a777895f13c77253933213f4c0a4eb9e2b763d..11303dfbd928ff771e8059163664fb845c158a5b 100644 (file)
  (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.
@@ -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.