unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: C-n is very slow in Font-Lock mode
Date: Wed, 27 Apr 2005 14:27:03 +0200	[thread overview]
Message-ID: <m3u0lswgko.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <01c54b0f$Blat.v2.4$a313bea0@zahav.net.il> (Eli Zaretskii's message of "Wed, 27 Apr 2005 12:57:15 +0300")

"Eli Zaretskii" <eliz@gnu.org> writes:

>> From: storm@cua.dk (Kim F. Storm)
>> Date: Wed, 27 Apr 2005 10:59:39 +0200
>> Cc: eliz@gnu.org, emacs-devel@gnu.org
>> 
>> The code has used vertical-motion since CVS revision 1.1 (Dec. 1991),
>> and I don't see anything relevant in the older ChangeLogs, so who knows?
>
> "cvs annotate" tells more; see my other message in this thread.  I
> found that ChangeLog entry using annotate's information.

So did I :-)

I ended up with line-move from simple.el rev 1.1:

(defun line-move (arg)
  (if (not (or (eq last-command 'next-line)
	       (eq last-command 'previous-line)))
      (setq temporary-goal-column
	    (if (and track-eol (eolp)
		     ;; Don't count beg of empty line as end of line
		     ;; unless we just did explicit end-of-line.
		     (or (not (bolp)) (eq last-command 'end-of-line)))
		9999
	      (current-column))))
  (if (not (integerp selective-display))
      (forward-line arg)
    ;; Move by arg lines, but ignore invisible ones.
    (while (> arg 0)
      (vertical-motion 1)
      (forward-char -1)
      (forward-line 1)
      (setq arg (1- arg)))
    (while (< arg 0)
      (vertical-motion -1)
      (beginning-of-line)
      (setq arg (1+ arg))))
  (move-to-column (or goal-column temporary-goal-column))
  nil)

This shows that line-move has always(?) used vertical-motion as the
basic method to skip invisible text.

Richard's change that you refer to:

  1995-03-09  Richard Stallman  <rms@pogo.gnu.ai.mit.edu>

	  * simple.el (line-move-ignore-invisible): New variable.
	  (line-move): If that var is set, use vertical-motion.
	  Skip any extra invis chars beyond where vertical-motion stops.

just introduced line-move-ignore-invisible to control whether 
(the existing) vertical-motion is called at all.


A later change to line-move introduced the explicit checking for
invisible text using line-move-invisible-p.

2001-12-28  Richard M. Stallman  <rms@gnu.org>

	* simple.el (line-move-invisible): New subroutine.
	(line-move-to-column): New subroutine--smarter about advancing over
	invisible parts of a line, or lines, but only as long as hpos grows.
	(line-move-finish): New subroutine: repeatedly processes desired
	column, intangibility, and fields.
	(line-move): Use those subroutines.
	When moving lines downward, skip invisible text first rather than last.

Perhaps as a result of that change, vertical-motion is no longer
needed in line-move, as it is(?) only called when there is no
invisible text "around" point.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2005-04-27 12: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
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 [this message]
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=m3u0lswgko.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --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).