]> git.eshelyaron.com Git - emacs.git/commitdiff
(pos_visible_p): Return 0 if non-interactive.
authorKim F. Storm <storm@cua.dk>
Sat, 22 Jan 2005 23:55:00 +0000 (23:55 +0000)
committerKim F. Storm <storm@cua.dk>
Sat, 22 Jan 2005 23:55:00 +0000 (23:55 +0000)
src/xdisp.c

index a2f687cfb8734636dce04ef23eb9ae13c49db5f9..17ee38f6fc054e625ca773944708ede4e7e31f63 100644 (file)
@@ -1256,16 +1256,18 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p)
 {
   struct it it;
   struct text_pos top;
-  int visible_p;
+  int visible_p = 0;
   struct buffer *old_buffer = NULL;
 
+  if (noninteractive)
+    return visible_p;
+
   if (XBUFFER (w->buffer) != current_buffer)
     {
       old_buffer = current_buffer;
       set_buffer_internal_1 (XBUFFER (w->buffer));
     }
 
-  visible_p = 0;
   SET_TEXT_POS_FROM_MARKER (top, w->start);
 
   /* Compute exact mode line heights, if requested.  */