unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Something is rotten with end-of-line and move-end-of-line
@ 2005-11-25  1:09 David Kastrup
  2005-11-28  4:46 ` Richard M. Stallman
  0 siblings, 1 reply; 16+ messages in thread
From: David Kastrup @ 2005-11-25  1:09 UTC (permalink / raw)



Here are the online docs:

move-end-of-line is an interactive compiled Lisp function in `simple.el'.
It is bound to C-e, <end>.
(move-end-of-line ARG)

Move point to end of current line.
With argument ARG not nil or 1, move forward ARG - 1 lines first.
If point reaches the beginning or end of buffer, it stops there.
To ignore intangibility, bind `inhibit-point-motion-hooks' to t.

This command does not move point across a field boundary unless doing so
would move beyond there to a different line; if ARG is nil or 1, and
point starts at a field boundary, point does not move.  To ignore field
boundaries bind `inhibit-field-text-motion' to t.

[back]

end-of-line is an interactive built-in function in `C source code'.
(end-of-line &optional N)

Move point to end of current line.
With argument N not nil or 1, move forward N - 1 lines first.
If point reaches the beginning or end of buffer, it stops there.
To ignore intangibility, bind `inhibit-point-motion-hooks' to t.

This command does not move point across a field boundary unless doing so
would move beyond there to a different line; if N is nil or 1, and
point starts at a field boundary, point does not move.  To ignore field
boundaries bind `inhibit-field-text-motion' to t.


Apart from the argument names, both functions have identical
descriptions.  However, move-end-of-line is quite complicated and
implemented in Lisp.  The DOC strings don't give the slightest clue
about what might be different.  It appears like move-end-of-line
(which is bound to C-e) might have been intended for interactive use
and behaves special with regard to field boundaries.  However, since
end-of-line-position and other things seem to behave special, too,
according to their docs, it would appear that both tend to do the same
thing, but differently.

Personally, I'd prefer to have functions typically used in programs
(like end-of-line-position and end-of-line) rather not heed field
boundaries in order to save programmers from unexpected surprises.

However this is supposed to be resolved: it does not appear to make
much sense to have both move-end-of-line as well as end-of-line do
exactly the same thing, one in Lisp, one in C.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-11-29  9:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-25  1:09 Something is rotten with end-of-line and move-end-of-line David Kastrup
2005-11-28  4:46 ` Richard M. Stallman
2005-11-28 11:35   ` David Kastrup
2005-11-28 19:52     ` Eli Zaretskii
2005-11-28 21:01     ` Richard M. Stallman
2005-11-28 16:10   ` Lőrentey Károly
2005-11-28 16:13     ` Lőrentey Károly
2005-11-28 16:53       ` David Kastrup
2005-11-28 20:17         ` Lőrentey Károly
2005-11-28 21:46           ` David Kastrup
2005-11-28 22:39             ` Lőrentey Károly
2005-11-28 23:10               ` David Kastrup
2005-11-28 22:24           ` Lőrentey Károly
2005-11-29  3:11           ` Richard M. Stallman
2005-11-29  9:41             ` Lőrentey Károly
2005-11-29  3:11     ` Richard M. Stallman

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).