diff options
| author | Miles Bader | 2004-09-21 09:34:12 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-09-21 09:34:12 +0000 |
| commit | 4b2ed4a6151dac2d11e414e2f923da5e7160ba4f (patch) | |
| tree | 035379ac696016d8be5099a94fb6b8f6144f7a99 /src | |
| parent | fb06d0ce437dec8fb9d913499021fda5fd10ae59 (diff) | |
| parent | 88a74fa51b4dc8763b607a90f0ee8a099f193a24 (diff) | |
| download | emacs-4b2ed4a6151dac2d11e414e2f923da5e7160ba4f.tar.gz emacs-4b2ed4a6151dac2d11e414e2f923da5e7160ba4f.zip | |
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-43
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-553
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-557
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-558
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-559
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-561
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-30
Update from CVS
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/alloc.c | 7 | ||||
| -rw-r--r-- | src/buffer.c | 9 | ||||
| -rw-r--r-- | src/xdisp.c | 42 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
5 files changed, 65 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 955c8929f92..e71a0e3217d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xterm.c (x_term_init): Work around a bug in some X servers. | ||
| 4 | |||
| 5 | 2004-09-18 Richard M. Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * buffer.c (syms_of_buffer) <default-major-mode>: Doc fix. | ||
| 8 | |||
| 9 | * xdisp.c (try_window_reusing_current_matrix): | ||
| 10 | Handle the case where we reach the old displayed text, | ||
| 11 | out of sync with the old line boundary. | ||
| 12 | |||
| 1 | 2004-09-14 Stefan <monnier@iro.umontreal.ca> | 13 | 2004-09-14 Stefan <monnier@iro.umontreal.ca> |
| 2 | 14 | ||
| 3 | * fileio.c (Finsert_file_contents): Fix case of replacement in a | 15 | * fileio.c (Finsert_file_contents): Fix case of replacement in a |
diff --git a/src/alloc.c b/src/alloc.c index 4b31ec7897e..e783ba581e0 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -186,8 +186,11 @@ Lisp_Object Vmemory_full; | |||
| 186 | 186 | ||
| 187 | #ifndef HAVE_SHM | 187 | #ifndef HAVE_SHM |
| 188 | 188 | ||
| 189 | /* Force it into data space! Initialize it to a nonzero value; | 189 | /* Initialize it to a nonzero value to force it into data space |
| 190 | otherwise some compilers put it into BSS. */ | 190 | (rather than bss space). That way unexec will remap it into text |
| 191 | space (pure), on some systems. We have not implemented the | ||
| 192 | remapping on more recent systems because this is less important | ||
| 193 | nowadays than in the days of small memories and timesharing. */ | ||
| 191 | 194 | ||
| 192 | EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; | 195 | EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; |
| 193 | #define PUREBEG (char *) pure | 196 | #define PUREBEG (char *) pure |
diff --git a/src/buffer.c b/src/buffer.c index 2084d80049a..75339c4fc85 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5446,7 +5446,14 @@ Decimal digits after the % specify field width to which to pad. */); | |||
| 5446 | 5446 | ||
| 5447 | DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, | 5447 | DEFVAR_LISP_NOPRO ("default-major-mode", &buffer_defaults.major_mode, |
| 5448 | doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. | 5448 | doc: /* *Major mode for new buffers. Defaults to `fundamental-mode'. |
| 5449 | nil here means use current buffer's major mode. */); | 5449 | nil here means use current buffer's major mode, provided it is not |
| 5450 | marked as "special". | ||
| 5451 | |||
| 5452 | When a mode is used by default, `find-file' switches to it | ||
| 5453 | before it reads the contents into the buffer and before | ||
| 5454 | it finishes setting up the buffer. Thus, the mode and | ||
| 5455 | its hooks should not expect certain variables such as | ||
| 5456 | `buffer-read-only' and `buffer-file-coding-system' to be set up. */); | ||
| 5450 | 5457 | ||
| 5451 | DEFVAR_PER_BUFFER ("major-mode", ¤t_buffer->major_mode, | 5458 | DEFVAR_PER_BUFFER ("major-mode", ¤t_buffer->major_mode, |
| 5452 | make_number (Lisp_Symbol), | 5459 | make_number (Lisp_Symbol), |
diff --git a/src/xdisp.c b/src/xdisp.c index a756b99577c..d8166a30df5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12504,10 +12504,36 @@ try_window_reusing_current_matrix (w) | |||
| 12504 | last_text_row = last_reused_text_row = NULL; | 12504 | last_text_row = last_reused_text_row = NULL; |
| 12505 | 12505 | ||
| 12506 | while (it.current_y < it.last_visible_y | 12506 | while (it.current_y < it.last_visible_y |
| 12507 | && IT_CHARPOS (it) < CHARPOS (start) | ||
| 12508 | && !fonts_changed_p) | 12507 | && !fonts_changed_p) |
| 12509 | if (display_line (&it)) | 12508 | { |
| 12510 | last_text_row = it.glyph_row - 1; | 12509 | /* If we have reached into the characters in the START row, |
| 12510 | that means the line boundaries have changed. So we | ||
| 12511 | can't start copying with the row START. Maybe it will | ||
| 12512 | work to start copying with the following row. */ | ||
| 12513 | while (IT_CHARPOS (it) > CHARPOS (start)) | ||
| 12514 | { | ||
| 12515 | /* Advance to the next row as the "start". */ | ||
| 12516 | start_row++; | ||
| 12517 | start = start_row->start.pos; | ||
| 12518 | /* If there are no more rows to try, or just one, give up. */ | ||
| 12519 | if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 | ||
| 12520 | || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (start_row) | ||
| 12521 | || CHARPOS (start) == ZV) | ||
| 12522 | { | ||
| 12523 | clear_glyph_matrix (w->desired_matrix); | ||
| 12524 | return 0; | ||
| 12525 | } | ||
| 12526 | |||
| 12527 | start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix); | ||
| 12528 | } | ||
| 12529 | /* If we have reached alignment, | ||
| 12530 | we can copy the rest of the rows. */ | ||
| 12531 | if (IT_CHARPOS (it) == CHARPOS (start)) | ||
| 12532 | break; | ||
| 12533 | |||
| 12534 | if (display_line (&it)) | ||
| 12535 | last_text_row = it.glyph_row - 1; | ||
| 12536 | } | ||
| 12511 | 12537 | ||
| 12512 | /* A value of current_y < last_visible_y means that we stopped | 12538 | /* A value of current_y < last_visible_y means that we stopped |
| 12513 | at the previous window start, which in turn means that we | 12539 | at the previous window start, which in turn means that we |
| @@ -12515,12 +12541,12 @@ try_window_reusing_current_matrix (w) | |||
| 12515 | if (it.current_y < it.last_visible_y) | 12541 | if (it.current_y < it.last_visible_y) |
| 12516 | { | 12542 | { |
| 12517 | /* IT.vpos always starts from 0; it counts text lines. */ | 12543 | /* IT.vpos always starts from 0; it counts text lines. */ |
| 12518 | nrows_scrolled = it.vpos; | 12544 | nrows_scrolled = it.vpos - (start_row - MATRIX_FIRST_TEXT_ROW (w->current_matrix)); |
| 12519 | 12545 | ||
| 12520 | /* Find PT if not already found in the lines displayed. */ | 12546 | /* Find PT if not already found in the lines displayed. */ |
| 12521 | if (w->cursor.vpos < 0) | 12547 | if (w->cursor.vpos < 0) |
| 12522 | { | 12548 | { |
| 12523 | int dy = it.current_y - first_row_y; | 12549 | int dy = it.current_y - start_row->y; |
| 12524 | 12550 | ||
| 12525 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 12551 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 12526 | row = row_containing_pos (w, PT, row, NULL, dy); | 12552 | row = row_containing_pos (w, PT, row, NULL, dy); |
| @@ -12540,7 +12566,7 @@ try_window_reusing_current_matrix (w) | |||
| 12540 | scroll_run_hook will clear the cursor, and use the | 12566 | scroll_run_hook will clear the cursor, and use the |
| 12541 | current matrix to get the height of the row the cursor is | 12567 | current matrix to get the height of the row the cursor is |
| 12542 | in. */ | 12568 | in. */ |
| 12543 | run.current_y = first_row_y; | 12569 | run.current_y = start_row->y; |
| 12544 | run.desired_y = it.current_y; | 12570 | run.desired_y = it.current_y; |
| 12545 | run.height = it.last_visible_y - it.current_y; | 12571 | run.height = it.last_visible_y - it.current_y; |
| 12546 | 12572 | ||
| @@ -15435,6 +15461,10 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) | |||
| 15435 | Lisp_Object oprops, aelt; | 15461 | Lisp_Object oprops, aelt; |
| 15436 | oprops = Ftext_properties_at (make_number (0), elt); | 15462 | oprops = Ftext_properties_at (make_number (0), elt); |
| 15437 | 15463 | ||
| 15464 | /* If the starting string's properties are not what | ||
| 15465 | we want, translate the string. Also, if the string | ||
| 15466 | is risky, do that anyway. */ | ||
| 15467 | |||
| 15438 | if (NILP (Fequal (props, oprops)) || risky) | 15468 | if (NILP (Fequal (props, oprops)) || risky) |
| 15439 | { | 15469 | { |
| 15440 | /* If the starting string has properties, | 15470 | /* If the starting string has properties, |
diff --git a/src/xterm.c b/src/xterm.c index e7fb798eb60..cf7ec09cf46 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10611,10 +10611,12 @@ x_term_init (display_name, xrm_option, resource_name) | |||
| 10611 | int screen_number = XScreenNumberOfScreen (dpyinfo->screen); | 10611 | int screen_number = XScreenNumberOfScreen (dpyinfo->screen); |
| 10612 | double pixels = DisplayHeight (dpyinfo->display, screen_number); | 10612 | double pixels = DisplayHeight (dpyinfo->display, screen_number); |
| 10613 | double mm = DisplayHeightMM (dpyinfo->display, screen_number); | 10613 | double mm = DisplayHeightMM (dpyinfo->display, screen_number); |
| 10614 | dpyinfo->resy = pixels * 25.4 / mm; | 10614 | /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */ |
| 10615 | dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm; | ||
| 10615 | pixels = DisplayWidth (dpyinfo->display, screen_number); | 10616 | pixels = DisplayWidth (dpyinfo->display, screen_number); |
| 10617 | /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */ | ||
| 10616 | mm = DisplayWidthMM (dpyinfo->display, screen_number); | 10618 | mm = DisplayWidthMM (dpyinfo->display, screen_number); |
| 10617 | dpyinfo->resx = pixels * 25.4 / mm; | 10619 | dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm; |
| 10618 | } | 10620 | } |
| 10619 | 10621 | ||
| 10620 | dpyinfo->Xatom_wm_protocols | 10622 | dpyinfo->Xatom_wm_protocols |