aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marshall1998-03-25 16:52:19 +0000
committerSimon Marshall1998-03-25 16:52:19 +0000
commitce2cc8377dfc18233a111fb74ae56c1d837cede0 (patch)
tree6fd9b5aab8262b7a73c68204da4ea499be80aaac
parente69d810c33b897f217460eb07afd1e833161a9e2 (diff)
downloademacs-ce2cc8377dfc18233a111fb74ae56c1d837cede0.tar.gz
emacs-ce2cc8377dfc18233a111fb74ae56c1d837cede0.zip
use new UPDATE window-end arg.
-rw-r--r--lisp/lazy-lock.el50
1 files changed, 35 insertions, 15 deletions
diff --git a/lisp/lazy-lock.el b/lisp/lazy-lock.el
index 11cb93a0454..f694b795fb8 100644
--- a/lisp/lazy-lock.el
+++ b/lisp/lazy-lock.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Simon Marshall <simon@gnu.org> 5;; Author: Simon Marshall <simon@gnu.org>
6;; Keywords: faces files 6;; Keywords: faces files
7;; Version: 2.09 7;; Version: 2.09.01
8 8
9;;; This file is part of GNU Emacs. 9;;; This file is part of GNU Emacs.
10 10
@@ -256,6 +256,8 @@
256;; - Made various wrapping `inhibit-point-motion-hooks' (Vinicius Latorre hint) 256;; - Made various wrapping `inhibit-point-motion-hooks' (Vinicius Latorre hint)
257;; - Made `lazy-lock-fontify-after-idle' wrap `minibuffer-auto-raise' 257;; - Made `lazy-lock-fontify-after-idle' wrap `minibuffer-auto-raise'
258;; - Made `lazy-lock-fontify-after-defer' paranoid about deferred buffers 258;; - Made `lazy-lock-fontify-after-defer' paranoid about deferred buffers
259;; 2.09--2.10:
260;; - Use `window-end' UPDATE arg for Emacs 20.3 and later.
259 261
260;;; Code: 262;;; Code:
261 263
@@ -312,7 +314,7 @@ The value returned is the value of the last form in BODY."
312; "Submit via mail a bug report on lazy-lock.el." 314; "Submit via mail a bug report on lazy-lock.el."
313; (interactive) 315; (interactive)
314; (let ((reporter-prompt-for-summary-p t)) 316; (let ((reporter-prompt-for-summary-p t))
315; (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "lazy-lock 2.09" 317; (reporter-submit-bug-report "simon@gnu.ai.mit.edu" "lazy-lock 2.09.01"
316; '(lazy-lock-minimum-size lazy-lock-defer-on-the-fly 318; '(lazy-lock-minimum-size lazy-lock-defer-on-the-fly
317; lazy-lock-defer-on-scrolling lazy-lock-defer-contextually 319; lazy-lock-defer-on-scrolling lazy-lock-defer-contextually
318; lazy-lock-defer-time lazy-lock-stealth-time 320; lazy-lock-defer-time lazy-lock-stealth-time
@@ -703,13 +705,9 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
703 705
704(defun lazy-lock-fontify-after-scroll (window window-start) 706(defun lazy-lock-fontify-after-scroll (window window-start)
705 ;; Called from `window-scroll-functions'. 707 ;; Called from `window-scroll-functions'.
706 ;; Fontify WINDOW from WINDOW-START following the scroll. We cannot use 708 ;; Fontify WINDOW from WINDOW-START following the scroll.
707 ;; `window-end' so we work out what it would be via `vertical-motion'.
708 (let ((inhibit-point-motion-hooks t)) 709 (let ((inhibit-point-motion-hooks t))
709 (save-excursion 710 (lazy-lock-fontify-region window-start (window-end window t)))
710 (goto-char window-start)
711 (vertical-motion (window-height window) window)
712 (lazy-lock-fontify-region window-start (point))))
713 ;; A prior deletion that did not cause scrolling, followed by a scroll, would 711 ;; A prior deletion that did not cause scrolling, followed by a scroll, would
714 ;; result in an unnecessary trigger after this if we did not cancel it now. 712 ;; result in an unnecessary trigger after this if we did not cancel it now.
715 (set-window-redisplay-end-trigger window nil)) 713 (set-window-redisplay-end-trigger window nil))
@@ -767,15 +765,11 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
767 765
768(defun lazy-lock-fontify-after-trigger (window trigger-point) 766(defun lazy-lock-fontify-after-trigger (window trigger-point)
769 ;; Called from `redisplay-end-trigger-functions'. 767 ;; Called from `redisplay-end-trigger-functions'.
770 ;; Fontify WINDOW from TRIGGER-POINT. We cannot use `window-end' so we work 768 ;; Fontify WINDOW from TRIGGER-POINT following the redisplay.
771 ;; out what it would be via `vertical-motion'.
772 ;; We could probably just use `lazy-lock-fontify-after-scroll' without loss: 769 ;; We could probably just use `lazy-lock-fontify-after-scroll' without loss:
773 ;; (lazy-lock-fontify-after-scroll window (window-start window)) 770 ;; (inline (lazy-lock-fontify-after-scroll window (window-start window)))
774 (let ((inhibit-point-motion-hooks t)) 771 (let ((inhibit-point-motion-hooks t))
775 (save-excursion 772 (lazy-lock-fontify-region trigger-point (window-end window t))))
776 (goto-char (window-start window))
777 (vertical-motion (window-height window) window)
778 (lazy-lock-fontify-region trigger-point (point)))))
779 773
780;; 2. Modified text must be marked as unfontified so it can be identified and 774;; 2. Modified text must be marked as unfontified so it can be identified and
781;; fontified later when Emacs is idle. Deferral occurs by adding one of 775;; fontified later when Emacs is idle. Deferral occurs by adding one of
@@ -1042,6 +1036,32 @@ verbosity is controlled via the variable `lazy-lock-stealth-verbose'."
1042 (mapcar 'lazy-lock-fontify-conservatively 1036 (mapcar 'lazy-lock-fontify-conservatively
1043 (get-buffer-window-list (pop lazy-lock-install) 'nomini t))))) 1037 (get-buffer-window-list (pop lazy-lock-install) 'nomini t)))))
1044 1038
1039(when (if (save-match-data (string-match "Lucid\\|XEmacs" (emacs-version)))
1040 nil
1041 (or (and (= emacs-major-version 20) (< emacs-minor-version 3))
1042 (= emacs-major-version 19)))
1043 ;;
1044 ;; We use `vertical-motion' rather than `window-end' UPDATE arg.
1045 (defun lazy-lock-fontify-after-scroll (window window-start)
1046 ;; Called from `window-scroll-functions'.
1047 ;; Fontify WINDOW from WINDOW-START following the scroll. We cannot use
1048 ;; `window-end' so we work out what it would be via `vertical-motion'.
1049 (let ((inhibit-point-motion-hooks t))
1050 (save-excursion
1051 (goto-char window-start)
1052 (vertical-motion (window-height window) window)
1053 (lazy-lock-fontify-region window-start (point))))
1054 (set-window-redisplay-end-trigger window nil))
1055 (defun lazy-lock-fontify-after-trigger (window trigger-point)
1056 ;; Called from `redisplay-end-trigger-functions'.
1057 ;; Fontify WINDOW from TRIGGER-POINT following the redisplay. We cannot
1058 ;; use `window-end' so we work out what it would be via `vertical-motion'.
1059 (let ((inhibit-point-motion-hooks t))
1060 (save-excursion
1061 (goto-char (window-start window))
1062 (vertical-motion (window-height window) window)
1063 (lazy-lock-fontify-region trigger-point (point))))))
1064
1045(when (consp lazy-lock-defer-time) 1065(when (consp lazy-lock-defer-time)
1046 ;; 1066 ;;
1047 ;; In 2.06.04 and below, `lazy-lock-defer-time' could specify modes and time. 1067 ;; In 2.06.04 and below, `lazy-lock-defer-time' could specify modes and time.