aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2012-10-17 22:33:48 +0900
committerKenichi Handa2012-10-17 22:33:48 +0900
commit596846525bf5f515541ab1ca9a459f4842d55d1d (patch)
treee1e4f64ebb40daf0d9ee16b84ef824da30cfbffc /src
parentfe0b1ec40988638025db569a936b09f0295749a1 (diff)
parent1f9f395d8063fd633ba73f6cc025ded953bab502 (diff)
downloademacs-596846525bf5f515541ab1ca9a459f4842d55d1d.tar.gz
emacs-596846525bf5f515541ab1ca9a459f4842d55d1d.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog91
-rw-r--r--src/alloc.c2
-rw-r--r--src/buffer.c38
-rw-r--r--src/buffer.h16
-rw-r--r--src/dbusbind.c8
-rw-r--r--src/editfns.c9
-rw-r--r--src/image.c6
-rw-r--r--src/indent.c6
-rw-r--r--src/lisp.h1
-rw-r--r--src/nsterm.m5
-rw-r--r--src/print.c2
-rw-r--r--src/window.c8
-rw-r--r--src/xrdb.c12
13 files changed, 132 insertions, 72 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 21d13a04e77..b845eeb3ceb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,6 +3,58 @@
3 * xdisp.c (reseat_1): Make the information stored in it->cmp_it 3 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
4 invalidate. 4 invalidate.
5 5
62012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
7
8 * buffer.c (Fkill_buffer): When unchaining the marker,
9 reset its buffer pointer to NULL (Bug#12652).
10
112012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
12
13 Do not verify indirection counters of killed buffers (Bug#12579).
14 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
15 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
16
172012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
18
19 * alloc.c (Fmake_byte_code): Fix typo in comment.
20 * print.c (print_interval): Define as static to match prototype.
21 * indent.c (disptab_matches_widthtab, recompute_width_table):
22 Convert to eassert.
23
242012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
25
26 * editfns.c (get_system_name): Remove.
27 * lisp.h (get_system_name): Remove prototype.
28 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
29 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
30
312012-10-15 Daniel Colascione <dancol@dancol.org>
32
33 * dbusbind.c: Add comment explaining reason for previous change.
34
352012-10-15 Martin Rudalics <rudalics@gmx.at>
36
37 * window.c (Fwindow_end): Rewrite check whether cached position
38 can be used (Bug#12600).
39 (resize_frame_windows, grow_mini_window, shrink_mini_window):
40 Set windows_or_buffers_changed.
41
422012-10-15 Daniel Colascione <dancol@dancol.org>
43
44 * dbusbind.c: Fix cygw32 build break when compiling with dbus
45 enabled by undefining the symbol "interface", which the platform
46 headers define to something incompatible.
47
482012-10-14 Daniel Colascione <dancol@dancol.org>
49
50 * image.c (init_tiff_functions, init_imagemagick_functions)
51 (init_svg_functions): Fix cygw32 build break by using these
52 functions only when WINDOWSNT _and_ HAVE_NTGUI.
53
542012-10-14 Jan Djärv <jan.h.d@swipnet.se>
55
56 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
57
62012-10-13 Jan Djärv <jan.h.d@swipnet.se> 582012-10-13 Jan Djärv <jan.h.d@swipnet.se>
7 59
8 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612). 60 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
@@ -58,8 +110,7 @@
58 a file exists. This avoids expensive system calls on MS-Windows. 110 a file exists. This avoids expensive system calls on MS-Windows.
59 (Bug#12587) 111 (Bug#12587)
60 112
61 * w32.c (init_environment): Call 'check_existing' instead of 113 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
62 'stat'.
63 114
64 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to 115 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
65 determine whether a file exists and is not a directory. 116 determine whether a file exists and is not a directory.
@@ -199,7 +250,7 @@
199 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles 250 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
200 caching. 251 caching.
201 (nsfont_open): Remove setting of Vfonts_in_cache. 252 (nsfont_open): Remove setting of Vfonts_in_cache.
202 (syms_of_nsfont): Remove initialization of Vfonts_in_cache 253 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
203 254
2042012-10-09 Eli Zaretskii <eliz@gnu.org> 2552012-10-09 Eli Zaretskii <eliz@gnu.org>
205 256
@@ -266,7 +317,7 @@
266 * w32select.h (HAVE_W32SELECT): Remove. 317 * w32select.h (HAVE_W32SELECT): Remove.
267 318
268 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include 319 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
269 w32common.h instead of w32heap.h 320 w32common.h instead of w32heap.h.
270 321
271 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size) 322 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
272 (get_allocation_unit, get_processor_type, get_w32_major_version) 323 (get_allocation_unit, get_processor_type, get_w32_major_version)
@@ -277,8 +328,8 @@
277 328
278 * w32heap.c: Include w32common.h. 329 * w32heap.c: Include w32common.h.
279 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version) 330 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
280 (w32_minor_version, w32_build_number, w32_subtype): Remove 331 (w32_minor_version, w32_build_number, w32_subtype):
281 duplicate definitions. 332 Remove duplicate definitions.
282 333
283 * w32fns.c: Include w32common.h; include w32heap.h only in 334 * w32fns.c: Include w32common.h; include w32heap.h only in
284 WINDOWSNT. 335 WINDOWSNT.
@@ -389,7 +440,7 @@
389 Cygwin builds. Remove w32select declarations. 440 Cygwin builds. Remove w32select declarations.
390 441
391 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to 442 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
392 w32fns.c. w32console.c is WINDOWSNT-only. 443 w32fns.c. w32console.c is WINDOWSNT-only.
393 444
394 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more 445 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
395 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more 446 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
@@ -490,12 +541,12 @@
490 541
491 * nsterm.m (ns_in_resize): Remove (Bug#12479). 542 * nsterm.m (ns_in_resize): Remove (Bug#12479).
492 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove. 543 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
493 (ns_clear_frame, sendEvent, windowDidResize, drawRect:): Remove 544 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
494 ns_in_resize check. 545 Remove ns_in_resize check.
495 (ns_clear_frame_area): Remove resize handle code. 546 (ns_clear_frame_area): Remove resize handle code.
496 547
497 * nsfns.m (ns_in_resize): Remove. 548 * nsfns.m (ns_in_resize): Remove.
498 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove 549 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
499 ns_in_resize check. 550 ns_in_resize check.
500 551
5012012-10-07 Paul Eggert <eggert@cs.ucla.edu> 5522012-10-07 Paul Eggert <eggert@cs.ucla.edu>
@@ -524,7 +575,7 @@
524 (initFrameFromEmacs:): tbar_height renamed tibar_height. 575 (initFrameFromEmacs:): tbar_height renamed tibar_height.
525 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix 576 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
526 error in drawing background. 577 error in drawing background.
527 (toggleFullScreen:): Remove comment. Rearrange calls. 578 (toggleFullScreen:): Remove comment. Rearrange calls.
528 Set toolbar values to zero, save old height in tobar_height. 579 Set toolbar values to zero, save old height in tobar_height.
529 Restore tool bar height when leaving fullscreen. 580 Restore tool bar height when leaving fullscreen.
530 (canBecomeMainWindow): New function. 581 (canBecomeMainWindow): New function.
@@ -538,8 +589,8 @@
538 * w32proc.c (stop_timer_thread): Fix declaration of 'err'. 589 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
539 590
540 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so 591 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
541 that time stamps of directories could also be changed. Don't 592 that time stamps of directories could also be changed.
542 request the too broad GENERIC_WRITE, only the more restrictive 593 Don't request the too broad GENERIC_WRITE, only the more restrictive
543 FILE_WRITE_ATTRIBUTES access rights. 594 FILE_WRITE_ATTRIBUTES access rights.
544 595
545 * fileio.c (Fset_file_times): Special-case ignoring errors for 596 * fileio.c (Fset_file_times): Special-case ignoring errors for
@@ -947,7 +998,7 @@
947 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and 998 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
948 tbar_height. 999 tbar_height.
949 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter 1000 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
950 fullscreen. Set maximized_width/height. Act on next_maximized. 1001 fullscreen. Set maximized_width/height. Act on next_maximized.
951 1002
952 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New. 1003 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
953 (EmacsView): Add variables for fullscreen. 1004 (EmacsView): Add variables for fullscreen.
@@ -1603,7 +1654,7 @@
16032012-09-19 Paul Eggert <eggert@cs.ucla.edu> 16542012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1604 1655
1605 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0. 1656 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1606 Ignore 'expected'. See Eli Zaretskii in 1657 Ignore 'expected'. See Eli Zaretskii in
1607 <http://bugs.gnu.org/12471#8> (last line). 1658 <http://bugs.gnu.org/12471#8> (last line).
1608 1659
1609 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul. 1660 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
@@ -1670,7 +1721,7 @@
1670 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc) 1721 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1671 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc): 1722 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1672 [!SYSTEM_MALLOC && !SYNC_INPUT]: 1723 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1673 Remove. All uses removed. 1724 Remove. All uses removed.
1674 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different 1725 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1675 implementation, one that depends on whether the new macro 1726 implementation, one that depends on whether the new macro
1676 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT 1727 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
@@ -1960,7 +2011,7 @@
1960 * alloc.c (discard_killed_buffers): New function. 2011 * alloc.c (discard_killed_buffers): New function.
1961 (mark_object): Use it for deleted windows and frames. 2012 (mark_object): Use it for deleted windows and frames.
1962 (mark_object): If symbol's value is set up for a killed buffer 2013 (mark_object): If symbol's value is set up for a killed buffer
1963 or deleted frame, restore it's global binding. 2014 or deleted frame, restore its global binding.
1964 * data.c (swap_in_global_binding): Add GC notice. 2015 * data.c (swap_in_global_binding): Add GC notice.
1965 (swap_in_symval_forwarding): Use convenient set_blv_where. 2016 (swap_in_symval_forwarding): Use convenient set_blv_where.
1966 * window.c (wset_next_buffers, wset_prev_buffers): Move ... 2017 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
@@ -4267,7 +4318,7 @@
4267 4318
4268 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar) 4319 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4269 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:) 4320 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4270 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114) 4321 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4271 * nsfns.m (ns_set_name_as_filename): Likewise. 4322 * nsfns.m (ns_set_name_as_filename): Likewise.
4272 * nsmenu.m (ns_update_menubar): Likewise. 4323 * nsmenu.m (ns_update_menubar): Likewise.
4273 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR. 4324 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
@@ -6363,7 +6414,7 @@
6363 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE 6414 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6364 values which aren't power of 2. 6415 values which aren't power of 2.
6365 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro. 6416 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6366 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users 6417 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6367 accordingly. 6418 accordingly.
6368 6419
63692012-07-03 Stefan Monnier <monnier@iro.umontreal.ca> 64202012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -7532,7 +7583,7 @@
7532 bitfields where appropriate, remove unused fields. 7583 bitfields where appropriate, remove unused fields.
7533 * window.h (struct window): Remove unused 'last_mark_x' and 7584 * window.h (struct window): Remove unused 'last_mark_x' and
7534 'last_mark_y' fields. Rename 'mini_p' field to 'mini', 7585 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7535 change it's type from Lisp_Object to bitfield. 7586 change its type from Lisp_Object to bitfield.
7536 Change type of 'force_start', 'optional_new_start', 7587 Change type of 'force_start', 'optional_new_start',
7537 'last_had_star', 'update_mode_line' and 'start_at_line_beg' 7588 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7538 fields from Lisp_Object to bitfield. Adjust users accordingly. 7589 fields from Lisp_Object to bitfield. Adjust users accordingly.
diff --git a/src/alloc.c b/src/alloc.c
index 95be8db1614..0afe446d269 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3100,7 +3100,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
3100 ptrdiff_t i; 3100 ptrdiff_t i;
3101 register struct Lisp_Vector *p; 3101 register struct Lisp_Vector *p;
3102 3102
3103 /* We used to purecopy everything here, if purify-flga was set. This worked 3103 /* We used to purecopy everything here, if purify-flag was set. This worked
3104 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be 3104 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be
3105 dangerous, since make-byte-code is used during execution to build 3105 dangerous, since make-byte-code is used during execution to build
3106 closures, so any closure built during the preload phase would end up 3106 closures, so any closure built during the preload phase would end up
diff --git a/src/buffer.c b/src/buffer.c
index 861a89b5a0f..0b3dde27968 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1663,18 +1663,11 @@ No argument or nil as argument means do this for the current buffer. */)
1663void 1663void
1664compact_buffer (struct buffer *buffer) 1664compact_buffer (struct buffer *buffer)
1665{ 1665{
1666 /* Verify indirection counters. */ 1666 BUFFER_CHECK_INDIRECTION (buffer);
1667 if (buffer->base_buffer)
1668 {
1669 eassert (buffer->indirections == -1);
1670 eassert (buffer->base_buffer->indirections > 0);
1671 }
1672 else
1673 eassert (buffer->indirections >= 0);
1674 1667
1675 /* Skip dead buffers, indirect buffers and buffers 1668 /* Skip dead buffers, indirect buffers and buffers
1676 which aren't changed since last compaction. */ 1669 which aren't changed since last compaction. */
1677 if (!NILP (buffer->INTERNAL_FIELD (name)) 1670 if (BUFFER_LIVE_P (buffer)
1678 && (buffer->base_buffer == NULL) 1671 && (buffer->base_buffer == NULL)
1679 && (buffer->text->compact != buffer->text->modiff)) 1672 && (buffer->text->compact != buffer->text->modiff))
1680 { 1673 {
@@ -1888,19 +1881,20 @@ cleaning up all windows currently displaying the buffer to be killed. */)
1888 1881
1889 if (b->base_buffer) 1882 if (b->base_buffer)
1890 { 1883 {
1891 { /* Unchain all markers that belong to this indirect buffer. 1884 /* Unchain all markers that belong to this indirect buffer.
1892 Don't unchain the markers that belong to the base buffer 1885 Don't unchain the markers that belong to the base buffer
1893 or its other indirect buffers. */ 1886 or its other indirect buffers. */
1894 struct Lisp_Marker **mp; 1887 struct Lisp_Marker **mp = &BUF_MARKERS (b);
1895 for (mp = &BUF_MARKERS (b); *mp; ) 1888 while ((m = *mp))
1896 { 1889 {
1897 struct Lisp_Marker *m = *mp; 1890 if (m->buffer == b)
1898 if (m->buffer == b) 1891 {
1892 m->buffer = NULL;
1899 *mp = m->next; 1893 *mp = m->next;
1900 else 1894 }
1901 mp = &m->next; 1895 else
1902 } 1896 mp = &m->next;
1903 } 1897 }
1904 } 1898 }
1905 else 1899 else
1906 { 1900 {
@@ -2114,6 +2108,8 @@ set_buffer_internal_1 (register struct buffer *b)
2114 if (current_buffer == b) 2108 if (current_buffer == b)
2115 return; 2109 return;
2116 2110
2111 BUFFER_CHECK_INDIRECTION (b);
2112
2117 old_buf = current_buffer; 2113 old_buf = current_buffer;
2118 current_buffer = b; 2114 current_buffer = b;
2119 last_known_column_point = -1; /* invalidate indentation cache */ 2115 last_known_column_point = -1; /* invalidate indentation cache */
diff --git a/src/buffer.h b/src/buffer.h
index d18ef30ea38..9e0e9eef0b1 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -963,6 +963,22 @@ bset_width_table (struct buffer *b, Lisp_Object val)
963 963
964#define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) 964#define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name)))
965 965
966/* Verify indirection counters. */
967
968#define BUFFER_CHECK_INDIRECTION(b) \
969 do { \
970 if (BUFFER_LIVE_P (b)) \
971 { \
972 if (b->base_buffer) \
973 { \
974 eassert (b->indirections == -1); \
975 eassert (b->base_buffer->indirections > 0); \
976 } \
977 else \
978 eassert (b->indirections >= 0); \
979 } \
980 } while (0)
981
966/* Chain of all buffers, including killed ones. */ 982/* Chain of all buffers, including killed ones. */
967 983
968extern struct buffer *all_buffers; 984extern struct buffer *all_buffers;
diff --git a/src/dbusbind.c b/src/dbusbind.c
index c2eefd605bb..08f34f47042 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -32,6 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#define DBUS_NUM_MESSAGE_TYPES 5 32#define DBUS_NUM_MESSAGE_TYPES 5
33#endif 33#endif
34 34
35
36/* Some platforms define the symbol "interface", but we want to use it
37 * as a variable name below. */
38
39#ifdef interface
40#undef interface
41#endif
42
35 43
36/* Subroutines. */ 44/* Subroutines. */
37static Lisp_Object Qdbus_init_bus; 45static Lisp_Object Qdbus_init_bus;
diff --git a/src/editfns.c b/src/editfns.c
index 19fad7130a7..c5d4ed295ab 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1339,15 +1339,6 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0,
1339 return Vsystem_name; 1339 return Vsystem_name;
1340} 1340}
1341 1341
1342const char *
1343get_system_name (void)
1344{
1345 if (STRINGP (Vsystem_name))
1346 return SSDATA (Vsystem_name);
1347 else
1348 return "";
1349}
1350
1351DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, 1342DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0,
1352 doc: /* Return the process ID of Emacs, as a number. */) 1343 doc: /* Return the process ID of Emacs, as a number. */)
1353 (void) 1344 (void)
diff --git a/src/image.c b/src/image.c
index d52c3a29a27..538ae2b7772 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6577,7 +6577,7 @@ static const struct image_keyword tiff_format[TIFF_LAST] =
6577 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} 6577 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}
6578}; 6578};
6579 6579
6580#ifdef HAVE_NTGUI 6580#if defined HAVE_NTGUI && defined WINDOWSNT
6581static bool init_tiff_functions (void); 6581static bool init_tiff_functions (void);
6582#else 6582#else
6583#define init_tiff_functions NULL 6583#define init_tiff_functions NULL
@@ -7529,7 +7529,7 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] =
7529 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 7529 {":crop", IMAGE_DONT_CHECK_VALUE_TYPE, 0}
7530 }; 7530 };
7531 7531
7532#ifdef HAVE_NTGUI 7532#if defined HAVE_NTGUI && defined WINDOWSNT
7533static bool init_imagemagick_functions (void); 7533static bool init_imagemagick_functions (void);
7534#else 7534#else
7535#define init_imagemagick_functions NULL 7535#define init_imagemagick_functions NULL
@@ -8083,7 +8083,7 @@ static const struct image_keyword svg_format[SVG_LAST] =
8083 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 8083 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
8084}; 8084};
8085 8085
8086#ifdef HAVE_NTGUI 8086#if defined HAVE_NTGUI && defined WINDOWSNT
8087static bool init_svg_functions (void); 8087static bool init_svg_functions (void);
8088#else 8088#else
8089#define init_svg_functions NULL 8089#define init_svg_functions NULL
diff --git a/src/indent.c b/src/indent.c
index 81a63455ecb..bbc944d2518 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -119,8 +119,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w
119{ 119{
120 int i; 120 int i;
121 121
122 if (widthtab->header.size != 256) 122 eassert (widthtab->header.size == 256);
123 emacs_abort ();
124 123
125 for (i = 0; i < 256; i++) 124 for (i = 0; i < 256; i++)
126 if (character_width (i, disptab) 125 if (character_width (i, disptab)
@@ -141,8 +140,7 @@ recompute_width_table (struct buffer *buf, struct Lisp_Char_Table *disptab)
141 if (!VECTORP (BVAR (buf, width_table))) 140 if (!VECTORP (BVAR (buf, width_table)))
142 bset_width_table (buf, Fmake_vector (make_number (256), make_number (0))); 141 bset_width_table (buf, Fmake_vector (make_number (256), make_number (0)));
143 widthtab = XVECTOR (BVAR (buf, width_table)); 142 widthtab = XVECTOR (BVAR (buf, width_table));
144 if (widthtab->header.size != 256) 143 eassert (widthtab->header.size == 256);
145 emacs_abort ();
146 144
147 for (i = 0; i < 256; i++) 145 for (i = 0; i < 256; i++)
148 XSETFASTINT (widthtab->contents[i], character_width (i, disptab)); 146 XSETFASTINT (widthtab->contents[i], character_width (i, disptab));
diff --git a/src/lisp.h b/src/lisp.h
index 7afe7b373fe..01f6ca5e57c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3127,7 +3127,6 @@ extern Lisp_Object make_buffer_string (ptrdiff_t, ptrdiff_t, bool);
3127extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, 3127extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t,
3128 ptrdiff_t, bool); 3128 ptrdiff_t, bool);
3129extern void init_editfns (void); 3129extern void init_editfns (void);
3130const char *get_system_name (void);
3131extern void syms_of_editfns (void); 3130extern void syms_of_editfns (void);
3132extern void set_time_zone_rule (const char *); 3131extern void set_time_zone_rule (const char *);
3133 3132
diff --git a/src/nsterm.m b/src/nsterm.m
index 98dd0a8aab1..dfc84db50f7 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3444,7 +3444,10 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
3444/* NSTRACE (ns_select); */ 3444/* NSTRACE (ns_select); */
3445 3445
3446 for (k = 0; readfds && k < nfds+1; k++) 3446 for (k = 0; readfds && k < nfds+1; k++)
3447 if (FD_ISSET(k, readfds)) ++nr; 3447 {
3448 if (FD_ISSET(k, readfds)) ++nr;
3449 if (FD_ISSET(k, writefds)) ++nr;
3450 }
3448 3451
3449 if (NSApp == nil 3452 if (NSApp == nil
3450 || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0)) 3453 || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
diff --git a/src/print.c b/src/print.c
index 49b491faec8..ccf0e8ed7cc 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2075,7 +2075,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
2075/* Print a description of INTERVAL using PRINTCHARFUN. 2075/* Print a description of INTERVAL using PRINTCHARFUN.
2076 This is part of printing a string that has text properties. */ 2076 This is part of printing a string that has text properties. */
2077 2077
2078void 2078static void
2079print_interval (INTERVAL interval, Lisp_Object printcharfun) 2079print_interval (INTERVAL interval, Lisp_Object printcharfun)
2080{ 2080{
2081 if (NILP (interval->plist)) 2081 if (NILP (interval->plist))
diff --git a/src/window.c b/src/window.c
index 61d2a8b073f..b4fee61cac8 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1464,9 +1464,7 @@ if it isn't already recorded. */)
1464#endif 1464#endif
1465 1465
1466 if (! NILP (update) 1466 if (! NILP (update)
1467 && ! (! NILP (w->window_end_valid) 1467 && (windows_or_buffers_changed || NILP (w->window_end_valid))
1468 && w->last_modified >= BUF_MODIFF (b)
1469 && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
1470 && !noninteractive) 1468 && !noninteractive)
1471 { 1469 {
1472 struct text_pos startp; 1470 struct text_pos startp;
@@ -3795,6 +3793,8 @@ resize_frame_windows (struct frame *f, int size, int horflag)
3795 (m, make_number (XINT (r->top_line) + XINT (r->total_lines))); 3793 (m, make_number (XINT (r->top_line) + XINT (r->total_lines)));
3796 } 3794 }
3797 } 3795 }
3796
3797 windows_or_buffers_changed++;
3798} 3798}
3799 3799
3800 3800
@@ -4208,6 +4208,7 @@ grow_mini_window (struct window *w, int delta)
4208 w->last_modified = 0; 4208 w->last_modified = 0;
4209 w->last_overlay_modified = 0; 4209 w->last_overlay_modified = 0;
4210 4210
4211 windows_or_buffers_changed++;
4211 adjust_glyphs (f); 4212 adjust_glyphs (f);
4212 unblock_input (); 4213 unblock_input ();
4213 } 4214 }
@@ -4245,6 +4246,7 @@ shrink_mini_window (struct window *w)
4245 w->last_modified = 0; 4246 w->last_modified = 0;
4246 w->last_overlay_modified = 0; 4247 w->last_overlay_modified = 0;
4247 4248
4249 windows_or_buffers_changed++;
4248 adjust_glyphs (f); 4250 adjust_glyphs (f);
4249 unblock_input (); 4251 unblock_input ();
4250 } 4252 }
diff --git a/src/xrdb.c b/src/xrdb.c
index 73672c9617c..9d056a607e4 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -24,7 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#include <unistd.h> 24#include <unistd.h>
25#include <errno.h> 25#include <errno.h>
26#include <epaths.h> 26#include <epaths.h>
27 27#include <stdlib.h>
28#include <stdio.h> 28#include <stdio.h>
29 29
30#include "lisp.h" 30#include "lisp.h"
@@ -48,11 +48,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
48#include "keyboard.h" 48#include "keyboard.h"
49#endif 49#endif
50 50
51extern char *getenv (const char *);
52
53extern struct passwd *getpwuid (uid_t);
54extern struct passwd *getpwnam (const char *);
55
56char *x_get_string_resource (XrmDatabase rdb, const char *name, 51char *x_get_string_resource (XrmDatabase rdb, const char *name,
57 const char *class); 52 const char *class);
58static int file_p (const char *filename); 53static int file_p (const char *filename);
@@ -429,8 +424,9 @@ get_environ_db (void)
429 { 424 {
430 static char const xdefaults[] = ".Xdefaults-"; 425 static char const xdefaults[] = ".Xdefaults-";
431 char *home = gethomedir (); 426 char *home = gethomedir ();
432 char const *host = get_system_name (); 427 char const *host = SSDATA (Vsystem_name);
433 ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host); 428 ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults
429 + SBYTES (Vsystem_name));
434 path = xrealloc (home, pathsize); 430 path = xrealloc (home, pathsize);
435 strcat (strcat (path, xdefaults), host); 431 strcat (strcat (path, xdefaults), host);
436 p = path; 432 p = path;