From d63b401895577d448ecee8c31ac20b6f693de14d Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 5 Feb 2006 12:15:02 +0000 Subject: (Fconstrain_to_field): Fix int/Lisp_Object mixup. --- src/editfns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/editfns.c') diff --git a/src/editfns.c b/src/editfns.c index 9be9232a9c7..5bf4eb738ae 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -719,7 +719,8 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) { /* If non-zero, then the original point, before re-positioning. */ int orig_point = 0; - int fwd, prev_old, prev_new; + int fwd; + Lisp_Object prev_old, prev_new; if (NILP (new_pos)) /* Use the current point, and afterwards, set it. */ -- cgit v1.2.1 From aaef169dc63c4b557374540756865991e1bf6305 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 6 Feb 2006 15:23:23 +0000 Subject: Update years in copyright notice; nfc. --- src/editfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/editfns.c') diff --git a/src/editfns.c b/src/editfns.c index 5bf4eb738ae..37fe0f76752 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1,7 +1,7 @@ /* Lisp functions pertaining to editing. Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005 Free Software Foundation, Inc. + 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. -- cgit v1.2.1 From 42ab8e36acd651b047b82658802cbff53474dcaa Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Tue, 7 Feb 2006 09:08:53 +0000 Subject: Revision: emacs@sv.gnu.org/emacs--devo--0--patch-51 Make constrain-to-field notice overlays 2006-02-08 Miles Bader * src/editfns.c (Fconstrain_to_field): Use Fget_char_property instead of Fget_text_property (other field functions word with overlays as well as text-properties). --- src/editfns.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/editfns.c') diff --git a/src/editfns.c b/src/editfns.c index 37fe0f76752..b621397eda3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -739,24 +739,24 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) if (NILP (Vinhibit_field_text_motion) && !EQ (new_pos, old_pos) - && (!NILP (Fget_text_property (new_pos, Qfield, Qnil)) - || !NILP (Fget_text_property (old_pos, Qfield, Qnil)) + && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) + || !NILP (Fget_char_property (old_pos, Qfield, Qnil)) /* To recognize field boundaries, we must also look at the previous positions; we could use `get_pos_property' instead, but in itself that would fail inside non-sticky fields (like comint prompts). */ || (XFASTINT (new_pos) > BEGV - && !NILP (Fget_text_property (prev_new, Qfield, Qnil))) + && !NILP (Fget_char_property (prev_new, Qfield, Qnil))) || (XFASTINT (old_pos) > BEGV - && !NILP (Fget_text_property (prev_old, Qfield, Qnil)))) + && !NILP (Fget_char_property (prev_old, Qfield, Qnil)))) && (NILP (inhibit_capture_property) /* Field boundaries are again a problem; but now we must decide the case exactly, so we need to call `get_pos_property' as well. */ || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil)) && (XFASTINT (old_pos) <= BEGV - || NILP (Fget_text_property (old_pos, inhibit_capture_property, Qnil)) - || NILP (Fget_text_property (prev_old, inhibit_capture_property, Qnil)))))) + || NILP (Fget_char_property (old_pos, inhibit_capture_property, Qnil)) + || NILP (Fget_char_property (prev_old, inhibit_capture_property, Qnil)))))) /* It is possible that NEW_POS is not within the same field as OLD_POS; try to move NEW_POS so that it is. */ { -- cgit v1.2.1