diff lisp/packages/lazy-lock.el @ 80:1ce6082ce73f r20-0b90

Import from CVS: tag r20-0b90
author cvs
date Mon, 13 Aug 2007 09:06:37 +0200
parents c7528f8e288d
children 4be1180a9e89
line wrap: on
line diff
--- a/lisp/packages/lazy-lock.el	Mon Aug 13 09:05:44 2007 +0200
+++ b/lisp/packages/lazy-lock.el	Mon Aug 13 09:06:37 2007 +0200
@@ -874,7 +874,9 @@
 ;; These fix bugs in `text-property-any' and `text-property-not-all'.  They may
 ;; not work perfectly in 19.11 and below because `next-single-property-change'
 ;; is also broke and not easily fixable in Lisp.
-(if (and lazy-lock-running-xemacs-p (< emacs-minor-version 12))
+(if (and lazy-lock-running-xemacs-p 
+	 (= emacs-major-version 19)
+	 (< emacs-minor-version 12))
     (progn
       ;; Loop through property changes until found.  This fix includes a work
       ;; around which prevents a bug in `window-start' causing a barf here.
@@ -904,7 +906,9 @@
 ;; than `face'.  Since `font-lock-unfontify-region' only removes `face', and we
 ;; have non-font-lock properties hanging about, `text-prop' never gets removed.
 ;; Unfortunately `font-lock-any-extents-p' is inlined so we can't redefine it.
-(if (and lazy-lock-running-xemacs-p (< emacs-minor-version 12))
+(if (and lazy-lock-running-xemacs-p 
+	 (= emacs-major-version 19)
+	 (< emacs-minor-version 12))
     (add-hook 'font-lock-mode-hook
      (function (lambda ()
 	(remove-hook 'after-change-functions 'font-lock-after-change-function)
@@ -921,7 +925,9 @@
 		;; Now set `fontified' to t to stop `lazy-lock-fontify-window'.
 		(put-text-property beg end 'fontified t))))))))))
 
-(if (and lazy-lock-running-xemacs-p (>= emacs-minor-version 12))
+(if (and lazy-lock-running-xemacs-p
+	 (or (> emacs-major-version 19)
+	     (>= emacs-minor-version 12)))
     ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook.
     (add-hook 'font-lock-after-fontify-buffer-hook
 	      'lazy-lock-after-fontify-buffer))