summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-01-24 02:31:24 +0000
committerKenichi Handa <handa@m17n.org>2003-01-24 02:31:24 +0000
commit2a026b0452500dff9772640365ff9a91510939ba (patch)
tree55d664f536edb6707eed5de4e9c74d83fa432f1a /src
parent175573acecde5135601d6dd915e014929fa9ffb1 (diff)
downloademacs-2a026b0452500dff9772640365ff9a91510939ba.tar.gz
(adjust_point_for_property): New second arg MODIFIED.
It it is nonzero, don't pretend that an invisible area doesn't exist. (command_loop_1): Call adjust_point_for_property with proper second arg.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/keyboard.c16
2 files changed, 17 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3a695bcee56..ad2da41b98c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2003-01-24 Kenichi Handa <handa@m17n.org>
+
+ * keyboard.c (adjust_point_for_property): New second arg MODIFIED.
+ It it is nonzero, don't pretend that an invisible area doesn't
+ exist.
+ (command_loop_1): Call adjust_point_for_property with proper
+ second arg.
+
2003-01-22 Jason Rumney <jasonr@gnu.org>
Sync changes with xterm.c and xfns.c.
diff --git a/src/keyboard.c b/src/keyboard.c
index d54dcd22bc4..dae9470f70c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1335,7 +1335,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
static int read_key_sequence P_ ((Lisp_Object *, int, Lisp_Object,
int, int, int));
void safe_run_hooks P_ ((Lisp_Object));
-static void adjust_point_for_property P_ ((int));
+static void adjust_point_for_property P_ ((int, int));
Lisp_Object
command_loop_1 ()
@@ -1587,7 +1587,7 @@ command_loop_1 ()
/* Put this before calling adjust_point_for_property
so it will only get called once in any case. */
goto directly_done;
- adjust_point_for_property (last_point_position);
+ adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position + 1
&& (dp
@@ -1621,7 +1621,7 @@ command_loop_1 ()
lose = FETCH_CHAR (PT_BYTE);
if (! NILP (Vpost_command_hook))
goto directly_done;
- adjust_point_for_property (last_point_position);
+ adjust_point_for_property (last_point_position, 0);
already_adjusted = 1;
if (PT == last_point_position - 1
&& (dp
@@ -1791,7 +1791,7 @@ command_loop_1 ()
&& NILP (Vdisable_point_adjustment)
&& NILP (Vglobal_disable_point_adjustment)
&& !already_adjusted)
- adjust_point_for_property (last_point_position);
+ adjust_point_for_property (last_point_position, MODIFF != prev_modiff);
/* Install chars successfully executed in kbd macro. */
@@ -1817,8 +1817,9 @@ extern Lisp_Object Qafter_string, Qbefore_string;
extern Lisp_Object get_pos_property P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
static void
-adjust_point_for_property (last_pt)
+adjust_point_for_property (last_pt, modified)
int last_pt;
+ int modified;
{
int beg, end;
Lisp_Object val, overlay, tmp;
@@ -1894,8 +1895,9 @@ adjust_point_for_property (last_pt)
check_composition = check_display = 1;
}
xassert (PT == beg || PT == end);
- /* Pretend the area doesn't exist. */
- if (!ellipsis && beg < end)
+ /* Pretend the area doesn't exist if the buffer is not
+ modified. */
+ if (!modified && !ellipsis && beg < end)
{
if (last_pt == beg && PT == end && end < ZV)
(check_composition = check_display = 1, SET_PT (end + 1));