all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Criticism of jit-lock--antiblink-post-command
@ 2019-11-26 19:52 Alan Mackenzie
  2019-11-26 20:51 ` Stefan Monnier
  2019-11-26 21:09 ` João Távora
  0 siblings, 2 replies; 9+ messages in thread
From: Alan Mackenzie @ 2019-11-26 19:52 UTC (permalink / raw)
  To: João Távora; +Cc: Eli Zaretskii, emacs-devel

Hello, João.

I've been taking a closer look at the jit-lock antiblink functionality,
and some things seem to want comment.

Firstly, jit-lock-antiblink-grace is tested for being nil, yet is
declared in its customization scheme only as a number.  Should it not
alternatively be customizable to nil instead of a number?  This would
enable a user to disable it without having to read the source code and
use a setq.  The variable's doc string should surely also document this
possibility.

You have mentioned that this antiblink is redundant when using things
like electric-pair-mode, in which case the mode merely slows down the
processing.  The same is true of CC Mode, where there are no
unterminated strings.  These are good reasons for making antiblink easy
to disable.

In jit-lock--antiblink-post-command, you create lots of markers, one per
command.  You don't do anything to get rid of them, beyond waiting for
the next garbage collection to do its work.  This could easily lead to
several hundred markers slowing down operations in a buffer.  Maybe.
Page "Overview of Markers" in the Elisp manual recommends making them
point nowhere when you have finished with them, using (set-marker m
nil).  Please consider doing this.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-27 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-26 19:52 Criticism of jit-lock--antiblink-post-command Alan Mackenzie
2019-11-26 20:51 ` Stefan Monnier
2019-11-27  4:45   ` Eli Zaretskii
2019-11-27 13:46     ` Stefan Monnier
2019-11-27 16:10       ` Eli Zaretskii
2019-11-26 21:09 ` João Távora
2019-11-27  5:54   ` Phil Sainty
2019-11-27  9:30     ` João Távora
2019-11-27 13:38       ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.