PATCH packages (edit-utils)
On Mon, Aug 11, 2014 at 9:15 AM, Jerry James <james(a)xemacs.org> wrote:
I use cc-mode's electric behavior, which is great, except that
whenever I
type a '}' as the last character in a buffer, I get something like this:
[snip]
So the bug is in, I think, xemacs-packages/edit-utils/lazy-lock.el,
which
does this:
(add-hook 'after-change-functions 'lazy-lock-after-change nil t)
when I think it should be doing this:
(add-hook 'after-change-functions 'lazy-lock-after-change t t)
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.
diff -r e24f8c81c991 ChangeLog
--- a/ChangeLog Fri May 30 14:33:15 2014 +0200
+++ b/ChangeLog Fri Aug 15 10:45:56 2014 -0600
@@ -1,3 +1,8 @@
+2014-08-15 Jerry James <james(a)xemacs.org>
+
+ * lazy-lock.el (lazy-lock-install-hooks): Append, rather than
+ prepend, lazy-lock-after-change to after-change-functions.
+
2014-05-26 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.55 released.
diff -r e24f8c81c991 lazy-lock.el
--- a/lazy-lock.el Fri May 30 14:33:15 2014 +0200
+++ b/lazy-lock.el Fri Aug 15 10:45:56 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
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches