diff options
| author | Juanma Barranquero | 2014-04-19 01:36:51 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2014-04-19 01:36:51 +0200 |
| commit | bba633792b813249a47dde828cbf84cdb946ba60 (patch) | |
| tree | e320e5217ad3dc878e49fb86be7297a5cef60e5f /src | |
| parent | f0496348d1b9b1f2fff9e4265f51cbdc77eb40dc (diff) | |
| parent | 2a2e6726d1f7031d89fd6740e5b167476267f778 (diff) | |
| download | emacs-bba633792b813249a47dde828cbf84cdb946ba60.tar.gz emacs-bba633792b813249a47dde828cbf84cdb946ba60.zip | |
Merge from emacs-24; up to 2014-04-16T15:28:06Z!eggert@cs.ucla.edu
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 20 | ||||
| -rw-r--r-- | src/emacs.c | 7 | ||||
| -rw-r--r-- | src/insdel.c | 22 | ||||
| -rw-r--r-- | src/xdisp.c | 14 | ||||
| -rw-r--r-- | src/xterm.c | 9 |
5 files changed, 53 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 96c46d09624..34ae84c788f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,22 @@ | |||
| 1 | 2014-04-18 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * emacs.c (close_output_streams): Don't clear and restore errno. | ||
| 4 | |||
| 5 | 2014-04-18 Jan Djärv <jan.h.d@swipnet.se> | ||
| 6 | |||
| 7 | * xterm.c (x_make_frame_visible): Prevent endless loop when frame | ||
| 8 | never becomes visible, i.e. using XMonad (Bug#17237). | ||
| 9 | |||
| 10 | 2014-04-18 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation | ||
| 13 | glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288) | ||
| 14 | (Fline_pixel_height): Don't assume that the current buffer and the | ||
| 15 | selected window's buffer are one and the same. (Bug#17281) | ||
| 16 | |||
| 17 | * insdel.c (invalidate_buffer_caches): Invalidate the bidi | ||
| 18 | paragraph-start cache before the newline cache. (Bug#17269) | ||
| 19 | |||
| 1 | 2014-04-17 Paul Eggert <eggert@cs.ucla.edu> | 20 | 2014-04-17 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 21 | ||
| 3 | * term.c (tty_send_additional_strings): No need to fflush here, | 22 | * term.c (tty_send_additional_strings): No need to fflush here, |
| @@ -23,6 +42,7 @@ | |||
| 23 | 42 | ||
| 24 | 2014-04-16 Eli Zaretskii <eliz@gnu.org> | 43 | 2014-04-16 Eli Zaretskii <eliz@gnu.org> |
| 25 | 44 | ||
| 45 | Fix the MSDOS build. | ||
| 26 | * unexcoff.c [MSDOS]: Include libc/atexit.h. | 46 | * unexcoff.c [MSDOS]: Include libc/atexit.h. |
| 27 | (copy_text_and_data): Zero out the atexit chain pointer before | 47 | (copy_text_and_data): Zero out the atexit chain pointer before |
| 28 | dumping Emacs. | 48 | dumping Emacs. |
diff --git a/src/emacs.c b/src/emacs.c index 9cfc09469c2..deebb2280c7 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -690,11 +690,6 @@ void (*__malloc_initialize_hook) (void) EXTERNALLY_VISIBLE = malloc_initialize_h | |||
| 690 | static void | 690 | static void |
| 691 | close_output_streams (void) | 691 | close_output_streams (void) |
| 692 | { | 692 | { |
| 693 | int err = errno; | ||
| 694 | |||
| 695 | /* close_stream checks errno, so make sure it doesn't inherit some | ||
| 696 | random value. */ | ||
| 697 | errno = 0; | ||
| 698 | if (close_stream (stdout) != 0) | 693 | if (close_stream (stdout) != 0) |
| 699 | { | 694 | { |
| 700 | emacs_perror ("Write error to standard output"); | 695 | emacs_perror ("Write error to standard output"); |
| @@ -703,8 +698,6 @@ close_output_streams (void) | |||
| 703 | 698 | ||
| 704 | if (close_stream (stderr) != 0) | 699 | if (close_stream (stderr) != 0) |
| 705 | _exit (EXIT_FAILURE); | 700 | _exit (EXIT_FAILURE); |
| 706 | |||
| 707 | errno = err; | ||
| 708 | } | 701 | } |
| 709 | 702 | ||
| 710 | /* ARGSUSED */ | 703 | /* ARGSUSED */ |
diff --git a/src/insdel.c b/src/insdel.c index 82896758a15..2894af75348 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1849,14 +1849,9 @@ invalidate_buffer_caches (struct buffer *buf, ptrdiff_t start, ptrdiff_t end) | |||
| 1849 | need to consider the caches of their base buffer. */ | 1849 | need to consider the caches of their base buffer. */ |
| 1850 | if (buf->base_buffer) | 1850 | if (buf->base_buffer) |
| 1851 | buf = buf->base_buffer; | 1851 | buf = buf->base_buffer; |
| 1852 | if (buf->newline_cache) | 1852 | /* The bidi_paragraph_cache must be invalidated first, because doing |
| 1853 | invalidate_region_cache (buf, | 1853 | so might need to use the newline_cache (via find_newline_no_quit, |
| 1854 | buf->newline_cache, | 1854 | see below). */ |
| 1855 | start - BUF_BEG (buf), BUF_Z (buf) - end); | ||
| 1856 | if (buf->width_run_cache) | ||
| 1857 | invalidate_region_cache (buf, | ||
| 1858 | buf->width_run_cache, | ||
| 1859 | start - BUF_BEG (buf), BUF_Z (buf) - end); | ||
| 1860 | if (buf->bidi_paragraph_cache) | 1855 | if (buf->bidi_paragraph_cache) |
| 1861 | { | 1856 | { |
| 1862 | if (start != end | 1857 | if (start != end |
| @@ -1880,13 +1875,20 @@ invalidate_buffer_caches (struct buffer *buf, ptrdiff_t start, ptrdiff_t end) | |||
| 1880 | &start_byte); | 1875 | &start_byte); |
| 1881 | set_buffer_internal (old); | 1876 | set_buffer_internal (old); |
| 1882 | } | 1877 | } |
| 1883 | if (line_beg > BUF_BEG (buf)) | 1878 | start = line_beg - (line_beg > BUF_BEG (buf)); |
| 1884 | start = line_beg - 1; | ||
| 1885 | } | 1879 | } |
| 1886 | invalidate_region_cache (buf, | 1880 | invalidate_region_cache (buf, |
| 1887 | buf->bidi_paragraph_cache, | 1881 | buf->bidi_paragraph_cache, |
| 1888 | start - BUF_BEG (buf), BUF_Z (buf) - end); | 1882 | start - BUF_BEG (buf), BUF_Z (buf) - end); |
| 1889 | } | 1883 | } |
| 1884 | if (buf->newline_cache) | ||
| 1885 | invalidate_region_cache (buf, | ||
| 1886 | buf->newline_cache, | ||
| 1887 | start - BUF_BEG (buf), BUF_Z (buf) - end); | ||
| 1888 | if (buf->width_run_cache) | ||
| 1889 | invalidate_region_cache (buf, | ||
| 1890 | buf->width_run_cache, | ||
| 1891 | start - BUF_BEG (buf), BUF_Z (buf) - end); | ||
| 1890 | } | 1892 | } |
| 1891 | 1893 | ||
| 1892 | /* These macros work with an argument named `preserve_ptr' | 1894 | /* These macros work with an argument named `preserve_ptr' |
diff --git a/src/xdisp.c b/src/xdisp.c index 067d9f6ac0e..bb91d6f5e1f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1262,12 +1262,23 @@ Value is the height in pixels of the line at point. */) | |||
| 1262 | struct it it; | 1262 | struct it it; |
| 1263 | struct text_pos pt; | 1263 | struct text_pos pt; |
| 1264 | struct window *w = XWINDOW (selected_window); | 1264 | struct window *w = XWINDOW (selected_window); |
| 1265 | struct buffer *old_buffer = NULL; | ||
| 1266 | Lisp_Object result; | ||
| 1265 | 1267 | ||
| 1268 | if (XBUFFER (w->contents) != current_buffer) | ||
| 1269 | { | ||
| 1270 | old_buffer = current_buffer; | ||
| 1271 | set_buffer_internal_1 (XBUFFER (w->contents)); | ||
| 1272 | } | ||
| 1266 | SET_TEXT_POS (pt, PT, PT_BYTE); | 1273 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 1267 | start_display (&it, w, pt); | 1274 | start_display (&it, w, pt); |
| 1268 | it.vpos = it.current_y = 0; | 1275 | it.vpos = it.current_y = 0; |
| 1269 | last_height = 0; | 1276 | last_height = 0; |
| 1270 | return make_number (line_bottom_y (&it)); | 1277 | result = make_number (line_bottom_y (&it)); |
| 1278 | if (old_buffer) | ||
| 1279 | set_buffer_internal_1 (old_buffer); | ||
| 1280 | |||
| 1281 | return result; | ||
| 1271 | } | 1282 | } |
| 1272 | 1283 | ||
| 1273 | /* Return the default pixel height of text lines in window W. The | 1284 | /* Return the default pixel height of text lines in window W. The |
| @@ -18677,6 +18688,7 @@ insert_left_trunc_glyphs (struct it *it) | |||
| 18677 | truncate_it.current_x = 0; | 18688 | truncate_it.current_x = 0; |
| 18678 | truncate_it.face_id = DEFAULT_FACE_ID; | 18689 | truncate_it.face_id = DEFAULT_FACE_ID; |
| 18679 | truncate_it.glyph_row = &scratch_glyph_row; | 18690 | truncate_it.glyph_row = &scratch_glyph_row; |
| 18691 | truncate_it.area = TEXT_AREA; | ||
| 18680 | truncate_it.glyph_row->used[TEXT_AREA] = 0; | 18692 | truncate_it.glyph_row->used[TEXT_AREA] = 0; |
| 18681 | CHARPOS (truncate_it.position) = BYTEPOS (truncate_it.position) = -1; | 18693 | CHARPOS (truncate_it.position) = BYTEPOS (truncate_it.position) = -1; |
| 18682 | truncate_it.object = make_number (0); | 18694 | truncate_it.object = make_number (0); |
diff --git a/src/xterm.c b/src/xterm.c index dd71a8a1986..85daee66717 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8900,6 +8900,7 @@ void | |||
| 8900 | x_make_frame_visible (struct frame *f) | 8900 | x_make_frame_visible (struct frame *f) |
| 8901 | { | 8901 | { |
| 8902 | int original_top, original_left; | 8902 | int original_top, original_left; |
| 8903 | int tries = 0; | ||
| 8903 | 8904 | ||
| 8904 | block_input (); | 8905 | block_input (); |
| 8905 | 8906 | ||
| @@ -9007,7 +9008,13 @@ x_make_frame_visible (struct frame *f) | |||
| 9007 | /* Force processing of queued events. */ | 9008 | /* Force processing of queued events. */ |
| 9008 | x_sync (f); | 9009 | x_sync (f); |
| 9009 | 9010 | ||
| 9010 | /* This hack is still in use at least for Cygwin. See | 9011 | /* If on another desktop, the deiconify/map may be ignored and the |
| 9012 | frame never becomes visible. XMonad does this. | ||
| 9013 | Prevent an endless loop. */ | ||
| 9014 | if (FRAME_ICONIFIED_P (f) && ++tries > 100) | ||
| 9015 | break; | ||
| 9016 | |||
| 9017 | /* This hack is still in use at least for Cygwin. See | ||
| 9011 | http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html. | 9018 | http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html. |
| 9012 | 9019 | ||
| 9013 | Machines that do polling rather than SIGIO have been | 9020 | Machines that do polling rather than SIGIO have been |