Mercurial > emacs
comparison src/xdisp.c @ 90614:8dd8c8286063
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 460-475)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 145-152)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 15 Oct 2006 02:54:13 +0000 |
parents | bb0e318b7c53 1504e6546638 |
children | 93ead736a6ac |
comparison
equal
deleted
inserted
replaced
90613:7a2fdfcc7f71 | 90614:8dd8c8286063 |
---|---|
1353 struct it it2; | 1353 struct it it2; |
1354 | 1354 |
1355 it2 = it; | 1355 it2 = it; |
1356 if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n') | 1356 if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n') |
1357 move_it_by_lines (&it, 1, 0); | 1357 move_it_by_lines (&it, 1, 0); |
1358 if (charpos < IT_CHARPOS (it)) | 1358 if (charpos < IT_CHARPOS (it) |
1359 || (it.what == IT_EOB && charpos == IT_CHARPOS (it))) | |
1359 { | 1360 { |
1360 visible_p = 1; | 1361 visible_p = 1; |
1361 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); | 1362 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); |
1362 *x = it2.current_x; | 1363 *x = it2.current_x; |
1363 *y = it2.current_y + it2.max_ascent - it2.ascent; | 1364 *y = it2.current_y + it2.max_ascent - it2.ascent; |
17821 case 'b': | 17822 case 'b': |
17822 obj = b->name; | 17823 obj = b->name; |
17823 break; | 17824 break; |
17824 | 17825 |
17825 case 'c': | 17826 case 'c': |
17826 { | 17827 /* %c and %l are ignored in `frame-title-format'. |
17827 int col = (int) current_column (); /* iftc */ | 17828 (In redisplay_internal, the frame title is drawn _before_ the |
17828 w->column_number_displayed = make_number (col); | 17829 windows are updated, so the stuff which depends on actual |
17829 pint2str (decode_mode_spec_buf, field_width, col); | 17830 window contents (such as %l) may fail to render properly, or |
17830 return decode_mode_spec_buf; | 17831 even crash emacs.) */ |
17831 } | 17832 if (mode_line_target == MODE_LINE_TITLE) |
17833 return ""; | |
17834 else | |
17835 { | |
17836 int col = (int) current_column (); /* iftc */ | |
17837 w->column_number_displayed = make_number (col); | |
17838 pint2str (decode_mode_spec_buf, field_width, col); | |
17839 return decode_mode_spec_buf; | |
17840 } | |
17832 | 17841 |
17833 case 'e': | 17842 case 'e': |
17834 #ifndef SYSTEM_MALLOC | 17843 #ifndef SYSTEM_MALLOC |
17835 { | 17844 { |
17836 if (NILP (Vmemory_full)) | 17845 if (NILP (Vmemory_full)) |
17868 return decode_mode_spec_buf; | 17877 return decode_mode_spec_buf; |
17869 } | 17878 } |
17870 | 17879 |
17871 case 'l': | 17880 case 'l': |
17872 { | 17881 { |
17873 int startpos = XMARKER (w->start)->charpos; | 17882 int startpos, startpos_byte, line, linepos, linepos_byte; |
17874 int startpos_byte = marker_byte_position (w->start); | 17883 int topline, nlines, junk, height; |
17875 int line, linepos, linepos_byte, topline; | 17884 |
17876 int nlines, junk; | 17885 /* %c and %l are ignored in `frame-title-format'. */ |
17877 int height = WINDOW_TOTAL_LINES (w); | 17886 if (mode_line_target == MODE_LINE_TITLE) |
17887 return ""; | |
17888 | |
17889 startpos = XMARKER (w->start)->charpos; | |
17890 startpos_byte = marker_byte_position (w->start); | |
17891 height = WINDOW_TOTAL_LINES (w); | |
17878 | 17892 |
17879 /* If we decided that this buffer isn't suitable for line numbers, | 17893 /* If we decided that this buffer isn't suitable for line numbers, |
17880 don't forget that too fast. */ | 17894 don't forget that too fast. */ |
17881 if (EQ (w->base_line_pos, w->buffer)) | 17895 if (EQ (w->base_line_pos, w->buffer)) |
17882 goto no_value; | 17896 goto no_value; |
24317 `frame-title-format' and `icon-title-format'. */); | 24331 `frame-title-format' and `icon-title-format'. */); |
24318 | 24332 |
24319 DEFVAR_LISP ("frame-title-format", &Vframe_title_format, | 24333 DEFVAR_LISP ("frame-title-format", &Vframe_title_format, |
24320 doc: /* Template for displaying the title bar of visible frames. | 24334 doc: /* Template for displaying the title bar of visible frames. |
24321 \(Assuming the window manager supports this feature.) | 24335 \(Assuming the window manager supports this feature.) |
24322 This variable has the same structure as `mode-line-format' (which see), | 24336 |
24323 and is used only on frames for which no explicit name has been set | 24337 This variable has the same structure as `mode-line-format', except that |
24324 \(see `modify-frame-parameters'). */); | 24338 the %c and %l constructs are ignored. It is used only on frames for |
24339 which no explicit name has been set \(see `modify-frame-parameters'). */); | |
24325 | 24340 |
24326 DEFVAR_LISP ("icon-title-format", &Vicon_title_format, | 24341 DEFVAR_LISP ("icon-title-format", &Vicon_title_format, |
24327 doc: /* Template for displaying the title bar of an iconified frame. | 24342 doc: /* Template for displaying the title bar of an iconified frame. |
24328 \(Assuming the window manager supports this feature.) | 24343 \(Assuming the window manager supports this feature.) |
24329 This variable has the same structure as `mode-line-format' (which see), | 24344 This variable has the same structure as `mode-line-format' (which see), |