From: Dmitry Antipov <dmantipov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: region_limit fix
Date: Fri, 29 Jun 2012 21:47:00 +0400 [thread overview]
Message-ID: <4FEDEA14.1020102@yandex.ru> (raw)
In-Reply-To: <jwvy5n6ysix.fsf-monnier+emacs@gnu.org>
On 06/29/2012 08:48 PM, Stefan Monnier wrote:
>> return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : m);
> ^^^
> mark
>> Lisp_Object 'm' is compared with ptrdiff_t.
>
> Indeed, thank you for catching and fixing it. I need to change my
> config to use the new struct-lisp-type, obviously.
BTW, shouldn't we use clip_to_bounds here? E.g.:
--- src/editfns.c 2012-06-29 02:19:32 +0000
+++ src/editfns.c 2012-06-29 02:42:27 +0000
@@ -284,11 +284,8 @@
if ((PT < XFASTINT (m)) == (beginningp != 0))
return make_number (PT);
- else
- { /* Clip to the current narrowing (bug#11770). */
- ptrdiff_t mark = XFASTINT (m);
- return make_number (mark < BEGV ? BEGV : mark > ZV ? ZV : mark);
- }
+ /* Clip to the current narrowing (bug#11770). */
+ return make_number (clip_to_bounds (BEGV, XFASTINT (m), ZV));
}
Dmitry
next prev parent reply other threads:[~2012-06-29 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 2:29 region_limit fix Dmitry Antipov
2012-06-29 16:48 ` Stefan Monnier
2012-06-29 17:47 ` Dmitry Antipov [this message]
2012-06-30 4:09 ` Stefan Monnier
2012-07-05 16:01 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FEDEA14.1020102@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.