From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: C-n is very slow in Font-Lock mode Date: Wed, 27 Apr 2005 14:27:03 +0200 Message-ID: References: <01c54841$Blat.v2.4$8f503680@zahav.net.il> <01c54917$Blat.v2.4$b975aea0@zahav.net.il> <85r7gxkf3r.fsf@lola.goethe.zz> <01c54b0f$Blat.v2.4$a313bea0@zahav.net.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114604631 18379 80.91.229.2 (27 Apr 2005 12:23:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2005 12:23:51 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 27 14:23:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQlZ0-00060e-6b for ged-emacs-devel@m.gmane.org; Wed, 27 Apr 2005 14:22:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQlev-000495-0R for ged-emacs-devel@m.gmane.org; Wed, 27 Apr 2005 08:28:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQleT-00048p-IN for emacs-devel@gnu.org; Wed, 27 Apr 2005 08:28:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQleQ-000485-C8 for emacs-devel@gnu.org; Wed, 27 Apr 2005 08:28:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQleP-0003aK-W0 for emacs-devel@gnu.org; Wed, 27 Apr 2005 08:28:22 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1DQlgx-0003VA-5m for emacs-devel@gnu.org; Wed, 27 Apr 2005 08:30:59 -0400 Original-Received: (qmail 99212 invoked from network); 27 Apr 2005 12:27:08 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 27 Apr 2005 12:27:08 -0000 Original-To: Eli Zaretskii In-Reply-To: <01c54b0f$Blat.v2.4$a313bea0@zahav.net.il> (Eli Zaretskii's message of "Wed, 27 Apr 2005 12:57:15 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36447 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36447 "Eli Zaretskii" 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 * 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 * 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 http://www.cua.dk