emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-n is very slow in Font-Lock mode


From: Kim F. Storm
Subject: Re: C-n is very slow in Font-Lock mode
Date: Wed, 27 Apr 2005 14:27:03 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Eli Zaretskii" <address@hidden> writes:

>> From: address@hidden (Kim F. Storm)
>> Date: Wed, 27 Apr 2005 10:59:39 +0200
>> Cc: address@hidden, address@hidden
>> 
>> 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  <address@hidden>

          * 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  <address@hidden>

        * 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 <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]