emacs-pretest-bug
[Top][All Lists]
Advanced

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

next-line is non-deterministic


From: Juri Linkov
Subject: next-line is non-deterministic
Date: Thu, 17 Mar 2005 17:52:23 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

next-line behaves differently in the same buffer position.

For example, insert the following two lines into an empty buffer:

abc
defghi

When the point is at the beginning of the buffer, then the expression

(progn (move-end-of-line 1) (next-line 1))

produces different results depending on the method of moving the point
to the beginning of the buffer before evaluating this expression.

1. When the point was moved with `beginning-of-buffer' (`M-<')
   then M-: (progn (move-end-of-line 1) (next-line 1)) RET
   moves the point to the third column of the second line.

2. When the point was moved with `C-a' and `C-p'
   then M-: (progn (move-end-of-line 1) (next-line 1)) RET
   moves the point to the beginning of the second line.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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