]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/editfns.c (Fchar_after): Small optimization.
authorPhilipp Stephani <phst@google.com>
Sat, 30 Sep 2017 18:40:02 +0000 (20:40 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 1 Oct 2017 16:29:40 +0000 (18:29 +0200)
src/editfns.c

index e326604467cb59692527b584a4aea239faab3062..4dcf7cbe6efcd3969f105457dc67ce2923dfa811 100644 (file)
@@ -1256,10 +1256,10 @@ If POS is out of range, the value is nil.  */)
   if (NILP (pos))
     {
       pos_byte = PT_BYTE;
-      XSETFASTINT (pos, PT);
+      if (pos_byte < BEGV_BYTE || pos_byte >= ZV_BYTE)
+        return Qnil;
     }
-
-  if (MARKERP (pos))
+  else if (MARKERP (pos))
     {
       pos_byte = marker_byte_position (pos);
       if (pos_byte < BEGV_BYTE || pos_byte >= ZV_BYTE)