emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] * src/editfns.c (Fchar_after): Small optimization.


From: Philipp Stephani
Subject: Re: [PATCH] * src/editfns.c (Fchar_after): Small optimization.
Date: Sun, 01 Oct 2017 16:30:23 +0000



Eli Zaretskii <address@hidden> schrieb am So., 1. Okt. 2017 um 17:04 Uhr:
> From: Philipp Stephani <address@hidden>
> Date: Sun,  1 Oct 2017 12:56:47 +0200
> Cc: Philipp Stephani <address@hidden>
>
> diff --git a/src/editfns.c b/src/editfns.c
> index e326604467..4dcf7cbe6e 100644
> --- a/src/editfns.c
> +++ b/src/editfns.c
> @@ -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)

LGTM, thanks.

Pushed as 66d37175ec to master. 

reply via email to

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