summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-09-15 04:06:55 +0000
committerRichard M. Stallman <rms@gnu.org>1994-09-15 04:06:55 +0000
commitf82710e9e98ccdc9637c9b00f61ec09ac6af3d30 (patch)
treef41952e5a257e1c8f2f789ae4612475cbe86603a /src/cmds.c
parent51af4208e248963ce971c67d75bb97899044a51d (diff)
downloademacs-f82710e9e98ccdc9637c9b00f61ec09ac6af3d30.tar.gz
Include window.h.
(Fnewline): Inhibit the insert-at-end-of-line hack when at the top of the window.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmds.c b/src/cmds.c
index a3f23c7ac02..49998adbf50 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -23,6 +23,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "commands.h"
#include "buffer.h"
#include "syntax.h"
+#include "window.h"
Lisp_Object Qkill_forward_chars, Qkill_backward_chars, Vblink_paren_function;
@@ -253,6 +254,11 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long.")
features all do nothing in that case. */
flag = point > BEGV && FETCH_CHAR (point - 1) == '\n';
+ /* Don't do this if at the beginning of the window. */
+ if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer
+ && marker_position (XWINDOW (selected_window)->start) == PT)
+ flag = 0;
+
#ifdef USE_TEXT_PROPERTIES
/* We cannot use this optimization if properties change
in the vicinity.