emacs-devel
[Top][All Lists]
Advanced

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

Re: line-move-visual never set to nil?


From: Richard M Stallman
Subject: Re: line-move-visual never set to nil?
Date: Tue, 29 Jul 2008 23:46:56 -0400

If a command normally moves by screen lines, making it do something
different in a keyboard macro is incorrect.

Why doesn't it work right in a keyboard macro?
Is this because it uses data structures that are updated
only by redisplay, and the keyboard macro does not redisplay?

If that is the cause, these functions also are no use for other Lisp
programs to call.  Even when the user types commands by hand, Emacs
may not redisplay if the machine falls behind.  Using those facilities
is the wrong implementation for these commands.

The right solution is to implement the TODO item of functions similar
to compute-motion, vertical-motion, and current-column, which take
account of the width and height of characters and operate on positions
expressed in floating point.  These functions should look only at the
buffer contents and the fonts, so they work regardless of whether
the text has been displayed lately.

If you implement these commands based on those functions, they will
work reliably no matter where they are called from.




reply via email to

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