aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2010-12-19 00:43:42 -0500
committerStefan Monnier2010-12-19 00:43:42 -0500
commitef1b0ba7e5a82308514b8427cd84994805e61a4f (patch)
treeb859dcfe452c6b493b20c58a2c6af1d8032c296f /src
parent45720dc368101aa88ba2ec88f6259ae4aaf3d847 (diff)
downloademacs-ef1b0ba7e5a82308514b8427cd84994805e61a4f.tar.gz
emacs-ef1b0ba7e5a82308514b8427cd84994805e61a4f.zip
Minor clean up to silence some gcc warnings.
* src/window.c (Fset_window_buffer): * src/xterm.c (x_set_frame_alpha): Restructure code to silence compiler warning. (handle_one_xevent): Remove unused var `p'. (do_ewmh_fullscreen): Remove unused var `lval'. (xembed_set_info): Remove unused var `atom'. * src/textprop.c (Fremove_list_of_text_properties): Add braces to silence compiler warning. * src/fontset.c (fontset_id_valid_p, dump_fontset): * src/ftfont.c (ftfont_drive_otf): Modernize k&r declaration. * src/eval.c (Feval, Ffuncall): Avoid unneeded gotos. * src/dispnew.c (update_frame, update_frame_1): Compile the `do_pause' label only when it's used. * src/image.c (x_create_bitmap_from_xpm_data): * src/dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like its callers. * src/coding.c (detect_coding_utf_16): Remove unused vars `src_base' and `consumed_chars'. (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. (decode_coding_emacs_mule): Remove unused label `retry'. (detect_eol): Add parens to silence compiler warning. * src/alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where it's used to silence the compiler. (make_number): Modernize k&r declaration. (mark_char_table): Add parens to silence compiler warning.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog115
-rw-r--r--src/alloc.c9
-rw-r--r--src/coding.c76
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c4
-rw-r--r--src/eval.c262
-rw-r--r--src/fontset.c6
-rw-r--r--src/ftfont.c14
-rw-r--r--src/image.c2
-rw-r--r--src/lread.c10
-rw-r--r--src/textprop.c50
-rw-r--r--src/window.c11
-rw-r--r--src/xterm.c17
13 files changed, 302 insertions, 276 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f9287ea9c8f..4313c68f593 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,32 @@
12010-12-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 Minor clean up to silence some gcc warnings.
4 * window.c (Fset_window_buffer):
5 * xterm.c (x_set_frame_alpha): Restructure code to silence
6 compiler warning.
7 (handle_one_xevent): Remove unused var `p'.
8 (do_ewmh_fullscreen): Remove unused var `lval'.
9 (xembed_set_info): Remove unused var `atom'.
10 * textprop.c (Fremove_list_of_text_properties): Add braces to silence
11 compiler warning.
12 * fontset.c (fontset_id_valid_p, dump_fontset):
13 * ftfont.c (ftfont_drive_otf): Modernize k&r declaration.
14 * eval.c (Feval, Ffuncall): Avoid unneeded gotos.
15 * dispnew.c (update_frame, update_frame_1): Compile the `do_pause'
16 label only when it's used.
17 * image.c (x_create_bitmap_from_xpm_data):
18 * dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like
19 its callers.
20 * coding.c (detect_coding_utf_16): Remove unused vars `src_base' and
21 `consumed_chars'.
22 (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'.
23 (decode_coding_emacs_mule): Remove unused label `retry'.
24 (detect_eol): Add parens to silence compiler warning.
25 * alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where
26 it's used to silence the compiler.
27 (make_number): Modernize k&r declaration.
28 (mark_char_table): Add parens to silence compiler warning.
29
12010-12-17 Chong Yidong <cyd@stupidchicken.com> 302010-12-17 Chong Yidong <cyd@stupidchicken.com>
2 31
3 * keyboard.c (parse_tool_bar_item): Allow menu separators in 32 * keyboard.c (parse_tool_bar_item): Allow menu separators in
@@ -12,8 +41,8 @@
12 (xg_update_menu_item, xg_tool_bar_menu_proxy) 41 (xg_update_menu_item, xg_tool_bar_menu_proxy)
13 (xg_show_toolbar_item, update_frame_tool_bar): Use it. 42 (xg_show_toolbar_item, update_frame_tool_bar): Use it.
14 (separator_names, xg_separator_p): Move to keyboard.c. 43 (separator_names, xg_separator_p): Move to keyboard.c.
15 (create_menus, xg_update_submenu, update_frame_tool_bar): Use 44 (create_menus, xg_update_submenu, update_frame_tool_bar):
16 menu_separator_name_p. 45 Use menu_separator_name_p.
17 46
18 * nsmenu.m (name_is_separator): Function deleted. 47 * nsmenu.m (name_is_separator): Function deleted.
19 (addItemWithWidgetValue): Use menu_separator_name_p. 48 (addItemWithWidgetValue): Use menu_separator_name_p.
@@ -947,8 +976,8 @@
947 strings and R2L glyph rows. Fix comments. 976 strings and R2L glyph rows. Fix comments.
948 (note_mouse_highlight): When bidi reordering is turned on in a 977 (note_mouse_highlight): When bidi reordering is turned on in a
949 buffer, call next-single-property-change and 978 buffer, call next-single-property-change and
950 previous-single-property-change with last argument nil. Clear 979 previous-single-property-change with last argument nil.
951 mouse highlight when mouse pointer is in a R2L row on the stretch 980 Clear mouse highlight when mouse pointer is in a R2L row on the stretch
952 glyph that stands for no text beyond the line end. 981 glyph that stands for no text beyond the line end.
953 (row_containing_pos): Don't return too early when CHARPOS is in a 982 (row_containing_pos): Don't return too early when CHARPOS is in a
954 bidi-reordered continued line. Return immediately when the first 983 bidi-reordered continued line. Return immediately when the first
@@ -1391,8 +1420,8 @@
1391 1420
13922010-09-30 Lars Magne Ingebrigtsen <larsi@gnus.org> 14212010-09-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
1393 1422
1394 * eval.c (Fbacktrace): Don't overwrite print-level on exit. Also 1423 * eval.c (Fbacktrace): Don't overwrite print-level on exit.
1395 only override Vprint_level if it isn't already bound, and increase 1424 Also only override Vprint_level if it isn't already bound, and increase
1396 the level to 8 to produce more useful backtraces for bug reports. 1425 the level to 8 to produce more useful backtraces for bug reports.
1397 1426
13982010-09-30 Dan Nicolaescu <dann@ics.uci.edu> 14272010-09-30 Dan Nicolaescu <dann@ics.uci.edu>
@@ -1531,7 +1560,7 @@
1531 1560
15322010-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org> 15612010-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
1533 1562
1534 * gnutls.c (gnutls_log_function): Added more debugging. 1563 * gnutls.c (gnutls_log_function): Add more debugging.
1535 (emacs_gnutls_read): Don't infloop while reading. 1564 (emacs_gnutls_read): Don't infloop while reading.
1536 1565
15372010-09-27 Kenichi Handa <handa@m17n.org> 15662010-09-27 Kenichi Handa <handa@m17n.org>
@@ -1573,7 +1602,7 @@
1573 1602
1574 * process.c (gpm_wait_mask, max_gpm_desc): Remove. 1603 * process.c (gpm_wait_mask, max_gpm_desc): Remove.
1575 (write_mask): New variable. 1604 (write_mask): New variable.
1576 (max_input_desc): Renamed from max_keyboard_desc. 1605 (max_input_desc): Rename from max_keyboard_desc.
1577 (fd_callback_info): New variable. 1606 (fd_callback_info): New variable.
1578 (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): 1607 (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd):
1579 New functions. 1608 New functions.
@@ -2192,7 +2221,7 @@
2192 2221
21932010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org> 22222010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
2194 2223
2195 * xml.c (parse_buffer): Renamed to parse_string(), since that's 2224 * xml.c (parse_buffer): Rename to parse_string(), since that's
2196 what it does. 2225 what it does.
2197 (parse_string): Return nil when the document can't be parsed. 2226 (parse_string): Return nil when the document can't be parsed.
2198 2227
@@ -3350,7 +3379,7 @@
3350 (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. 3379 (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH.
3351 (xg_create_frame_widgets): Create a hobox for placing widgets 3380 (xg_create_frame_widgets): Create a hobox for placing widgets
3352 vertically. Use gtk_box_pack_start. 3381 vertically. Use gtk_box_pack_start.
3353 (xg_height_or_width_changed): Renamed from xg_height_changed. 3382 (xg_height_or_width_changed): Rename from xg_height_changed.
3354 (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. 3383 (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width.
3355 (xg_update_frame_menubar, free_frame_menubar): Change to 3384 (xg_update_frame_menubar, free_frame_menubar): Change to
3356 xg_height_or_width_changed. 3385 xg_height_or_width_changed.
@@ -3990,7 +4019,7 @@
3990 (Ffont_get): If KEY is :otf and the font-object doesn't have the 4019 (Ffont_get): If KEY is :otf and the font-object doesn't have the
3991 property, get the property value dynamically. 4020 property, get the property value dynamically.
3992 (Ffont_put): Accept font-entity and font-object too. 4021 (Ffont_put): Accept font-entity and font-object too.
3993 (Ffont_get_glyhphs): Renamed from Fget_font_glyphs. Arguments and 4022 (Ffont_get_glyhphs): Rename from Fget_font_glyphs. Arguments and
3994 return value changed. 4023 return value changed.
3995 (syms_of_font): Adjust for the above change. 4024 (syms_of_font): Adjust for the above change.
3996 4025
@@ -4063,7 +4092,7 @@
4063 * doprnt.c (doprnt): Take a va_list argument instead of count and 4092 * doprnt.c (doprnt): Take a va_list argument instead of count and
4064 pointer. 4093 pointer.
4065 * eval.c (error): Change to a standard-C variadic function. 4094 * eval.c (error): Change to a standard-C variadic function.
4066 * xdisp.c (vmessage): Renamed from message, made static, and 4095 * xdisp.c (vmessage): Rename from message, made static, and
4067 changed to take a va_list argument. 4096 changed to take a va_list argument.
4068 (message): New variadic wrapper. 4097 (message): New variadic wrapper.
4069 (message_nolog): Now a variadic function, calling vmessage. 4098 (message_nolog): Now a variadic function, calling vmessage.
@@ -5076,8 +5105,8 @@
5076 5105
5077 * xdisp.c (try_scrolling): Compute the limit for searching point 5106 * xdisp.c (try_scrolling): Compute the limit for searching point
5078 in forward scroll from scroll_max, instead of an arbitrary limit 5107 in forward scroll from scroll_max, instead of an arbitrary limit
5079 of 10 screen lines. See 5108 of 10 screen lines.
5080 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html 5109 See http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html
5081 and 5110 and
5082 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html 5111 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html
5083 for details. 5112 for details.
@@ -5325,8 +5354,8 @@
5325 Fix cursor motion in bidi-reordered continued lines. 5354 Fix cursor motion in bidi-reordered continued lines.
5326 * xdisp.c (try_cursor_movement): Backup to non-continuation line 5355 * xdisp.c (try_cursor_movement): Backup to non-continuation line
5327 only after finding point's row. Fix the logic. Rewrite the loop 5356 only after finding point's row. Fix the logic. Rewrite the loop
5328 over continuation lines in bidi-reordered buffers. Return 5357 over continuation lines in bidi-reordered buffers.
5329 CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, 5358 Return CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row,
5330 rather than CURSOR_MOVEMENT_CANNOT_BE_USED. 5359 rather than CURSOR_MOVEMENT_CANNOT_BE_USED.
5331 5360
53322010-05-28 Michael Albinus <michael.albinus@gmx.de> 53612010-05-28 Michael Albinus <michael.albinus@gmx.de>
@@ -6445,13 +6474,13 @@
6445 store_config_changed_event. 6474 store_config_changed_event.
6446 (parse_settings): Rename from parse_xft_settings. 6475 (parse_settings): Rename from parse_xft_settings.
6447 Read non-xft xsettings outside #ifdef HAVE_XFT. 6476 Read non-xft xsettings outside #ifdef HAVE_XFT.
6448 (read_settings): Renamed from read_xft_settings. 6477 (read_settings): Rename from read_xft_settings.
6449 (apply_xft_settings): Take current settings as parameter. Do not 6478 (apply_xft_settings): Take current settings as parameter. Do not
6450 call read_(xft)_settings. 6479 call read_(xft)_settings.
6451 (read_and_apply_settings): New function. 6480 (read_and_apply_settings): New function.
6452 (xft_settings_event): Do non-xft stuff out of HAVE_XFT. 6481 (xft_settings_event): Do non-xft stuff out of HAVE_XFT.
6453 Call read_and_apply_settings if there are settings to be read. 6482 Call read_and_apply_settings if there are settings to be read.
6454 (init_xsettings): Renamed from init_xfd_settings. 6483 (init_xsettings): Rename from init_xfd_settings.
6455 Call read_and_apply_settings unconditionally. 6484 Call read_and_apply_settings unconditionally.
6456 (xsettings_initialize): Call init_xsettings. 6485 (xsettings_initialize): Call init_xsettings.
6457 (Ftool_bar_get_system_style): New function. 6486 (Ftool_bar_get_system_style): New function.
@@ -9607,7 +9636,7 @@
9607 9636
9608 * makefile.w32-in ($(BLD)/doc.$(O)): Depend on buildobj.h, not on 9637 * makefile.w32-in ($(BLD)/doc.$(O)): Depend on buildobj.h, not on
9609 $(SRC)/buildobj.h. 9638 $(SRC)/buildobj.h.
9610 (buildobj.h): Renamed from $(SRC)/buildobj.h. 9639 (buildobj.h): Rename from $(SRC)/buildobj.h.
9611 (make-buildobj-CMD, make-buildobj-SH): Create buildobj.h, not 9640 (make-buildobj-CMD, make-buildobj-SH): Create buildobj.h, not
9612 $(SRC)/buildobj.h. 9641 $(SRC)/buildobj.h.
9613 (clean): Add buildobj.h. 9642 (clean): Add buildobj.h.
@@ -12651,12 +12680,12 @@
12651 12680
126522008-12-13 Kenichi Handa <handa@m17n.org> 126812008-12-13 Kenichi Handa <handa@m17n.org>
12653 12682
12654 * font.c (font_rescale_ratio): Moved from xfaces.c. 12683 * font.c (font_rescale_ratio): Move from xfaces.c.
12655 Argument type changed. Handle a font-spec too. 12684 Argument type changed. Handle a font-spec too.
12656 (font_score): Check Vface_font_rescale_alist. 12685 (font_score): Check Vface_font_rescale_alist.
12657 (font_open_entity): Likewise. (Bug#1547) 12686 (font_open_entity): Likewise. (Bug#1547)
12658 12687
12659 * xfaces.c (font_rescale_ratio): Moved to font.c. 12688 * xfaces.c (font_rescale_ratio): Move to font.c.
12660 12689
126612008-12-13 Chong Yidong <cyd@stupidchicken.com> 126902008-12-13 Chong Yidong <cyd@stupidchicken.com>
12662 12691
@@ -12674,7 +12703,7 @@
12674 12703
126752008-12-11 Chong Yidong <cyd@stupidchicken.com> 127042008-12-11 Chong Yidong <cyd@stupidchicken.com>
12676 12705
12677 * term.c (tty_free_frame_resources): Renamed from delete_tty_output; 12706 * term.c (tty_free_frame_resources): Rename from delete_tty_output;
12678 all callers changed. Call free_frame_faces to free the face cache. 12707 all callers changed. Call free_frame_faces to free the face cache.
12679 12708
126802008-12-11 Jason Rumney <jasonr@gnu.org> 127092008-12-11 Jason Rumney <jasonr@gnu.org>
@@ -18004,7 +18033,7 @@
18004 (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC) 18033 (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
18005 (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros. 18034 (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
18006 (struct font_spec, struct font_entity): New structs. 18035 (struct font_spec, struct font_entity): New structs.
18007 (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h. 18036 (FONT_ENCODING_NOT_DECIDED): Move from fontset.h.
18008 (struct font): Many members from old "struct font_info" moved to 18037 (struct font): Many members from old "struct font_info" moved to
18009 here. Members font and entity deleted. 18038 here. Members font and entity deleted.
18010 (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for 18039 (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
@@ -18012,7 +18041,7 @@
18012 (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT) 18041 (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
18013 (CHECK_FONT_GET_OBJECT): Likewise. 18042 (CHECK_FONT_GET_OBJECT): Likewise.
18014 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros. 18043 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
18015 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h. 18044 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move from font.h.
18016 (struct font_driver): New members case_sensitive anc check. 18045 (struct font_driver): New members case_sensitive anc check.
18017 Type of the member list and open changed. 18046 Type of the member list and open changed.
18018 (enable_font_backend, font_symbolic_weight, font_symbolic_slant) 18047 (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
@@ -18024,7 +18053,7 @@
18024 (enable_font_backend): Delete it. 18053 (enable_font_backend): Delete it.
18025 (Qfont_spec, Qfont_entity, Qfont_object): New variables. 18054 (Qfont_spec, Qfont_entity, Qfont_object): New variables.
18026 (CHECK_VALIDATE_FONT_SPEC): Delete it. 18055 (CHECK_VALIDATE_FONT_SPEC): Delete it.
18027 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h. 18056 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move to font.h.
18028 (null_string): Delete it. 18057 (null_string): Delete it.
18029 (null_vector): Make it static. 18058 (null_vector): Make it static.
18030 (font_family_alist): Delete it. 18059 (font_family_alist): Delete it.
@@ -18032,7 +18061,7 @@
18032 (QCextra, QClanguage): Delete it. 18061 (QCextra, QClanguage): Delete it.
18033 (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables. 18062 (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables.
18034 (font_make_spec, font_make_entity, font_make_object) 18063 (font_make_spec, font_make_entity, font_make_object)
18035 (font_intern_prop): Renamed from intern_downcase. Don't downcase 18064 (font_intern_prop): Rename from intern_downcase. Don't downcase
18036 the string. Callers changed. 18065 the string. Callers changed.
18037 (font_pixel_size): Adjust for the format change of font-related 18066 (font_pixel_size): Adjust for the format change of font-related
18038 objects. 18067 objects.
@@ -18052,7 +18081,7 @@
18052 (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd) 18081 (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd)
18053 (font_parse_fcname, font_unparse_fcname) 18082 (font_parse_fcname, font_unparse_fcname)
18054 (font_prepare_composition): Likewise. 18083 (font_prepare_composition): Likewise.
18055 (font_parse_family_registry): Renamed from font_merge_old_spec. 18084 (font_parse_family_registry): Rename from font_merge_old_spec.
18056 (otf_open): Delete the 1st arg entity. 18085 (otf_open): Delete the 1st arg entity.
18057 (font_otf_capability): Adjust for the above change. 18086 (font_otf_capability): Adjust for the above change.
18058 (font_score): New arg alternate_families. Adjusted for the change 18087 (font_score): New arg alternate_families. Adjusted for the change
@@ -18080,7 +18109,7 @@
18080 (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts) 18109 (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts)
18081 (Ffont_xlfd_name): Adjust for the change of font-related objects. 18110 (Ffont_xlfd_name): Adjust for the change of font-related objects.
18082 (Fcopy_font_spec, Fmerge_font_spec): New function. 18111 (Fcopy_font_spec, Fmerge_font_spec): New function.
18083 (Ffont_family_list): Renamed from list-families. 18112 (Ffont_family_list): Rename from list-families.
18084 (Finternal_set_font_style_table): Arguments changed. 18113 (Finternal_set_font_style_table): Arguments changed.
18085 (Ffont_fill_gstring, Ffont_shape_text, Fopen_font) 18114 (Ffont_fill_gstring, Ffont_shape_text, Fopen_font)
18086 (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjust for the 18115 (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjust for the
@@ -18089,7 +18118,7 @@
18089 18118
18090 * fontset.h (struct font_info): Delete it. Most members go to 18119 * fontset.h (struct font_info): Delete it. Most members go to
18091 struct font. 18120 struct font.
18092 (FONT_ENCODING_NOT_DECIDED): Moved to font.h. 18121 (FONT_ENCODING_NOT_DECIDED): Move to font.h.
18093 (enum FONT_SPEC_INDEX): Delete it. 18122 (enum FONT_SPEC_INDEX): Delete it.
18094 (font_info, list_fonts_func, load_font_func, query_font_func) 18123 (font_info, list_fonts_func, load_font_func, query_font_func)
18095 (set_frame_fontset_func, find_ccl_program_func) 18124 (set_frame_fontset_func, find_ccl_program_func)
@@ -18131,7 +18160,7 @@
18131 (Fnew_fontset): Use font_unparse_xlfd to generate 18160 (Fnew_fontset): Use font_unparse_xlfd to generate
18132 FONTSET_ASCII (fontset). 18161 FONTSET_ASCII (fontset).
18133 (new_fontset_from_font_name): Deleted. 18162 (new_fontset_from_font_name): Deleted.
18134 (fontset_from_font): Renamed from new_fontset_from_font. Check if 18163 (fontset_from_font): Rename from new_fontset_from_font. Check if
18135 a fontset is already created for the font. FIx updating of 18164 a fontset is already created for the font. FIx updating of
18136 Vfontset_alias_alist. 18165 Vfontset_alias_alist.
18137 (fontset_ascii_font): Deleted. 18166 (fontset_ascii_font): Deleted.
@@ -18240,7 +18269,7 @@
18240 by FONTP. 18269 by FONTP.
18241 (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. 18270 (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
18242 (set_lface_from_font_name): Delete it. 18271 (set_lface_from_font_name): Delete it.
18243 (set_lface_from_font): Renamed from 18272 (set_lface_from_font): Rename from
18244 set_lface_from_font_and_fontset. Caller changed. Don't set 18273 set_lface_from_font_and_fontset. Caller changed. Don't set
18245 LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable 18274 LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable
18246 for face. 18275 for face.
@@ -18281,12 +18310,12 @@
18281 * xfont.c: Include <stdlib.h> and "ccl.h". 18310 * xfont.c: Include <stdlib.h> and "ccl.h".
18282 (struct xfont_info): New structure. 18311 (struct xfont_info): New structure.
18283 (xfont_query_font): Deleted. 18312 (xfont_query_font): Deleted.
18284 (xfont_find_ccl_program): Renamed from x_find_ccl_program and 18313 (xfont_find_ccl_program): Rename from x_find_ccl_program and
18285 moved from xterm.c. 18314 moved from xterm.c.
18286 (xfont_driver): Adjust for the change of struct font_driver. 18315 (xfont_driver): Adjust for the change of struct font_driver.
18287 (compare_font_names): New function. 18316 (compare_font_names): New function.
18288 (xfont_list_pattern): Sort font names case insensitively. Make 18317 (xfont_list_pattern): Sort font names case insensitively.
18289 font_entity by calling font_make_entity. Avoid auto-scaled fonts. 18318 Make font_entity by calling font_make_entity. Avoid auto-scaled fonts.
18290 (xfont_list): Return a list, not vector. 18319 (xfont_list): Return a list, not vector.
18291 (xfont_match): If the font doesn't have QCname property, generate 18320 (xfont_match): If the font doesn't have QCname property, generate
18292 a name from the other font properties. 18321 a name from the other font properties.
@@ -18334,12 +18363,12 @@
18334 (x_draw_composite_glyph_string_foreground): Likewise. 18363 (x_draw_composite_glyph_string_foreground): Likewise.
18335 (x_draw_glyph_string): Likewise. Use font->underline_position and 18364 (x_draw_glyph_string): Likewise. Use font->underline_position and
18336 font->underline_thickness. 18365 font->underline_thickness.
18337 (x_new_font): Renamed from x_new_fontset2. 18366 (x_new_font): Rename from x_new_fontset2.
18338 (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. 18367 (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
18339 (x_check_font): Call `check' method of a font driver. 18368 (x_check_font): Call `check' method of a font driver.
18340 (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) 18369 (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
18341 (x_query_font, x_get_font_repertory): Deleted. 18370 (x_query_font, x_get_font_repertory): Deleted.
18342 (x_find_ccl_program): Renamed and moved to xfont.c. 18371 (x_find_ccl_program): Rename and moved to xfont.c.
18343 (x_redisplay_interface): Adjust for the change of `struct 18372 (x_redisplay_interface): Adjust for the change of `struct
18344 redisplay_interface'. 18373 redisplay_interface'.
18345 18374
@@ -18364,7 +18393,7 @@
18364 (w32font_close): Don't free struct font. Adjusted for the change 18393 (w32font_close): Don't free struct font. Adjusted for the change
18365 of struct w32font_info. 18394 of struct w32font_info.
18366 (w32font_encode_char, w32font_text_extents, w32font_draw): 18395 (w32font_encode_char, w32font_text_extents, w32font_draw):
18367 Adjusted for the change of struct w32font_info. 18396 Adjust for the change of struct w32font_info.
18368 (w32font_draw): Likewise. 18397 (w32font_draw): Likewise.
18369 (w32font_list_internal): Return a list, not vector. 18398 (w32font_list_internal): Return a list, not vector.
18370 (w32font_open_internal): Change the 4th arg to font-object. 18399 (w32font_open_internal): Change the 4th arg to font-object.
@@ -19766,11 +19795,11 @@
19766 * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call 19795 * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call
19767 xg_frame_resized when the event is for the edit widget. 19796 xg_frame_resized when the event is for the edit widget.
19768 19797
19769 * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets. 19798 * gtkutil.h (xg_frame_resized): Rename from xg_resize_widgets.
19770 19799
19771 * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or 19800 * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or
19772 set_char_size. 19801 set_char_size.
19773 (xg_frame_resized): Renamed from xg_resize_widgets. Remove all 19802 (xg_frame_resized): Rename from xg_resize_widgets. Remove all
19774 operations on widgets here. Just set frame size if needed. 19803 operations on widgets here. Just set frame size if needed.
19775 (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions. 19804 (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions.
19776 (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing. 19805 (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing.
@@ -22166,7 +22195,7 @@
22166 * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to 22195 * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to
22167 XLFD_XXX_INDEX. 22196 XLFD_XXX_INDEX.
22168 (enum xlfd_field_mask): New enum. 22197 (enum xlfd_field_mask): New enum.
22169 (intern_font_field): Changed argument. Change caller. If digits 22198 (intern_font_field): Change argument. Change caller. If digits
22170 are followed by non-digits, return a symbol. 22199 are followed by non-digits, return a symbol.
22171 (font_expand_wildcards): New function. 22200 (font_expand_wildcards): New function.
22172 (font_parse_xlfd): Fix wildcard handling. 22201 (font_parse_xlfd): Fix wildcard handling.
@@ -24906,8 +24935,8 @@
24906 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from 24935 (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from
24907 DECODE_EMACS_MULE_COMPOSITION_RULE. Change caller. 24936 DECODE_EMACS_MULE_COMPOSITION_RULE. Change caller.
24908 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro. 24937 (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro.
24909 (DECODE_EMACS_MULE_21_COMPOSITION): Call 24938 (DECODE_EMACS_MULE_21_COMPOSITION):
24910 DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation 24939 Call DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation
24911 sequence. 24940 sequence.
24912 (decode_coding_emacs_mule): Handle composition correctly. Rewind 24941 (decode_coding_emacs_mule): Handle composition correctly. Rewind
24913 `src' and `consumed_chars' correctly before calling emacs_mule_char. 24942 `src' and `consumed_chars' correctly before calling emacs_mule_char.
@@ -25328,7 +25357,7 @@
25328 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE. 25357 (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
25329 (GC_SUB_CHAR_TABLE_P): New macro. 25358 (GC_SUB_CHAR_TABLE_P): New macro.
25330 (Fencode_coding_string, Fdecode_coding_string): Update EXFUN. 25359 (Fencode_coding_string, Fdecode_coding_string): Update EXFUN.
25331 (code_convert_string_norecord): Deleted extern. 25360 (code_convert_string_norecord): Delete extern.
25332 (init_character_once, syms_of_character, init_charset) 25361 (init_character_once, syms_of_character, init_charset)
25333 (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them. 25362 (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
25334 25363
diff --git a/src/alloc.c b/src/alloc.c
index a1c78a408d9..e754e2f6aa2 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -143,8 +143,6 @@ static pthread_mutex_t alloc_mutex;
143 143
144static __malloc_size_t bytes_used_when_full; 144static __malloc_size_t bytes_used_when_full;
145 145
146static __malloc_size_t bytes_used_when_reconsidered;
147
148/* Mark, unmark, query mark bit of a Lisp string. S must be a pointer 146/* Mark, unmark, query mark bit of a Lisp string. S must be a pointer
149 to a struct Lisp_String. */ 147 to a struct Lisp_String. */
150 148
@@ -1140,6 +1138,8 @@ static void * (*old_malloc_hook) (size_t, const void *);
1140static void * (*old_realloc_hook) (void *, size_t, const void*); 1138static void * (*old_realloc_hook) (void *, size_t, const void*);
1141static void (*old_free_hook) (void*, const void*); 1139static void (*old_free_hook) (void*, const void*);
1142 1140
1141static __malloc_size_t bytes_used_when_reconsidered;
1142
1143/* This function is used as the hook for free to call. */ 1143/* This function is used as the hook for free to call. */
1144 1144
1145static void 1145static void
@@ -1491,8 +1491,7 @@ mark_interval_tree (register INTERVAL tree)
1491 can't create number objects in macros. */ 1491 can't create number objects in macros. */
1492#ifndef make_number 1492#ifndef make_number
1493Lisp_Object 1493Lisp_Object
1494make_number (n) 1494make_number (EMACS_INT n)
1495 EMACS_INT n;
1496{ 1495{
1497 Lisp_Object obj; 1496 Lisp_Object obj;
1498 obj.s.val = n; 1497 obj.s.val = n;
@@ -5270,7 +5269,7 @@ mark_char_table (struct Lisp_Vector *ptr)
5270 { 5269 {
5271 Lisp_Object val = ptr->contents[i]; 5270 Lisp_Object val = ptr->contents[i];
5272 5271
5273 if (INTEGERP (val) || SYMBOLP (val) && XSYMBOL (val)->gcmarkbit) 5272 if (INTEGERP (val) || (SYMBOLP (val) && XSYMBOL (val)->gcmarkbit))
5274 continue; 5273 continue;
5275 if (SUB_CHAR_TABLE_P (val)) 5274 if (SUB_CHAR_TABLE_P (val))
5276 { 5275 {
diff --git a/src/coding.c b/src/coding.c
index a7b7c7d6b23..e409ffdadf1 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1607,10 +1607,9 @@ static int
1607detect_coding_utf_16 (struct coding_system *coding, 1607detect_coding_utf_16 (struct coding_system *coding,
1608 struct coding_detection_info *detect_info) 1608 struct coding_detection_info *detect_info)
1609{ 1609{
1610 const unsigned char *src = coding->source, *src_base = src; 1610 const unsigned char *src = coding->source;
1611 const unsigned char *src_end = coding->source + coding->src_bytes; 1611 const unsigned char *src_end = coding->source + coding->src_bytes;
1612 int multibytep = coding->src_multibyte; 1612 int multibytep = coding->src_multibyte;
1613 int consumed_chars = 0;
1614 int c1, c2; 1613 int c1, c2;
1615 1614
1616 detect_info->checked |= CATEGORY_MASK_UTF_16; 1615 detect_info->checked |= CATEGORY_MASK_UTF_16;
@@ -2277,7 +2276,6 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src,
2277#define DECODE_EMACS_MULE_21_COMPOSITION() \ 2276#define DECODE_EMACS_MULE_21_COMPOSITION() \
2278 do { \ 2277 do { \
2279 enum composition_method method = c - 0xF2; \ 2278 enum composition_method method = c - 0xF2; \
2280 int *charbuf_base = charbuf; \
2281 int nbytes, nchars; \ 2279 int nbytes, nchars; \
2282 \ 2280 \
2283 ONE_MORE_BYTE (c); \ 2281 ONE_MORE_BYTE (c); \
@@ -2633,7 +2631,6 @@ decode_coding_emacs_mule (struct coding_system *coding)
2633 } 2631 }
2634 continue; 2632 continue;
2635 2633
2636 retry:
2637 src = src_base; 2634 src = src_base;
2638 consumed_chars = consumed_chars_base; 2635 consumed_chars = consumed_chars_base;
2639 continue; 2636 continue;
@@ -6260,8 +6257,9 @@ detect_eol (const unsigned char *source, EMACS_INT src_bytes,
6260 { 6257 {
6261 /* The found type is different from what found before. 6258 /* The found type is different from what found before.
6262 Allow for stray ^M characters in DOS EOL files. */ 6259 Allow for stray ^M characters in DOS EOL files. */
6263 if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF 6260 if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF)
6264 || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) 6261 || (eol_seen == EOL_SEEN_CRLF
6262 && this_eol == EOL_SEEN_CR))
6265 eol_seen = EOL_SEEN_CRLF; 6263 eol_seen = EOL_SEEN_CRLF;
6266 else 6264 else
6267 { 6265 {
@@ -6276,42 +6274,40 @@ detect_eol (const unsigned char *source, EMACS_INT src_bytes,
6276 } 6274 }
6277 } 6275 }
6278 else 6276 else
6279 { 6277 while (src < src_end)
6280 while (src < src_end) 6278 {
6281 { 6279 c = *src++;
6282 c = *src++; 6280 if (c == '\n' || c == '\r')
6283 if (c == '\n' || c == '\r') 6281 {
6284 { 6282 int this_eol;
6285 int this_eol;
6286 6283
6287 if (c == '\n') 6284 if (c == '\n')
6288 this_eol = EOL_SEEN_LF; 6285 this_eol = EOL_SEEN_LF;
6289 else if (src >= src_end || *src != '\n') 6286 else if (src >= src_end || *src != '\n')
6290 this_eol = EOL_SEEN_CR; 6287 this_eol = EOL_SEEN_CR;
6291 else 6288 else
6292 this_eol = EOL_SEEN_CRLF, src++; 6289 this_eol = EOL_SEEN_CRLF, src++;
6293 6290
6294 if (eol_seen == EOL_SEEN_NONE) 6291 if (eol_seen == EOL_SEEN_NONE)
6295 /* This is the first end-of-line. */ 6292 /* This is the first end-of-line. */
6296 eol_seen = this_eol; 6293 eol_seen = this_eol;
6297 else if (eol_seen != this_eol) 6294 else if (eol_seen != this_eol)
6298 { 6295 {
6299 /* The found type is different from what found before. 6296 /* The found type is different from what found before.
6300 Allow for stray ^M characters in DOS EOL files. */ 6297 Allow for stray ^M characters in DOS EOL files. */
6301 if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF 6298 if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF)
6302 || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) 6299 || (eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR))
6303 eol_seen = EOL_SEEN_CRLF; 6300 eol_seen = EOL_SEEN_CRLF;
6304 else 6301 else
6305 { 6302 {
6306 eol_seen = EOL_SEEN_LF; 6303 eol_seen = EOL_SEEN_LF;
6307 break; 6304 break;
6308 } 6305 }
6309 } 6306 }
6310 if (++total == MAX_EOL_CHECK_COUNT) 6307 if (++total == MAX_EOL_CHECK_COUNT)
6311 break; 6308 break;
6312 } 6309 }
6313 } 6310 }
6314 }
6315 return eol_seen; 6311 return eol_seen;
6316} 6312}
6317 6313
diff --git a/src/dispextern.h b/src/dispextern.h
index 175dbe1975c..2839ee78817 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3131,7 +3131,7 @@ extern int x_create_bitmap_from_data (struct frame *, char *,
3131 unsigned int, unsigned int); 3131 unsigned int, unsigned int);
3132extern int x_create_bitmap_from_file (struct frame *, Lisp_Object); 3132extern int x_create_bitmap_from_file (struct frame *, Lisp_Object);
3133#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) 3133#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
3134extern int x_create_bitmap_from_xpm_data (struct frame *f, char **bits); 3134extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits);
3135#endif 3135#endif
3136#ifndef x_destroy_bitmap 3136#ifndef x_destroy_bitmap
3137extern void x_destroy_bitmap (struct frame *, int); 3137extern void x_destroy_bitmap (struct frame *, int);
diff --git a/src/dispnew.c b/src/dispnew.c
index 5d4ce012530..fa13024cf2e 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3447,7 +3447,9 @@ update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
3447#endif 3447#endif
3448 } 3448 }
3449 3449
3450#if PERIODIC_PREEMPTION_CHECKING
3450 do_pause: 3451 do_pause:
3452#endif
3451 /* Reset flags indicating that a window should be updated. */ 3453 /* Reset flags indicating that a window should be updated. */
3452 set_window_update_flags (root_window, 0); 3454 set_window_update_flags (root_window, 0);
3453 3455
@@ -4908,7 +4910,9 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
4908 } 4910 }
4909 } 4911 }
4910 4912
4913#if !PERIODIC_PREEMPTION_CHECKING
4911 do_pause: 4914 do_pause:
4915#endif
4912 4916
4913 clear_desired_matrices (f); 4917 clear_desired_matrices (f);
4914 return pause; 4918 return pause;
diff --git a/src/eval.c b/src/eval.c
index 8580ceb8c38..f8874ddd559 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2291,14 +2291,12 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2291 (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) 2291 (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs)))
2292 xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); 2292 xsignal2 (Qwrong_number_of_arguments, original_fun, numargs);
2293 2293
2294 if (XSUBR (fun)->max_args == UNEVALLED) 2294 else if (XSUBR (fun)->max_args == UNEVALLED)
2295 { 2295 {
2296 backtrace.evalargs = 0; 2296 backtrace.evalargs = 0;
2297 val = (XSUBR (fun)->function.aUNEVALLED) (args_left); 2297 val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
2298 goto done;
2299 } 2298 }
2300 2299 else if (XSUBR (fun)->max_args == MANY)
2301 if (XSUBR (fun)->max_args == MANY)
2302 { 2300 {
2303 /* Pass a vector of evaluated arguments */ 2301 /* Pass a vector of evaluated arguments */
2304 Lisp_Object *vals; 2302 Lisp_Object *vals;
@@ -2324,73 +2322,76 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2324 val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); 2322 val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
2325 UNGCPRO; 2323 UNGCPRO;
2326 SAFE_FREE (); 2324 SAFE_FREE ();
2327 goto done;
2328 } 2325 }
2329 2326 else
2330 GCPRO3 (args_left, fun, fun);
2331 gcpro3.var = argvals;
2332 gcpro3.nvars = 0;
2333
2334 maxargs = XSUBR (fun)->max_args;
2335 for (i = 0; i < maxargs; args_left = Fcdr (args_left))
2336 { 2327 {
2337 argvals[i] = Feval (Fcar (args_left)); 2328 GCPRO3 (args_left, fun, fun);
2338 gcpro3.nvars = ++i; 2329 gcpro3.var = argvals;
2339 } 2330 gcpro3.nvars = 0;
2340 2331
2341 UNGCPRO; 2332 maxargs = XSUBR (fun)->max_args;
2333 for (i = 0; i < maxargs; args_left = Fcdr (args_left))
2334 {
2335 argvals[i] = Feval (Fcar (args_left));
2336 gcpro3.nvars = ++i;
2337 }
2342 2338
2343 backtrace.args = argvals; 2339 UNGCPRO;
2344 backtrace.nargs = XINT (numargs);
2345 2340
2346 switch (i) 2341 backtrace.args = argvals;
2347 { 2342 backtrace.nargs = XINT (numargs);
2348 case 0: 2343
2349 val = (XSUBR (fun)->function.a0) (); 2344 switch (i)
2350 goto done; 2345 {
2351 case 1: 2346 case 0:
2352 val = (XSUBR (fun)->function.a1) (argvals[0]); 2347 val = (XSUBR (fun)->function.a0 ());
2353 goto done; 2348 break;
2354 case 2: 2349 case 1:
2355 val = (XSUBR (fun)->function.a2) (argvals[0], argvals[1]); 2350 val = (XSUBR (fun)->function.a1 (argvals[0]));
2356 goto done; 2351 break;
2357 case 3: 2352 case 2:
2358 val = (XSUBR (fun)->function.a3) (argvals[0], argvals[1], 2353 val = (XSUBR (fun)->function.a2 (argvals[0], argvals[1]));
2359 argvals[2]); 2354 break;
2360 goto done; 2355 case 3:
2361 case 4: 2356 val = (XSUBR (fun)->function.a3
2362 val = (XSUBR (fun)->function.a4) (argvals[0], argvals[1], 2357 (argvals[0], argvals[1], argvals[2]));
2363 argvals[2], argvals[3]); 2358 break;
2364 goto done; 2359 case 4:
2365 case 5: 2360 val = (XSUBR (fun)->function.a4
2366 val = (XSUBR (fun)->function.a5) (argvals[0], argvals[1], argvals[2], 2361 (argvals[0], argvals[1], argvals[2], argvals[3]));
2367 argvals[3], argvals[4]); 2362 break;
2368 goto done; 2363 case 5:
2369 case 6: 2364 val = (XSUBR (fun)->function.a5
2370 val = (XSUBR (fun)->function.a6) (argvals[0], argvals[1], argvals[2], 2365 (argvals[0], argvals[1], argvals[2], argvals[3],
2371 argvals[3], argvals[4], argvals[5]); 2366 argvals[4]));
2372 goto done; 2367 break;
2373 case 7: 2368 case 6:
2374 val = (XSUBR (fun)->function.a7) (argvals[0], argvals[1], argvals[2], 2369 val = (XSUBR (fun)->function.a6
2375 argvals[3], argvals[4], argvals[5], 2370 (argvals[0], argvals[1], argvals[2], argvals[3],
2376 argvals[6]); 2371 argvals[4], argvals[5]));
2377 goto done; 2372 break;
2378 2373 case 7:
2379 case 8: 2374 val = (XSUBR (fun)->function.a7
2380 val = (XSUBR (fun)->function.a8) (argvals[0], argvals[1], argvals[2], 2375 (argvals[0], argvals[1], argvals[2], argvals[3],
2381 argvals[3], argvals[4], argvals[5], 2376 argvals[4], argvals[5], argvals[6]));
2382 argvals[6], argvals[7]); 2377 break;
2383 goto done; 2378
2384 2379 case 8:
2385 default: 2380 val = (XSUBR (fun)->function.a8
2386 /* Someone has created a subr that takes more arguments than 2381 (argvals[0], argvals[1], argvals[2], argvals[3],
2387 is supported by this code. We need to either rewrite the 2382 argvals[4], argvals[5], argvals[6], argvals[7]));
2388 subr to use a different argument protocol, or add more 2383 break;
2389 cases to this switch. */ 2384
2390 abort (); 2385 default:
2386 /* Someone has created a subr that takes more arguments than
2387 is supported by this code. We need to either rewrite the
2388 subr to use a different argument protocol, or add more
2389 cases to this switch. */
2390 abort ();
2391 }
2391 } 2392 }
2392 } 2393 }
2393 if (COMPILEDP (fun)) 2394 else if (COMPILEDP (fun))
2394 val = apply_lambda (fun, original_args, 1); 2395 val = apply_lambda (fun, original_args, 1);
2395 else 2396 else
2396 { 2397 {
@@ -2413,7 +2414,6 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2413 else 2414 else
2414 xsignal1 (Qinvalid_function, original_fun); 2415 xsignal1 (Qinvalid_function, original_fun);
2415 } 2416 }
2416 done:
2417 CHECK_CONS_LIST (); 2417 CHECK_CONS_LIST ();
2418 2418
2419 lisp_eval_depth--; 2419 lisp_eval_depth--;
@@ -2956,83 +2956,84 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2956 2956
2957 if (SUBRP (fun)) 2957 if (SUBRP (fun))
2958 { 2958 {
2959 if (numargs < XSUBR (fun)->min_args 2959 if (numargs < XSUBR (fun)->min_args
2960 || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) 2960 || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs))
2961 { 2961 {
2962 XSETFASTINT (lisp_numargs, numargs); 2962 XSETFASTINT (lisp_numargs, numargs);
2963 xsignal2 (Qwrong_number_of_arguments, original_fun, lisp_numargs); 2963 xsignal2 (Qwrong_number_of_arguments, original_fun, lisp_numargs);
2964 } 2964 }
2965 2965
2966 if (XSUBR (fun)->max_args == UNEVALLED) 2966 else if (XSUBR (fun)->max_args == UNEVALLED)
2967 xsignal1 (Qinvalid_function, original_fun); 2967 xsignal1 (Qinvalid_function, original_fun);
2968 2968
2969 if (XSUBR (fun)->max_args == MANY) 2969 else if (XSUBR (fun)->max_args == MANY)
2970 { 2970 val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
2971 val = (XSUBR (fun)->function.aMANY) (numargs, args + 1);
2972 goto done;
2973 }
2974
2975 if (XSUBR (fun)->max_args > numargs)
2976 {
2977 internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object));
2978 memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object));
2979 for (i = numargs; i < XSUBR (fun)->max_args; i++)
2980 internal_args[i] = Qnil;
2981 }
2982 else 2971 else
2983 internal_args = args + 1;
2984 switch (XSUBR (fun)->max_args)
2985 { 2972 {
2986 case 0: 2973 if (XSUBR (fun)->max_args > numargs)
2987 val = (XSUBR (fun)->function.a0) (); 2974 {
2988 goto done; 2975 internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object));
2989 case 1: 2976 memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object));
2990 val = (XSUBR (fun)->function.a1) (internal_args[0]); 2977 for (i = numargs; i < XSUBR (fun)->max_args; i++)
2991 goto done; 2978 internal_args[i] = Qnil;
2992 case 2: 2979 }
2993 val = (XSUBR (fun)->function.a2) (internal_args[0], internal_args[1]); 2980 else
2994 goto done; 2981 internal_args = args + 1;
2995 case 3: 2982 switch (XSUBR (fun)->max_args)
2996 val = (XSUBR (fun)->function.a3) (internal_args[0], internal_args[1], 2983 {
2997 internal_args[2]); 2984 case 0:
2998 goto done; 2985 val = (XSUBR (fun)->function.a0 ());
2999 case 4: 2986 break;
3000 val = (XSUBR (fun)->function.a4) (internal_args[0], internal_args[1], 2987 case 1:
3001 internal_args[2], internal_args[3]); 2988 val = (XSUBR (fun)->function.a1 (internal_args[0]));
3002 goto done; 2989 break;
3003 case 5: 2990 case 2:
3004 val = (XSUBR (fun)->function.a5) (internal_args[0], internal_args[1], 2991 val = (XSUBR (fun)->function.a2
3005 internal_args[2], internal_args[3], 2992 (internal_args[0], internal_args[1]));
3006 internal_args[4]); 2993 break;
3007 goto done; 2994 case 3:
3008 case 6: 2995 val = (XSUBR (fun)->function.a3
3009 val = (XSUBR (fun)->function.a6) (internal_args[0], internal_args[1], 2996 (internal_args[0], internal_args[1], internal_args[2]));
3010 internal_args[2], internal_args[3], 2997 break;
3011 internal_args[4], internal_args[5]); 2998 case 4:
3012 goto done; 2999 val = (XSUBR (fun)->function.a4
3013 case 7: 3000 (internal_args[0], internal_args[1], internal_args[2],
3014 val = (XSUBR (fun)->function.a7) (internal_args[0], internal_args[1], 3001 internal_args[3]));
3015 internal_args[2], internal_args[3], 3002 break;
3016 internal_args[4], internal_args[5], 3003 case 5:
3017 internal_args[6]); 3004 val = (XSUBR (fun)->function.a5
3018 goto done; 3005 (internal_args[0], internal_args[1], internal_args[2],
3019 3006 internal_args[3], internal_args[4]));
3020 case 8: 3007 break;
3021 val = (XSUBR (fun)->function.a8) (internal_args[0], internal_args[1], 3008 case 6:
3022 internal_args[2], internal_args[3], 3009 val = (XSUBR (fun)->function.a6
3023 internal_args[4], internal_args[5], 3010 (internal_args[0], internal_args[1], internal_args[2],
3024 internal_args[6], internal_args[7]); 3011 internal_args[3], internal_args[4], internal_args[5]));
3025 goto done; 3012 break;
3026 3013 case 7:
3027 default: 3014 val = (XSUBR (fun)->function.a7
3028 3015 (internal_args[0], internal_args[1], internal_args[2],
3029 /* If a subr takes more than 8 arguments without using MANY 3016 internal_args[3], internal_args[4], internal_args[5],
3030 or UNEVALLED, we need to extend this function to support it. 3017 internal_args[6]));
3031 Until this is done, there is no way to call the function. */ 3018 break;
3032 abort (); 3019
3020 case 8:
3021 val = (XSUBR (fun)->function.a8
3022 (internal_args[0], internal_args[1], internal_args[2],
3023 internal_args[3], internal_args[4], internal_args[5],
3024 internal_args[6], internal_args[7]));
3025 break;
3026
3027 default:
3028
3029 /* If a subr takes more than 8 arguments without using MANY
3030 or UNEVALLED, we need to extend this function to support it.
3031 Until this is done, there is no way to call the function. */
3032 abort ();
3033 }
3033 } 3034 }
3034 } 3035 }
3035 if (COMPILEDP (fun)) 3036 else if (COMPILEDP (fun))
3036 val = funcall_lambda (fun, numargs, args + 1); 3037 val = funcall_lambda (fun, numargs, args + 1);
3037 else 3038 else
3038 { 3039 {
@@ -3054,7 +3055,6 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
3054 else 3055 else
3055 xsignal1 (Qinvalid_function, original_fun); 3056 xsignal1 (Qinvalid_function, original_fun);
3056 } 3057 }
3057 done:
3058 CHECK_CONS_LIST (); 3058 CHECK_CONS_LIST ();
3059 lisp_eval_depth--; 3059 lisp_eval_depth--;
3060 if (backtrace.debug_on_exit) 3060 if (backtrace.debug_on_exit)
diff --git a/src/fontset.c b/src/fontset.c
index 86b9ceb45db..9b140be8d70 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -225,8 +225,7 @@ static void set_fontset_font (Lisp_Object, Lisp_Object);
225/* Return 1 if ID is a valid fontset id, else return 0. */ 225/* Return 1 if ID is a valid fontset id, else return 0. */
226 226
227static int 227static int
228fontset_id_valid_p (id) 228fontset_id_valid_p (int id)
229 int id;
230{ 229{
231 return (id >= 0 && id < ASIZE (Vfontset_table) - 1); 230 return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
232} 231}
@@ -2128,8 +2127,7 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0,
2128#ifdef FONTSET_DEBUG 2127#ifdef FONTSET_DEBUG
2129 2128
2130Lisp_Object 2129Lisp_Object
2131dump_fontset (fontset) 2130dump_fontset (Lisp_Object fontset)
2132 Lisp_Object fontset;
2133{ 2131{
2134 Lisp_Object vec; 2132 Lisp_Object vec;
2135 2133
diff --git a/src/ftfont.c b/src/ftfont.c
index d9ae9be0905..66edbe16fed 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1767,13 +1767,13 @@ setup_otf_gstring (int size)
1767 position adjustment information in ADJUSTMENT. */ 1767 position adjustment information in ADJUSTMENT. */
1768 1768
1769static int 1769static int
1770ftfont_drive_otf (font, spec, in, from, to, out, adjustment) 1770ftfont_drive_otf (MFLTFont *font,
1771 MFLTFont *font; 1771 MFLTOtfSpec *spec,
1772 MFLTOtfSpec *spec; 1772 MFLTGlyphString *in,
1773 MFLTGlyphString *in; 1773 int from,
1774 int from, to; 1774 int to,
1775 MFLTGlyphString *out; 1775 MFLTGlyphString *out,
1776 MFLTGlyphAdjustment *adjustment; 1776 MFLTGlyphAdjustment *adjustment)
1777{ 1777{
1778 struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font; 1778 struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font;
1779 FT_Face ft_face = flt_font_ft->ft_face; 1779 FT_Face ft_face = flt_font_ft->ft_face;
diff --git a/src/image.c b/src/image.c
index 828c2d319be..07f573ca893 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3332,7 +3332,7 @@ xpm_image_p (Lisp_Object object)
3332 3332
3333#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) 3333#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
3334int 3334int
3335x_create_bitmap_from_xpm_data (struct frame *f, char **bits) 3335x_create_bitmap_from_xpm_data (struct frame *f, const char **bits)
3336{ 3336{
3337 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 3337 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3338 int id, rc; 3338 int id, rc;
diff --git a/src/lread.c b/src/lread.c
index c7b8e70963f..811e83fe2ae 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2888,10 +2888,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2888 { 2888 {
2889 char *end = read_buffer + read_buffer_size; 2889 char *end = read_buffer + read_buffer_size;
2890 2890
2891 while (c > 040 2891 do
2892 && c != 0x8a0 /* NBSP */
2893 && (c >= 0200
2894 || !(strchr ("\"';()[]#`,", c))))
2895 { 2892 {
2896 if (end - p < MAX_MULTIBYTE_LENGTH) 2893 if (end - p < MAX_MULTIBYTE_LENGTH)
2897 { 2894 {
@@ -2915,7 +2912,10 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2915 else 2912 else
2916 *p++ = c; 2913 *p++ = c;
2917 c = READCHAR; 2914 c = READCHAR;
2918 } 2915 } while (c > 040
2916 && c != 0x8a0 /* NBSP */
2917 && (c >= 0200
2918 || !(strchr ("\"';()[]#`,", c))));
2919 2919
2920 if (p == end) 2920 if (p == end)
2921 { 2921 {
diff --git a/src/textprop.c b/src/textprop.c
index 88e869b13e9..9016705d764 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1604,17 +1604,19 @@ Return t if any property was actually removed, nil otherwise. */)
1604 if (LENGTH (i) >= len) 1604 if (LENGTH (i) >= len)
1605 { 1605 {
1606 if (! interval_has_some_properties_list (properties, i)) 1606 if (! interval_has_some_properties_list (properties, i))
1607 if (modified) 1607 {
1608 { 1608 if (modified)
1609 if (BUFFERP (object)) 1609 {
1610 signal_after_change (XINT (start), XINT (end) - XINT (start), 1610 if (BUFFERP (object))
1611 XINT (end) - XINT (start)); 1611 signal_after_change (XINT (start),
1612 return Qt; 1612 XINT (end) - XINT (start),
1613 } 1613 XINT (end) - XINT (start));
1614 else 1614 return Qt;
1615 return Qnil; 1615 }
1616 1616 else
1617 if (LENGTH (i) == len) 1617 return Qnil;
1618 }
1619 else if (LENGTH (i) == len)
1618 { 1620 {
1619 if (!modified && BUFFERP (object)) 1621 if (!modified && BUFFERP (object))
1620 modify_region (XBUFFER (object), XINT (start), XINT (end), 1); 1622 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
@@ -1624,20 +1626,20 @@ Return t if any property was actually removed, nil otherwise. */)
1624 XINT (end) - XINT (start)); 1626 XINT (end) - XINT (start));
1625 return Qt; 1627 return Qt;
1626 } 1628 }
1627 1629 else
1628 /* i has the properties, and goes past the change limit */ 1630 { /* i has the properties, and goes past the change limit. */
1629 unchanged = i; 1631 unchanged = i;
1630 i = split_interval_left (i, len); 1632 i = split_interval_left (i, len);
1631 copy_properties (unchanged, i); 1633 copy_properties (unchanged, i);
1632 if (!modified && BUFFERP (object)) 1634 if (!modified && BUFFERP (object))
1633 modify_region (XBUFFER (object), XINT (start), XINT (end), 1); 1635 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1634 remove_properties (Qnil, properties, i, object); 1636 remove_properties (Qnil, properties, i, object);
1635 if (BUFFERP (object)) 1637 if (BUFFERP (object))
1636 signal_after_change (XINT (start), XINT (end) - XINT (start), 1638 signal_after_change (XINT (start), XINT (end) - XINT (start),
1637 XINT (end) - XINT (start)); 1639 XINT (end) - XINT (start));
1638 return Qt; 1640 return Qt;
1641 }
1639 } 1642 }
1640
1641 if (interval_has_some_properties_list (properties, i)) 1643 if (interval_has_some_properties_list (properties, i))
1642 { 1644 {
1643 if (!modified && BUFFERP (object)) 1645 if (!modified && BUFFERP (object))
diff --git a/src/window.c b/src/window.c
index a2a0c793111..e66fde9ec02 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3522,11 +3522,12 @@ This function runs `window-scroll-functions' before running
3522 else if (!EQ (tem, Qt)) 3522 else if (!EQ (tem, Qt))
3523 /* w->buffer is t when the window is first being set up. */ 3523 /* w->buffer is t when the window is first being set up. */
3524 { 3524 {
3525 if (!EQ (tem, buffer)) 3525 if (EQ (tem, buffer))
3526 if (EQ (w->dedicated, Qt)) 3526 return Qnil;
3527 error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); 3527 else if (EQ (w->dedicated, Qt))
3528 else 3528 error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name));
3529 w->dedicated = Qnil; 3529 else
3530 w->dedicated = Qnil;
3530 3531
3531 unshow_buffer (w); 3532 unshow_buffer (w);
3532 } 3533 }
diff --git a/src/xterm.c b/src/xterm.c
index a571d025571..7b5b85b3651 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -489,14 +489,14 @@ x_set_frame_alpha (struct frame *f)
489 &data); 489 &data);
490 490
491 if (rc == Success && actual != None) 491 if (rc == Success && actual != None)
492 if (*(unsigned long *)data == opac) 492 {
493 {
494 XFree ((void *) data);
495 x_uncatch_errors ();
496 return;
497 }
498 else
499 XFree ((void *) data); 493 XFree ((void *) data);
494 if (*(unsigned long *)data == opac)
495 {
496 x_uncatch_errors ();
497 return;
498 }
499 }
500 x_uncatch_errors (); 500 x_uncatch_errors ();
501 } 501 }
502 502
@@ -6498,7 +6498,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish,
6498 { 6498 {
6499 /* Decode the input data. */ 6499 /* Decode the input data. */
6500 int require; 6500 int require;
6501 unsigned char *p;
6502 6501
6503 /* The input should be decoded with `coding_system' 6502 /* The input should be decoded with `coding_system'
6504 which depends on which X*LookupString function 6503 which depends on which X*LookupString function
@@ -8469,7 +8468,6 @@ do_ewmh_fullscreen (struct frame *f)
8469{ 8468{
8470 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 8469 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8471 int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); 8470 int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state);
8472 Lisp_Object lval = get_frame_param (f, Qfullscreen);
8473 int cur, dummy; 8471 int cur, dummy;
8474 8472
8475 get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); 8473 get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
@@ -8992,7 +8990,6 @@ XTframe_raise_lower (FRAME_PTR f, int raise_flag)
8992void 8990void
8993xembed_set_info (struct frame *f, enum xembed_info flags) 8991xembed_set_info (struct frame *f, enum xembed_info flags)
8994{ 8992{
8995 Atom atom;
8996 unsigned long data[2]; 8993 unsigned long data[2];
8997 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 8994 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
8998 8995