# HG changeset patch # User Richard M. Stallman # Date 903233456 0 # Node ID f4262c9a21ddf8ef298310944966b5631e6458da # Parent 10ad03c5d326e3ffada6396a543003a5266a7c04 (vmotion): Don't use WINDOW for Fget_char_property when it is not showing the right buffer. diff -r 10ad03c5d326 -r f4262c9a21dd src/indent.c --- a/src/indent.c Sun Aug 16 02:10:25 1998 +0000 +++ b/src/indent.c Sun Aug 16 02:10:56 1998 +0000 @@ -1641,6 +1641,8 @@ Lisp_Object window; int start_hpos = 0; int did_motion; + /* This is the object we use for fetching character properties. */ + Lisp_Object text_prop_object; XSETWINDOW (window, w); @@ -1657,6 +1659,13 @@ start_hpos = minibuf_prompt_width; } + /* If the window contains this buffer, use it for getting text properties. + Otherwise use the current buffer as arg for doing that. */ + if (EQ (w->buffer, Fcurrent_buffer ())) + text_prop_object = window; + else + text_prop_object = Fcurrent_buffer (); + if (vpos >= vtarget) { /* To move upward, go a line at a time until @@ -1678,7 +1687,7 @@ /* watch out for newlines with `invisible' property */ || (propval = Fget_char_property (prevline, Qinvisible, - window), + text_prop_object), TEXT_PROP_MEANS_INVISIBLE (propval)) #endif )) @@ -1740,7 +1749,7 @@ #ifdef USE_TEXT_PROPERTIES /* watch out for newlines with `invisible' property */ || (propval = Fget_char_property (prevline, Qinvisible, - window), + text_prop_object), TEXT_PROP_MEANS_INVISIBLE (propval)) #endif ))