;; 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.
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
(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.
(provide 'lazy-lock)
+;;; arch-tag: c1776846-f046-4a45-9684-54b951b12fc9
;;; lazy-lock.el ends here