/[emacs]/emacs/src/xdisp.c
ViewVC logotype

Diff of /emacs/src/xdisp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.754.2.29 by miles, Sat Sep 4 09:28:15 2004 UTC revision 1.754.2.30 by miles, Thu Sep 16 00:12:26 2004 UTC
# Line 10659  set_cursor_from_row (w, row, matrix, del Line 10659  set_cursor_from_row (w, row, matrix, del
10659    int string_before_pos;    int string_before_pos;
10660    int x = row->x;    int x = row->x;
10661    int cursor_x = x;    int cursor_x = x;
10662      int cursor_from_overlay_pos = 0;
10663    int pt_old = PT - delta;    int pt_old = PT - delta;
10664    
10665    /* Skip over glyphs not having an object at the start of the row.    /* Skip over glyphs not having an object at the start of the row.
# Line 10684  set_cursor_from_row (w, row, matrix, del Line 10685  set_cursor_from_row (w, row, matrix, del
10685            string_start = NULL;            string_start = NULL;
10686            x += glyph->pixel_width;            x += glyph->pixel_width;
10687            ++glyph;            ++glyph;
10688              if (cursor_from_overlay_pos
10689                  && last_pos > cursor_from_overlay_pos)
10690                {
10691                  cursor_from_overlay_pos = 0;
10692                  cursor = 0;
10693                }
10694          }          }
10695        else        else
10696          {          {
# Line 10693  set_cursor_from_row (w, row, matrix, del Line 10700  set_cursor_from_row (w, row, matrix, del
10700            /* Skip all glyphs from string.  */            /* Skip all glyphs from string.  */
10701            do            do
10702              {              {
10703                  int pos;
10704                if ((cursor == NULL || glyph > cursor)                if ((cursor == NULL || glyph > cursor)
10705                    && !NILP (Fget_char_property (make_number ((glyph)->charpos),                    && !NILP (Fget_char_property (make_number ((glyph)->charpos),
10706                                                  Qcursor, (glyph)->object)))                                                  Qcursor, (glyph)->object))
10707                      && (pos = string_buffer_position (w, glyph->object,
10708                                                        string_before_pos),
10709                          (pos == 0   /* From overlay */
10710                           || pos == pt_old)))
10711                  {                  {
10712                      /* Estimate overlay buffer position from the buffer
10713                         positions of the glyphs before and after the overlay.
10714                         Add 1 to last_pos so that if point corresponds to the
10715                         glyph right after the overlay, we still use a 'cursor'
10716                         property found in that overlay.  */
10717                      cursor_from_overlay_pos = pos == 0 ? last_pos+1 : 0;
10718                    cursor = glyph;                    cursor = glyph;
10719                    cursor_x = x;                    cursor_x = x;
10720                  }                  }
# Line 15776  store_mode_line_string (string, lisp_str Line 15794  store_mode_line_string (string, lisp_str
15794    
15795    
15796  DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,  DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
15797         0, 3, 0,         0, 4, 0,
15798         doc: /* Return the mode-line of selected window as a string.         doc: /* Return the mode-line of selected window as a string.
15799  First optional arg FORMAT specifies a different format string (see  First optional arg FORMAT specifies a different format string (see
15800  `mode-line-format' for details) to use.  If FORMAT is t, return  `mode-line-format' for details) to use.  If FORMAT is t, return
15801  the buffer's header-line.  Second optional arg WINDOW specifies a  the buffer's header-line.  Second optional arg WINDOW specifies a
15802  different window to use as the context for the formatting.  different window to use as the context for the formatting.
15803  If third optional arg NO-PROPS is non-nil, string is not propertized.  */)  If third optional arg NO-PROPS is non-nil, string is not propertized.
15804       (format, window, no_props)  Fourth optional arg BUFFER specifies which buffer to use.  */)
15805       Lisp_Object format, window, no_props;    (format, window, no_props, buffer)
15806         Lisp_Object format, window, no_props, buffer;
15807  {  {
15808    struct it it;    struct it it;
15809    int len;    int len;
# Line 15796  If third optional arg NO-PROPS is non-ni Line 15815  If third optional arg NO-PROPS is non-ni
15815      window = selected_window;      window = selected_window;
15816    CHECK_WINDOW (window);    CHECK_WINDOW (window);
15817    w = XWINDOW (window);    w = XWINDOW (window);
   CHECK_BUFFER (w->buffer);  
15818    
15819    if (XBUFFER (w->buffer) != current_buffer)    if (NILP (buffer))
15820        buffer = w->buffer;
15821    
15822      CHECK_BUFFER (buffer);
15823    
15824      if (XBUFFER (buffer) != current_buffer)
15825      {      {
15826        old_buffer = current_buffer;        old_buffer = current_buffer;
15827        set_buffer_internal_1 (XBUFFER (w->buffer));        set_buffer_internal_1 (XBUFFER (buffer));
15828      }      }
15829    
15830    if (NILP (format) || EQ (format, Qt))    if (NILP (format) || EQ (format, Qt))

Legend:
Removed from v.1.754.2.29  
changed lines
  Added in v.1.754.2.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26