]> code.delx.au - gnu-emacs/blobdiff - src/cmds.c
Update copyright year to 2015
[gnu-emacs] / src / cmds.c
index 20234638778ab22a6f722fc7efca2a27fcd193a7..485a235b5abd5bcbb714092a7128e4e222e6de43 100644 (file)
@@ -1,6 +1,6 @@
 /* Simple built-in editing commands.
 
-Copyright (C) 1985, 1993-1998, 2001-2014 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1998, 2001-2015 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -131,12 +131,7 @@ successfully moved (for the return value).  */)
       count = XINT (n);
     }
 
-  if (count <= 0)
-    pos = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, count - 1,
-                       &shortage, &pos_byte, 1);
-  else
-    pos = find_newline (PT, PT_BYTE, ZV, ZV_BYTE, count,
-                       &shortage, &pos_byte, 1);
+  shortage = scan_newline_from_point (count, &pos, &pos_byte);
 
   SET_PT_BOTH (pos, pos_byte);