unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: C-n is very slow in Font-Lock mode
Date: Tue, 26 Apr 2005 12:27:20 +0200	[thread overview]
Message-ID: <85r7gxkf3r.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1DQMwn-0001uj-Ft@fencepost.gnu.org> (Richard Stallman's message of "Tue, 26 Apr 2005 06:05:41 -0400")

Richard Stallman <rms@gnu.org> writes:

>     > It turns out that vertical-motion was fontifying all the text that
>     > it moved over.  That seems to be easy to fix.
>
>     Did you try my suggestion of customizing jit-lock-defer-time?
>
> No, because I want to fix this, not work around it.  vertical-motion
> is a cursor motion function.  It should not fontify anything.

vertical-motion is a built-in function in `C source code'.
(vertical-motion LINES &optional WINDOW)

Move point to start of the screen line LINES lines down.
If LINES is negative, this means moving up.

This function is an ordinary cursor motion function
which calculates the new position based on how text would be displayed.
The new position may be the start of a line,
or just the start of a continuation line.

[...]

I don't see how vertical-motion can be expected to calculate the new
position based on how text would be displayed if it is not allowed to
figure out how text would be displayed.

So for its correct behavior, it is mandatory to do the font locking.
The only exception to that would be if the user would have specified
that it is ok to work with unfontified text.

One way to do that is to set jit-lock-defer-time.  I think it would be
reasonable if jit-lock-defer-time (currently defaulting to nil) would
instead default to 0, with 0 meaning that font locking will occur
without delay before displaying stuff, but not otherwise (maybe that
setting already does that, but I have not checked).

This would mean that paging back and forth over previously
nonfontified stuff would not necessarily lead to the same position,
but that still no surprisingly unfontified stuff would show up on the
display.

But with the current settings, it appears to me that vertical-motion
can't reasonably do something different.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-04-26 10:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-23 16:16 C-n is very slow in Font-Lock mode Richard Stallman
2005-04-23 20:17 ` Eli Zaretskii
2005-04-24 21:23   ` Richard Stallman
2005-04-24 21:50     ` Eli Zaretskii
2005-04-26 10:05       ` Richard Stallman
2005-04-26 10:27         ` David Kastrup [this message]
2005-04-26 22:56           ` Richard Stallman
2005-04-27  8:59             ` Kim F. Storm
2005-04-27  9:57               ` Eli Zaretskii
2005-04-27 12:27                 ` Kim F. Storm
2005-04-27  9:06             ` Eli Zaretskii
2005-04-28 11:00               ` Richard Stallman
2005-04-26 18:05         ` Eli Zaretskii
2005-04-26 21:38           ` David Kastrup
2005-04-26 22:43             ` Eli Zaretskii
2005-04-26 22:57               ` David Kastrup
2005-04-27  9:19                 ` Eli Zaretskii
2005-04-27  9:43                   ` David Kastrup
2005-04-27 10:17                     ` Eli Zaretskii
2005-04-27 11:32                       ` David Kastrup
2005-04-27 11:59                         ` Eli Zaretskii
2005-04-27 12:23                           ` David Kastrup
2005-04-27 12:32                           ` Kim F. Storm
2005-04-28 11:00                             ` Richard Stallman
2005-04-28 12:16                               ` David Kastrup
2005-04-28 11:00                         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85r7gxkf3r.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).