emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c [lexbind]
Date: Sat, 04 Sep 2004 05:39:56 -0400

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.754.2.28 emacs/src/xdisp.c:1.754.2.29
*** emacs/src/xdisp.c:1.754.2.28        Sat Sep  4 09:26:26 2004
--- emacs/src/xdisp.c   Sat Sep  4 09:28:15 2004
***************
*** 306,311 ****
--- 306,312 ----
  extern Lisp_Object Qheight;
  extern Lisp_Object QCwidth, QCheight, QCascent;
  extern Lisp_Object Qscroll_bar;
+ extern Lisp_Object Qcursor;
  
  /* Non-nil means highlight trailing whitespace.  */
  
***************
*** 10647,10652 ****
--- 10648,10654 ----
  {
    struct glyph *glyph = row->glyphs[TEXT_AREA];
    struct glyph *end = glyph + row->used[TEXT_AREA];
+   struct glyph *cursor = NULL;
    /* The first glyph that starts a sequence of glyphs from string.  */
    struct glyph *string_start;
    /* The X coordinate of string_start.  */
***************
*** 10656,10661 ****
--- 10658,10664 ----
    /* The last known character position before string_start.  */
    int string_before_pos;
    int x = row->x;
+   int cursor_x = x;
    int pt_old = PT - delta;
  
    /* Skip over glyphs not having an object at the start of the row.
***************
*** 10688,10699 ****
          string_start = glyph;
          string_start_x = x;
          /* Skip all glyphs from string.  */
!         SKIP_GLYPHS (glyph, end, x, STRINGP (glyph->object));
        }
      }
  
!   if (string_start
!       && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
      {
        /* We may have skipped over point because the previous glyphs
         are from string.  As there's no easy way to know the
--- 10691,10719 ----
          string_start = glyph;
          string_start_x = x;
          /* Skip all glyphs from string.  */
!         do
!           {
!             if ((cursor == NULL || glyph > cursor)
!                 && !NILP (Fget_char_property (make_number ((glyph)->charpos),
!                                               Qcursor, (glyph)->object)))
!               {
!                 cursor = glyph;
!                 cursor_x = x;
!               }
!             x += glyph->pixel_width;
!             ++glyph;
!           }
!         while (glyph < end && STRINGP (glyph->object));
        }
      }
  
!   if (cursor != NULL)
!     {
!       glyph = cursor;
!       x = cursor_x;
!     }
!   else if (string_start
!          && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old))
      {
        /* We may have skipped over point because the previous glyphs
         are from string.  As there's no easy way to know the
***************
*** 11085,11092 ****
          start_display (&it, w, startp);
  
          if (scroll_conservatively)
!           amount_to_scroll =
!             max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, 
temp_scroll_step));
          else if (scroll_step || temp_scroll_step)
            amount_to_scroll = scroll_max;
          else
--- 11105,11112 ----
          start_display (&it, w, startp);
  
          if (scroll_conservatively)
!           amount_to_scroll
!             = max (dy, FRAME_LINE_HEIGHT (f) * max (scroll_step, 
temp_scroll_step));
          else if (scroll_step || temp_scroll_step)
            amount_to_scroll = scroll_max;
          else
***************
*** 11365,11372 ****
          else if (PT < XFASTINT (w->last_point))
            {
              /* Cursor has to be moved backward.  Note that PT >=
!                CHARPOS (startp) because of the outer
!                if-statement.  */
              while (!row->mode_line_p
                     && (MATRIX_ROW_START_CHARPOS (row) > PT
                         || (MATRIX_ROW_START_CHARPOS (row) == PT
--- 11385,11391 ----
          else if (PT < XFASTINT (w->last_point))
            {
              /* Cursor has to be moved backward.  Note that PT >=
!                CHARPOS (startp) because of the outer if-statement.  */
              while (!row->mode_line_p
                     && (MATRIX_ROW_START_CHARPOS (row) > PT
                         || (MATRIX_ROW_START_CHARPOS (row) == PT
***************
*** 11878,11885 ****
             buffer.  */
          || !NILP (Vwindow_scroll_functions)
          || MINI_WINDOW_P (w)
!         || !(used_current_matrix_p =
!              try_window_reusing_current_matrix (w)))
        {
          IF_DEBUG (debug_method_add (w, "1"));
          try_window (window, startp);
--- 11897,11904 ----
             buffer.  */
          || !NILP (Vwindow_scroll_functions)
          || MINI_WINDOW_P (w)
!         || !(used_current_matrix_p
!              = try_window_reusing_current_matrix (w)))
        {
          IF_DEBUG (debug_method_add (w, "1"));
          try_window (window, startp);
***************
*** 12008,12015 ****
        || !NILP (Vwindow_scroll_functions)
        || !just_this_one_p
        || MINI_WINDOW_P (w)
!       || !(used_current_matrix_p =
!          try_window_reusing_current_matrix (w)))
      try_window (window, startp);
  
    /* If new fonts have been loaded (due to fontsets), give up.  We
--- 12027,12034 ----
        || !NILP (Vwindow_scroll_functions)
        || !just_this_one_p
        || MINI_WINDOW_P (w)
!       || !(used_current_matrix_p
!          = try_window_reusing_current_matrix (w)))
      try_window (window, startp);
  
    /* If new fonts have been loaded (due to fontsets), give up.  We
***************
*** 15674,15680 ****
     The mode_line_string_face face property is always added to the string.
   */
  
! static int store_mode_line_string (string, lisp_string, copy_string, 
field_width, precision, props)
       char *string;
       Lisp_Object lisp_string;
       int copy_string;
--- 15693,15700 ----
     The mode_line_string_face face property is always added to the string.
   */
  
! static int
! store_mode_line_string (string, lisp_string, copy_string, field_width, 
precision, props)
       char *string;
       Lisp_Object lisp_string;
       int copy_string;
***************
*** 15786,15817 ****
  
    if (NILP (format) || EQ (format, Qt))
      {
!       face_id = NILP (format)
!       ? CURRENT_MODE_LINE_FACE_ID (w) :
!       HEADER_LINE_FACE_ID;
!       format = NILP (format)
!       ? current_buffer->mode_line_format
!       : current_buffer->header_line_format;
      }
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
  
    if (NILP (no_props))
      {
!       mode_line_string_face =
!       (face_id == MODE_LINE_FACE_ID ? Qmode_line :
!        face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive :
!        face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);
! 
!       mode_line_string_face_prop =
!       NILP (mode_line_string_face) ? Qnil :
!       Fcons (Qface, Fcons (mode_line_string_face, Qnil));
  
        /* We need a dummy last element in mode_line_string_list to
         indicate we are building the propertized mode-line string.
         Using mode_line_string_face_prop here GC protects it.  */
!       mode_line_string_list =
!       Fcons (mode_line_string_face_prop, Qnil);
        frame_title_ptr = NULL;
      }
    else
--- 15806,15837 ----
  
    if (NILP (format) || EQ (format, Qt))
      {
!       face_id = (NILP (format)
!                ? CURRENT_MODE_LINE_FACE_ID (w)
!                : HEADER_LINE_FACE_ID);
!       format = (NILP (format)
!               ? current_buffer->mode_line_format
!               : current_buffer->header_line_format);
      }
  
    init_iterator (&it, w, -1, -1, NULL, face_id);
  
    if (NILP (no_props))
      {
!       mode_line_string_face
!       = (face_id == MODE_LINE_FACE_ID ? Qmode_line
!          : face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive
!          : face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil);
! 
!       mode_line_string_face_prop
!       = (NILP (mode_line_string_face) ? Qnil
!          : Fcons (Qface, Fcons (mode_line_string_face, Qnil)));
  
        /* We need a dummy last element in mode_line_string_list to
         indicate we are building the propertized mode-line string.
         Using mode_line_string_face_prop here GC protects it.  */
!       mode_line_string_list
!       = Fcons (mode_line_string_face_prop, Qnil);
        frame_title_ptr = NULL;
      }
    else
***************
*** 20892,20898 ****
  
    if (part == ON_VERTICAL_BORDER)
      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!   else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE)
      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
    else
      cursor = FRAME_X_OUTPUT (f)->text_cursor;
--- 20912,20919 ----
  
    if (part == ON_VERTICAL_BORDER)
      cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor;
!   else if (part == ON_LEFT_FRINGE || part == ON_RIGHT_FRINGE
!          || part == ON_SCROLL_BAR)
      cursor = FRAME_X_OUTPUT (f)->nontext_cursor;
    else
      cursor = FRAME_X_OUTPUT (f)->text_cursor;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]