SUPERCEDES packages

On Fri, Aug 15, 2014 at 10:50 AM, Jerry James <james@xemacs.org> wrote:
I think that lazy-lock-after-change, which does not alter the region, should definitely come at the end of the after-change-functions list, after any hook functions which may change the region, not just c-after-change.  Here is a patch to accomplish that.

See the further discussion on xemacs-beta.  This new patch changes a few more font-lock-related manipulations of after-change-functions to ensure that they always add functions at the end of the list, rather than the beginning.

diff -r e24f8c81c991 xemacs-packages/edit-utils/ChangeLog
--- a/xemacs-packages/edit-utils/ChangeLog Fri May 30 14:33:15 2014 +0200
+++ b/xemacs-packages/edit-utils/ChangeLog Mon Sep 29 14:16:29 2014 -0600
@@ -1,3 +1,12 @@
+2014-09-23  Jerry James  <james@xemacs.org>
+
+ * lazy-lock.el (lazy-lock-install-hooks): Append, rather than
+ prepend, lazy-lock-after-change to after-change-functions.
+ (lazy-lock-unstall): Ditto for font-lock-after-change-function.
+ * lazy-shot.el (lazy-shot-install): Ditto for
+ lazy-shot-after-change-function.
+ (lazy-shot-unstall): Ditto for font-lock-after-change-functions.
+
 2014-05-26  Norbert Koch  <viteno@xemacs.org>
 
  * Makefile (VERSION): XEmacs package 2.55 released.
diff -r e24f8c81c991 xemacs-packages/edit-utils/lazy-lock.el
--- a/xemacs-packages/edit-utils/lazy-lock.el Fri May 30 14:33:15 2014 +0200
+++ b/xemacs-packages/edit-utils/lazy-lock.el Mon Sep 29 14:16:29 2014 -0600
@@ -571,7 +571,7 @@
   ;; Replace Font Lock mode hook.
   (make-local-hook 'after-change-functions)
   (remove-hook 'after-change-functions 'font-lock-after-change-function t)
-  (add-hook 'after-change-functions 'lazy-lock-after-change nil t)
+  (add-hook 'after-change-functions 'lazy-lock-after-change t t)
 
   ;; FSF 21.2: Lots and lots of hooks here.  Hooks for `outline', hooks for
   ;; `hideshow', hooks for redisplay-end-triggers, window-size-changed, and
@@ -616,7 +616,7 @@
   (save-restriction
     (widen)
     (lazy-lock-fontify-region (point-min) (point-max))))))
-    (add-hook 'after-change-functions 'font-lock-after-change-function nil t))
+    (add-hook 'after-change-functions 'font-lock-after-change-function t t))
   ;;
   ;; Remove the text properties.
   (lazy-lock-after-unfontify-buffer)
diff -r e24f8c81c991 xemacs-packages/edit-utils/lazy-shot.el
--- a/xemacs-packages/edit-utils/lazy-shot.el Fri May 30 14:33:15 2014 +0200
+++ b/xemacs-packages/edit-utils/lazy-shot.el Mon Sep 29 14:16:29 2014 -0600
@@ -298,7 +298,7 @@
   ;; entire changed area.
   (remove-hook 'after-change-functions 'font-lock-after-change-function t)
   (make-local-hook 'after-change-functions)
-  (add-hook 'after-change-functions 'lazy-shot-after-change-function nil t))
+  (add-hook 'after-change-functions 'lazy-shot-after-change-function t t))
 
 ;; Kludge needed untill lazy-lock-fontify-region is more intelligent
 (defun lazy-shot-unstall-after-fontify ()
@@ -319,8 +319,7 @@
       (lazy-shot-fontify-region (point-min) (point-max))))
   (remove-hook 'after-change-functions 'lazy-shot-after-change-function t)
   (if font-lock-mode
-      (add-hook 'after-change-functions 'font-lock-after-change-function
- nil t)))
+      (add-hook 'after-change-functions 'font-lock-after-change-function t t)))
 
 (provide 'lazy-shot)
 

-- 
Jerry James
http://www.jamezone.org/