# HG changeset patch # User Richard M. Stallman # Date 788203550 0 # Node ID 1817c533231668165b4a5ae9b4b55942e03ff435 # Parent 2e5dcd5f309088181f2c30c6791c773c33f80ac1 (next-line, previous-line): If interactive and not in kbd macro, catch the error and beep instead. diff -r 2e5dcd5f3090 -r 1817c5332316 lisp/simple.el --- a/lisp/simple.el Fri Dec 23 15:11:57 1994 +0000 +++ b/lisp/simple.el Fri Dec 23 17:25:50 1994 +0000 @@ -1535,9 +1535,9 @@ the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. If there is no line in the buffer after this one, behavior depends on the -value of next-line-add-newlines. If non-nil, a newline character is inserted -to create a line and the cursor moves to that line, otherwise the cursor is -moved to the end of the buffer (if already at the end of the buffer, an error +value of `next-line-add-newlines'. If non-nil, it inserts a newline character +to create a line, and moves the cursor to that line. Otherwise it moves the +cursor to the end of the buffer (if already at the end of the buffer, an error is signaled). The command \\[set-goal-column] can be used to create @@ -1556,7 +1556,11 @@ (insert ?\n) (goto-char opoint) (line-move arg))) - (line-move arg)) + (if (interactive-p) + (condition-case nil + (line-move arg) + ((beginning-of-buffer end-of-buffer) (ding))) + (line-move arg))) nil) (defun previous-line (arg) @@ -1573,7 +1577,11 @@ `forward-line' with a negative argument instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." (interactive "p") - (line-move (- arg)) + (if (interactive-p) + (condition-case nil + (line-move (- arg)) + ((beginning-of-buffer end-of-buffer) (ding))) + (line-move (- arg))) nil) (defconst track-eol nil