aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-05-23 05:08:13 +0000
committerKaroly Lorentey2004-05-23 05:08:13 +0000
commit2d2884b5c5f2e1ce27e30123111536f9db8ddfc7 (patch)
treed429cc1578b1d8bcb8d9f0a9d161d8f2361d8ae3 /src
parentd4d89d3741e8cfd34f7db695bf2a801e5584f9a7 (diff)
parent71d5a208a41e0982a9565d8cc215bd110fcac864 (diff)
downloademacs-2d2884b5c5f2e1ce27e30123111536f9db8ddfc7.tar.gz
emacs-2d2884b5c5f2e1ce27e30123111536f9db8ddfc7.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-330 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-331 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-332 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-333 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-334 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-335 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-336 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-337 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-338 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-173
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog138
-rw-r--r--src/alloc.c74
-rw-r--r--src/buffer.c10
-rw-r--r--src/casefiddle.c6
-rw-r--r--src/emacs.c2
-rw-r--r--src/fileio.c9
-rw-r--r--src/insdel.c4
-rw-r--r--src/intervals.c12
-rw-r--r--src/keyboard.c3
-rw-r--r--src/keymap.c8
-rw-r--r--src/xdisp.c14
11 files changed, 180 insertions, 100 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c1f0706b928..68f74e457e9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,51 @@
12004-05-22 Richard M. Stallman <rms@gnu.org>
2
3 * alloc.c (Fmake_string): Doc fix.
4
5 * buffer.c (clone_per_buffer_values): Copy the alist of local vars,
6 and the alist pairs too.
7
8 * casefiddle.c (casify_object): Return OBJ unchanged if not real char.
9
10 * emacs.c (main): Update copyright year.
11
12 * fileio.c (Fread_file_name): Expand DIR if not absolute.
13
14 * insdel.c (del_range_2, replace_range): Don't write an anchor
15 if the gap is empty.
16
17 * xdisp.c (try_scrolling): If scroll-up-aggressively or
18 scroll-down-aggressively is small but positive, put point
19 near the screen edge.
20
212004-05-22 Juanma Barranquero <lektu@terra.es>
22
23 * keymap.c (Fdefine_key): Doc fix.
24
252004-05-22 Kim F. Storm <storm@cua.dk>
26
27 * alloc.c (struct backtrace): Add debug_on_exit member.
28 (Fgarbage_collect): Clear out buffer undo_list markers after gc_sweep.
29 Identify those markers as Lisp_Misc_Free objects. Clear car and cdr of
30 the removed cons cells.
31 (mark_object): Undo previous change - disallow Lisp_Misc_Free objects.
32 (gc_sweep): Clear cons_blocks before sweeping strings, so we don't have
33 any cons cells pointing to unallocated stings.
34 Do not lisp_free any marker blocks, as there may still be pointers
35 to them from buffer undo lists at this stage of GC.
36
37 * keyboard.c (struct backtrace): Add debug_on_exit member.
38 (Fcommand_execute): Clear it.
39
402004-05-20 Luc Teirlinck <teirllm@auburn.edu>
41
42 * intervals.c (lookup_char_property): Do not prematurely return nil.
43
12004-05-19 Jim Blandy <jimb@redhat.com> 442004-05-19 Jim Blandy <jimb@redhat.com>
2 45
3 Add support for new '\_<' and '\_>' regexp operators, matching the 46 Add support for new '\_<' and '\_>' regexp operators, matching the
4 beginning and ends of symbols. 47 beginning and end of symbols.
48
5 * regex.c (enum syntaxcode): Add Ssymbol. 49 * regex.c (enum syntaxcode): Add Ssymbol.
6 (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword. 50 (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword.
7 (re_opcode_t): New opcodes `symbeg' and `symend'. 51 (re_opcode_t): New opcodes `symbeg' and `symend'.
@@ -1219,7 +1263,7 @@
1219 1263
1220 * macterm.c (XTread_socket): Remove bufp_r and 1264 * macterm.c (XTread_socket): Remove bufp_r and
1221 numcharsp args. Add hold_quit arg. 1265 numcharsp args. Add hold_quit arg.
1222 Rework to use just one, local, inev input_event. Store inev 1266 Rework to use just one, local, inev input_event. Store inev
1223 directly in fifo using kbd_buffer_store_event_hold. 1267 directly in fifo using kbd_buffer_store_event_hold.
1224 1268
1225 * sysdep.c (BUFFER_SIZE_FACTOR): Remove. 1269 * sysdep.c (BUFFER_SIZE_FACTOR): Remove.
@@ -1235,14 +1279,14 @@
1235 1279
1236 * w32inevt.c (w32_console_read_socket): Remove bufp_r and 1280 * w32inevt.c (w32_console_read_socket): Remove bufp_r and
1237 numcharsp args. Add hold_quit arg. 1281 numcharsp args. Add hold_quit arg.
1238 Rework to use just one, local, inev input_event. Store inev 1282 Rework to use just one, local, inev input_event. Store inev
1239 directly in fifo using kbd_buffer_store_event_hold. 1283 directly in fifo using kbd_buffer_store_event_hold.
1240 1284
1241 * w32inevt.h (w32_console_mouse_position): Fix prototype. 1285 * w32inevt.h (w32_console_mouse_position): Fix prototype.
1242 1286
1243 * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args. 1287 * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args.
1244 Add hold_quit arg. Rework to use just one, local, inev 1288 Add hold_quit arg. Rework to use just one, local, inev
1245 input_event. Store inev directly in fifo using 1289 input_event. Store inev directly in fifo using
1246 kbd_buffer_store_event_hold. Update count in one place. 1290 kbd_buffer_store_event_hold. Update count in one place.
1247 Postpone call to gen_help_event until inev is stored; use new 1291 Postpone call to gen_help_event until inev is stored; use new
1248 local do_help for this. 1292 local do_help for this.
@@ -1261,8 +1305,8 @@
1261 (current_hold_quit) [USE_GTK]: Add. 1305 (current_hold_quit) [USE_GTK]: Add.
1262 (event_handler_gdk): Adapt to new handle_one_xevent. 1306 (event_handler_gdk): Adapt to new handle_one_xevent.
1263 (handle_one_xevent): Remove bufp_r and numcharsp args. 1307 (handle_one_xevent): Remove bufp_r and numcharsp args.
1264 Add hold_quit arg. Rework to use just one, local, inev 1308 Add hold_quit arg. Rework to use just one, local, inev
1265 input_event. Store inev directly in fifo using 1309 input_event. Store inev directly in fifo using
1266 kbd_buffer_store_event_hold. Update count in one place. 1310 kbd_buffer_store_event_hold. Update count in one place.
1267 Postpone call to gen_help_event until inev is stored; use new 1311 Postpone call to gen_help_event until inev is stored; use new
1268 local do_help for this. 1312 local do_help for this.
@@ -1274,7 +1318,7 @@
1274 `goto done' to clarify code flow in deeply nested blocks. 1318 `goto done' to clarify code flow in deeply nested blocks.
1275 (x_dispatch_event): Simplify as handle_one_xevent now calls 1319 (x_dispatch_event): Simplify as handle_one_xevent now calls
1276 kbd_buffer_store_event itself. 1320 kbd_buffer_store_event itself.
1277 (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit 1321 (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit
1278 arg. Call handle_one_xevent with new arglist. Store event from 1322 arg. Call handle_one_xevent with new arglist. Store event from
1279 x_session_check_input in fifo. 1323 x_session_check_input in fifo.
1280 [USE_GTK]: Setup current_hold_quit. 1324 [USE_GTK]: Setup current_hold_quit.
@@ -2203,7 +2247,7 @@
2203 (marginal_area_string): Fix prototypes. 2247 (marginal_area_string): Fix prototypes.
2204 2248
2205 * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from 2249 * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from
2206 POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed. 2250 POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed.
2207 (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros. 2251 (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros.
2208 2252
2209 * keyboard.c (make_lispy_position): Use modified mode_line_string, 2253 * keyboard.c (make_lispy_position): Use modified mode_line_string,
@@ -2370,7 +2414,7 @@
2370 control frame pointer shape. Detect image hot-spots for pointer 2414 control frame pointer shape. Detect image hot-spots for pointer
2371 and help_echo properties. Use define_frame_cursor1. 2415 and help_echo properties. Use define_frame_cursor1.
2372 (note_mouse_highlight): Use Vvoid_text_area_pointer. 2416 (note_mouse_highlight): Use Vvoid_text_area_pointer.
2373 (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables. 2417 (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables.
2374 DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void. 2418 DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void.
2375 2419
2376 * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID. 2420 * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID.
@@ -2491,7 +2535,7 @@
2491 (glyph_to_pixel_coords): Don't use negative hpos. 2535 (glyph_to_pixel_coords): Don't use negative hpos.
2492 (x_y_to_hpos_vpos): Fix for partially visible first glyph. 2536 (x_y_to_hpos_vpos): Fix for partially visible first glyph.
2493 (append_stretch_glyph): Change ascent arg to be actual value 2537 (append_stretch_glyph): Change ascent arg to be actual value
2494 in pixels rather than ratio to height. Callers changed. 2538 in pixels rather than ratio to height. Callers changed.
2495 (calc_pixel_width_or_height): New aux function, implementing 2539 (calc_pixel_width_or_height): New aux function, implementing
2496 pixel based artihmetic for glyph widths and heights. 2540 pixel based artihmetic for glyph widths and heights.
2497 (produce_stretch_glyph): Use calc_pixel_width_or_height for 2541 (produce_stretch_glyph): Use calc_pixel_width_or_height for
@@ -2693,7 +2737,7 @@
2693 x_display_info_for_display instead. Use Display in xev instead 2737 x_display_info_for_display instead. Use Display in xev instead
2694 of GDK_DISPLAY. 2738 of GDK_DISPLAY.
2695 (x_dispatch_event): Call x_display_info_for_display. 2739 (x_dispatch_event): Call x_display_info_for_display.
2696 (XTread_socket): Move GTK part out of loop. current_dpyinfo removed. 2740 (XTread_socket): Move GTK part out of loop. current_dpyinfo removed.
2697 (x_connection_closed): Call xg_display_close for GTK. 2741 (x_connection_closed): Call xg_display_close for GTK.
2698 (x_term_init): Call xg_display_open for additional displays. 2742 (x_term_init): Call xg_display_open for additional displays.
2699 Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor 2743 Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor
@@ -4195,7 +4239,7 @@
4195 from x/w32/macterm.h files. All uses changed. Also change code 4239 from x/w32/macterm.h files. All uses changed. Also change code
4196 which referred to f->output_data...->pixel_height. 4240 which referred to f->output_data...->pixel_height.
4197 (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved 4241 (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved
4198 from x/w32/macterm.h files. All uses changed. Also change code 4242 from x/w32/macterm.h files. All uses changed. Also change code
4199 which referred to f->output_data...->pixel_width. 4243 which referred to f->output_data...->pixel_width.
4200 (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. 4244 (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed.
4201 Also change code which referred to f->height. 4245 Also change code which referred to f->height.
@@ -4505,7 +4549,7 @@
4505 * xdisp.c: Make (many) trivial substitutions for renamed and 4549 * xdisp.c: Make (many) trivial substitutions for renamed and
4506 new macros in dispextern.h, frame.h and window.h. 4550 new macros in dispextern.h, frame.h and window.h.
4507 (window_box_width): Adapt to per-window fringes and scroll bars, 4551 (window_box_width): Adapt to per-window fringes and scroll bars,
4508 and new fringe vs. display margin position. Note that returned 4552 and new fringe vs. display margin position. Note that returned
4509 value is no longer guaranteed to be a whole multiple of the frame 4553 value is no longer guaranteed to be a whole multiple of the frame
4510 column width, since per-window fringes may now be any width. 4554 column width, since per-window fringes may now be any width.
4511 (window_box_left_offset): New function like window_box_left, but 4555 (window_box_left_offset): New function like window_box_left, but
@@ -5255,7 +5299,7 @@
5255 5299
5256 * xfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5300 * xfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5257 parameters now defined in frame.h and frame.c. 5301 parameters now defined in frame.h and frame.c.
5258 (Vx_resource_name): Remove. Use generic var. 5302 (Vx_resource_name): Remove. Use generic var.
5259 (enum x_frame_parms): Remove (bogus, unused enum). 5303 (enum x_frame_parms): Remove (bogus, unused enum).
5260 (check_x_display_info): Make non-static (for frame.c). 5304 (check_x_display_info): Make non-static (for frame.c).
5261 (struct x_frame_parm_table, x_frame_parms): Remove. 5305 (struct x_frame_parm_table, x_frame_parms): Remove.
@@ -5275,7 +5319,7 @@
5275 (syms_of_xfns): Don't intern/staticpro removed vars. 5319 (syms_of_xfns): Don't intern/staticpro removed vars.
5276 5320
5277 * xterm.c: Remove unnecessary extern declarations. 5321 * xterm.c: Remove unnecessary extern declarations.
5278 (x_fullscreen_adjust): Remove. Use generic instead. 5322 (x_fullscreen_adjust): Remove. Use generic instead.
5279 (x_redisplay_interface): Add x_frame_parm_handlers member. 5323 (x_redisplay_interface): Add x_frame_parm_handlers member.
5280 5324
5281 * w32gui.h (XrmDatabase): New (dummy) typedef. 5325 * w32gui.h (XrmDatabase): New (dummy) typedef.
@@ -5287,7 +5331,7 @@
5287 5331
5288 * w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5332 * w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5289 parameters now defined in frame.h and frame.c. 5333 parameters now defined in frame.h and frame.c.
5290 (Vx_resource_name): Remove. Use generic var. 5334 (Vx_resource_name): Remove. Use generic var.
5291 (enum x_frame_parms): Remove (bogus, unused enum). 5335 (enum x_frame_parms): Remove (bogus, unused enum).
5292 (check_x_display_info): Make non-static (for frame.c). 5336 (check_x_display_info): Make non-static (for frame.c).
5293 (struct x_frame_parm_table, x_frame_parms): Remove. 5337 (struct x_frame_parm_table, x_frame_parms): Remove.
@@ -5320,7 +5364,7 @@
5320 5364
5321 * macfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5365 * macfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5322 parameters now defined in frame.h and frame.c. 5366 parameters now defined in frame.h and frame.c.
5323 (Vx_resource_name): Remove. Use generic var. 5367 (Vx_resource_name): Remove. Use generic var.
5324 (check_x_display_info): Make non-static (for frame.c). 5368 (check_x_display_info): Make non-static (for frame.c).
5325 (struct x_frame_parm_table, x_frame_parms): Remove. 5369 (struct x_frame_parm_table, x_frame_parms): Remove.
5326 (init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params) 5370 (init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params)
@@ -6301,7 +6345,7 @@
6301 [HAVE_XPM]: Avoid clashes with XColor, XImage and Pixel 6345 [HAVE_XPM]: Avoid clashes with XColor, XImage and Pixel
6302 definitions in xpm.h. 6346 definitions in xpm.h.
6303 (init_xpm_functions): New function. 6347 (init_xpm_functions): New function.
6304 (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm. 6348 (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm.
6305 (init_external_image_libraries): Try to load libXpm.dll. 6349 (init_external_image_libraries): Try to load libXpm.dll.
6306 6350
6307 * fileio.c (Fcopy_file) [WINDOWSNT]: Reverse logic for setting 6351 * fileio.c (Fcopy_file) [WINDOWSNT]: Reverse logic for setting
@@ -6330,8 +6374,8 @@
6330 * w32fns.c (DrawText): Kludge to avoid a redefinition on Windows 6374 * w32fns.c (DrawText): Kludge to avoid a redefinition on Windows
6331 when including gif_lib.h. 6375 when including gif_lib.h.
6332 (init_gif_functions, init_tiff_functions): New functions. 6376 (init_gif_functions, init_tiff_functions): New functions.
6333 (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for 6377 (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for
6334 Windows. Disable color table lookups. Call library functions 6378 Windows. Disable color table lookups. Call library functions
6335 through pointers determined at runtime. 6379 through pointers determined at runtime.
6336 (init_external_image_libraries): Try to load libungif.dll and 6380 (init_external_image_libraries): Try to load libungif.dll and
6337 libtiff.dll. 6381 libtiff.dll.
@@ -6397,8 +6441,8 @@
6397 6441
6398 * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper): 6442 * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper):
6399 New functions. 6443 New functions.
6400 (jpeg_load): Sync with xfns.c version. Adjust colors for Windows. 6444 (jpeg_load): Sync with xfns.c version. Adjust colors for Windows.
6401 Disable color table lookups. Call jpeg library functions 6445 Disable color table lookups. Call jpeg library functions
6402 through pointers determined at runtime. 6446 through pointers determined at runtime.
6403 (init_external_image_libraries): Try to load jpeg.dll. 6447 (init_external_image_libraries): Try to load jpeg.dll.
6404 6448
@@ -6435,8 +6479,8 @@
6435 6479
6436 * w32fns.c (XPutPixel): Handle monochrome images; used for masks. 6480 * w32fns.c (XPutPixel): Handle monochrome images; used for masks.
6437 [HAVE_PNG]: Sync with xfns.c version. 6481 [HAVE_PNG]: Sync with xfns.c version.
6438 (png_load): Adjust colors for Windows. Use Windows 6482 (png_load): Adjust colors for Windows. Use Windows
6439 bitmaps. Disable color table lookups. 6483 bitmaps. Disable color table lookups.
6440 (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): New macros. 6484 (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): New macros.
6441 (init_png_functions): New function. 6485 (init_png_functions): New function.
6442 (png_read_from_memory, png_load): Call png library functions 6486 (png_read_from_memory, png_load): Call png library functions
@@ -6533,7 +6577,7 @@
65332003-01-21 David Ponce <david@dponce.com> 65772003-01-21 David Ponce <david@dponce.com>
6534 6578
6535 * w32term.c (w32_encode_char): For DIM=1 charset, set 6579 * w32term.c (w32_encode_char): For DIM=1 charset, set
6536 ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c 6580 ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c
6537 x_encode_char change by Kenichi Handa <handa@m17n.org> on 6581 x_encode_char change by Kenichi Handa <handa@m17n.org> on
6538 2002-09-30.) 6582 2002-09-30.)
6539 (w32_draw_relief_rect): Declare all args. 6583 (w32_draw_relief_rect): Declare all args.
@@ -7066,7 +7110,7 @@
7066 only if g_b_init_get_sid_identifier_authority is equal to 0. 7110 only if g_b_init_get_sid_identifier_authority is equal to 0.
7067 On initialization set g_b_init_get_sid_identifier_authority equal to 1. 7111 On initialization set g_b_init_get_sid_identifier_authority equal to 1.
7068 7112
7069 * w32fns.c (globals_of_w32fns): New function. Used to initialize 7113 * w32fns.c (globals_of_w32fns): New function. Used to initialize
7070 those global variables that must always be initialized on startup 7114 those global variables that must always be initialized on startup
7071 even when the global variable initialized is non zero. 7115 even when the global variable initialized is non zero.
7072 Its primary purpose at this time is to initialize the global variable 7116 Its primary purpose at this time is to initialize the global variable
@@ -7077,7 +7121,7 @@
7077 7121
7078 * w32fns.c (syms_of_w32fns): Call globals_of_w32fns. 7122 * w32fns.c (syms_of_w32fns): Call globals_of_w32fns.
7079 7123
7080 * w32menu.c (globals_of_w32menu): New function. Used to 7124 * w32menu.c (globals_of_w32menu): New function. Used to
7081 initialize those global variables that must always be initialized 7125 initialize those global variables that must always be initialized
7082 on startup even when the global variable initialized is non zero. 7126 on startup even when the global variable initialized is non zero.
7083 Its primary purpose at this time is to initialize the global 7127 Its primary purpose at this time is to initialize the global
@@ -9299,7 +9343,7 @@
92992002-06-21 Pavel Jan,Am(Bk <Pavel@Janik.cz> 93432002-06-21 Pavel Jan,Am(Bk <Pavel@Janik.cz>
9300 9344
9301 * m/pmax.h (START_FILES): Define START_FILES for NetBSD and 9345 * m/pmax.h (START_FILES): Define START_FILES for NetBSD and
9302 OpenBSD. Add support for mipseb-*-netbsd* machines. 9346 OpenBSD. Add support for mipseb-*-netbsd* machines.
9303 9347
93042002-06-17 Andrew Choi <akochoi@shaw.ca> 93482002-06-17 Andrew Choi <akochoi@shaw.ca>
9305 9349
@@ -10701,7 +10745,7 @@
10701 (server_accept_connection): New function. 10745 (server_accept_connection): New function.
10702 (wait_reading_process_input): Use it to handle incoming connects. 10746 (wait_reading_process_input): Use it to handle incoming connects.
10703 Do not enable input on a new connection if process is stopped. 10747 Do not enable input on a new connection if process is stopped.
10704 (read_process_output): Handle datagram sockets. Use 2k buffer for them. 10748 (read_process_output): Handle datagram sockets. Use 2k buffer for them.
10705 (send_process): Handle datagram sockets. 10749 (send_process): Handle datagram sockets.
10706 (Fstop_process, Fcontinue_process): Apply to network processes. A stopped 10750 (Fstop_process, Fcontinue_process): Apply to network processes. A stopped
10707 network process is indicated by setting command field to t . 10751 network process is indicated by setting command field to t .
@@ -12287,7 +12331,7 @@
12287 12331
122882001-12-01 Jason Rumney <jasonr@gnu.org> 123322001-12-01 Jason Rumney <jasonr@gnu.org>
12289 12333
12290 * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c. 12334 * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c.
12291 12335
12292 * w32term.h (WM_MOUSELEAVE, TME_LEAVE, TRACKMOUSEEVENT) 12336 * w32term.h (WM_MOUSELEAVE, TME_LEAVE, TRACKMOUSEEVENT)
12293 [!WM_MOUSELEAVE]: Define. 12337 [!WM_MOUSELEAVE]: Define.
@@ -12339,7 +12383,7 @@
12339 12383
12340 * xterm.c (zv_height, zv_bits, zv_period): Changed zv bitmap to 12384 * xterm.c (zv_height, zv_bits, zv_period): Changed zv bitmap to
12341 fill fringe evenly with small dashes. 12385 fill fringe evenly with small dashes.
12342 (x_draw_fringe_bitmap): Clear background if necessary. Align and 12386 (x_draw_fringe_bitmap): Clear background if necessary. Align and
12343 clip the new ZV bitmap to avoid jitter between rows. 12387 clip the new ZV bitmap to avoid jitter between rows.
12344 (x_draw_row_fringe_bitmaps): Rely on x_draw_fringe_bitmap to clear 12388 (x_draw_row_fringe_bitmaps): Rely on x_draw_fringe_bitmap to clear
12345 background. Don't draw fringe bitmaps if fringe width is zero. 12389 background. Don't draw fringe bitmaps if fringe width is zero.
@@ -12404,7 +12448,7 @@
12404 menu items. From David Ponce <dponce@wanadoo.fr>. 12448 menu items. From David Ponce <dponce@wanadoo.fr>.
12405 (w32_dialog_show) [HAVE_DIALOGS]: Compile whole function 12449 (w32_dialog_show) [HAVE_DIALOGS]: Compile whole function
12406 conditionally. 12450 conditionally.
12407 (w32_menu_display_help): New argument OWNER. Rewritten to store a 12451 (w32_menu_display_help): New argument OWNER. Rewritten to store a
12408 help event in the owner frame's keyboard buffer. 12452 help event in the owner frame's keyboard buffer.
12409 12453
12410 * w32fns.c (w32_wnd_proc) <WM_MENUSELECT>: Display help directly. 12454 * w32fns.c (w32_wnd_proc) <WM_MENUSELECT>: Display help directly.
@@ -12520,7 +12564,7 @@
12520 (my_create_tip_window): Assign tip_window. 12564 (my_create_tip_window): Assign tip_window.
12521 (x_create_tip_frame): Use same defaults as X. 12565 (x_create_tip_frame): Use same defaults as X.
12522 (compute_tip_xy): Remove unused variable. Use full screen width. 12566 (compute_tip_xy): Remove unused variable. Use full screen width.
12523 (Fx_show_tip): Do not double height. Call ShowWindow directly. 12567 (Fx_show_tip): Do not double height. Call ShowWindow directly.
12524 12568
12525 * w32term.c (x_after_update_window_line): Doc fix. 12569 * w32term.c (x_after_update_window_line): Doc fix.
12526 (w32_read_socket): Doc fix. Avoid SET_FRAME_GARBAGED for tip 12570 (w32_read_socket): Doc fix. Avoid SET_FRAME_GARBAGED for tip
@@ -12757,9 +12801,9 @@
12757 `bitmaps': 12801 `bitmaps':
12758 12802
12759 * dispextern.h (FRINGE_FACE_ID): Renamed from BITMAP_AREA_FACE_ID. 12803 * dispextern.h (FRINGE_FACE_ID): Renamed from BITMAP_AREA_FACE_ID.
12760 Comments fixed. Use renamed symbols. 12804 Comments fixed. Use renamed symbols.
12761 12805
12762 * dispnew.c: Comment fix. Use renamed symbols. 12806 * dispnew.c: Comment fix. Use renamed symbols.
12763 12807
12764 * frame.h (FRAME_FRINGE_COLS): Renamed from FRAME_FLAGS_AREA_COLS. 12808 * frame.h (FRAME_FRINGE_COLS): Renamed from FRAME_FLAGS_AREA_COLS.
12765 (FRAME_FRINGE_WIDTH): Renamed from FRAME_FLAGS_AREA_WIDTH. 12809 (FRAME_FRINGE_WIDTH): Renamed from FRAME_FLAGS_AREA_WIDTH.
@@ -12769,13 +12813,13 @@
12769 12813
12770 * w32fns.c: Use renamed symbols. 12814 * w32fns.c: Use renamed symbols.
12771 12815
12772 * w32term.c: Comment fixes. Use renamed symbols. 12816 * w32term.c: Comment fixes. Use renamed symbols.
12773 (fringe_bitmap_type): Renamed from bitmap_type. 12817 (fringe_bitmap_type): Renamed from bitmap_type.
12774 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. 12818 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP.
12775 (w32_draw_fringe_bitmap): Renamed from w32_draw_bitmap. 12819 (w32_draw_fringe_bitmap): Renamed from w32_draw_bitmap.
12776 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. 12820 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps.
12777 12821
12778 * w32term.h: Comment fixes. Use renamed symbols. 12822 * w32term.h: Comment fixes. Use renamed symbols.
12779 (fringes_extra): Renamed from flags_areas_extra. 12823 (fringes_extra): Renamed from flags_areas_extra.
12780 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. 12824 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH.
12781 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. 12825 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT.
@@ -12788,22 +12832,22 @@
12788 12832
12789 * widget.c: Use renamed symbols. 12833 * widget.c: Use renamed symbols.
12790 12834
12791 * window.c: Comment fixes. Use renamed symbols. 12835 * window.c: Comment fixes. Use renamed symbols.
12792 (coordinates-in-window-p): Doc fix. 12836 (coordinates-in-window-p): Doc fix.
12793 12837
12794 * xdisp.c: Comment fixes. Use renamed symbols. 12838 * xdisp.c: Comment fixes. Use renamed symbols.
12795 12839
12796 * xfaces.c (realize_basic_faces): Use FRINGE_FACE_ID. 12840 * xfaces.c (realize_basic_faces): Use FRINGE_FACE_ID.
12797 12841
12798 * xfns.c: Use renamed symbols. 12842 * xfns.c: Use renamed symbols.
12799 12843
12800 * xterm.c: Comment fixes. Use renamed symbols. 12844 * xterm.c: Comment fixes. Use renamed symbols.
12801 (fringe_bitmap_type): Renamed from bitmap_type. 12845 (fringe_bitmap_type): Renamed from bitmap_type.
12802 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. 12846 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP.
12803 (x_draw_fringe_bitmap): Renamed from x_draw_bitmap. 12847 (x_draw_fringe_bitmap): Renamed from x_draw_bitmap.
12804 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. 12848 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps.
12805 12849
12806 * xterm.h: Comment fixes. Use renamed symbols. 12850 * xterm.h: Comment fixes. Use renamed symbols.
12807 (fringes_extra): Renamed from flags_areas_extra. 12851 (fringes_extra): Renamed from flags_areas_extra.
12808 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. 12852 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH.
12809 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. 12853 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT.
@@ -12921,8 +12965,8 @@
129212001-11-12 Jason Rumney <jasonr@gnu.org> 129652001-11-12 Jason Rumney <jasonr@gnu.org>
12922 12966
12923 * w32console.c, w32fns.c, w32menu.c, w32proc.c, w32select.c, 12967 * w32console.c, w32fns.c, w32menu.c, w32proc.c, w32select.c,
12924 * w32term.c: Change doc-string comments to `new style'. 12968 * w32term.c: Change doc-string comments to `new style'
12925 [w/`doc:' keyword]. Doc fixes. 12969 [w/`doc:' keyword]. Doc fixes.
12926 12970
12927 * w32fns.c: Don't define max. 12971 * w32fns.c: Don't define max.
12928 (Fx_open_connection): Only execute once. 12972 (Fx_open_connection): Only execute once.
@@ -12957,7 +13001,7 @@
129572001-11-10 Jason Rumney <jasonr@gnu.org> 130012001-11-10 Jason Rumney <jasonr@gnu.org>
12958 13002
12959 * w32fns.c (enum_font_cb2): Use leading @ on face name to detect 13003 * w32fns.c (enum_font_cb2): Use leading @ on face name to detect
12960 vertical fonts. Allow them if face name is explicitly specified. 13004 vertical fonts. Allow them if face name is explicitly specified.
12961 Do not give up if we find a font that cannot be converted to an xlfd. 13005 Do not give up if we find a font that cannot be converted to an xlfd.
12962 13006
129632001-11-10 Gerd Moellmann <gerd@gnu.org> 130072001-11-10 Gerd Moellmann <gerd@gnu.org>
@@ -13767,7 +13811,7 @@
13767 full-width rows. 13811 full-width rows.
13768 (x_dump_glyph_string): Put in #if GLYPH_DEBUG. 13812 (x_dump_glyph_string): Put in #if GLYPH_DEBUG.
13769 (w32_draw_relief_rect): Extend left shadow to the bottom and left; 13813 (w32_draw_relief_rect): Extend left shadow to the bottom and left;
13770 change bottom shadow accordingly. Some cleanup. 13814 change bottom shadow accordingly. Some cleanup.
13771 (x_update_window_end): Handle overwritten mouse face 13815 (x_update_window_end): Handle overwritten mouse face
13772 also for tool bar windows. 13816 also for tool bar windows.
13773 (show_mouse_face): Set the glyph row's mouse_face_p flag also when 13817 (show_mouse_face): Set the glyph row's mouse_face_p flag also when
@@ -13813,7 +13857,7 @@
13813 (Fv_max_tooltip_size): New variable. 13857 (Fv_max_tooltip_size): New variable.
13814 (syns_of_xfns): DEFVAR_LISP it. 13858 (syns_of_xfns): DEFVAR_LISP it.
13815 (Fx_show_tip): Add parameter TEXT. Set the tip frame's root 13859 (Fx_show_tip): Add parameter TEXT. Set the tip frame's root
13816 window buffer to *tip* right after creating the frame. Set frame's 13860 window buffer to *tip* right after creating the frame. Set frame's
13817 window_width. Use a maximum tooltip size specified by 13861 window_width. Use a maximum tooltip size specified by
13818 Vx_max_tooltip_size, if that has valid contents. 13862 Vx_max_tooltip_size, if that has valid contents.
13819 (compute_tip_xy): Add parameters WIDTH and HEIGHT. 13863 (compute_tip_xy): Add parameters WIDTH and HEIGHT.
diff --git a/src/alloc.c b/src/alloc.c
index 63447d078f9..ae156d89f24 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1894,8 +1894,9 @@ compact_small_strings ()
1894 1894
1895 1895
1896DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, 1896DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0,
1897 doc: /* Return a newly created string of length LENGTH, with each element being INIT. 1897 doc: /* Return a newly created string of length LENGTH, with INIT in each element.
1898Both LENGTH and INIT must be numbers. */) 1898LENGTH must be an integer.
1899INIT must be an integer that represents a character. */)
1899 (length, init) 1900 (length, init)
1900 Lisp_Object length, init; 1901 Lisp_Object length, init;
1901{ 1902{
@@ -2335,7 +2336,6 @@ free_cons (ptr)
2335 cons_free_list = ptr; 2336 cons_free_list = ptr;
2336} 2337}
2337 2338
2338
2339DEFUN ("cons", Fcons, Scons, 2, 2, 0, 2339DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2340 doc: /* Create a new cons, give it CAR and CDR as components, and return it. */) 2340 doc: /* Create a new cons, give it CAR and CDR as components, and return it. */)
2341 (car, cdr) 2341 (car, cdr)
@@ -4287,6 +4287,8 @@ struct backtrace
4287 /* If nargs is UNEVALLED, args points to slot holding list of 4287 /* If nargs is UNEVALLED, args points to slot holding list of
4288 unevalled args. */ 4288 unevalled args. */
4289 char evalargs; 4289 char evalargs;
4290 /* Nonzero means call value of debugger when done with this operation. */
4291 char debug_on_exit;
4290}; 4292};
4291 4293
4292 4294
@@ -4478,34 +4480,42 @@ returns nil, because real GC can't be done. */)
4478 } 4480 }
4479#endif 4481#endif
4480 4482
4481 /* Look thru every buffer's undo list 4483 gc_sweep ();
4482 for elements that update markers that were not marked, 4484
4483 and delete them. */ 4485 /* Look thru every buffer's undo list for elements that used to
4486 contain update markers that were changed to Lisp_Misc_Free
4487 objects and delete them. This may leave a few cons cells
4488 unchained, but we will get those on the next sweep. */
4484 { 4489 {
4485 register struct buffer *nextb = all_buffers; 4490 register struct buffer *nextb = all_buffers;
4486 4491
4487 while (nextb) 4492 while (nextb)
4488 { 4493 {
4489 /* If a buffer's undo list is Qt, that means that undo is 4494 /* If a buffer's undo list is Qt, that means that undo is
4490 turned off in that buffer. Calling truncate_undo_list on 4495 turned off in that buffer. */
4491 Qt tends to return NULL, which effectively turns undo back on.
4492 So don't call truncate_undo_list if undo_list is Qt. */
4493 if (! EQ (nextb->undo_list, Qt)) 4496 if (! EQ (nextb->undo_list, Qt))
4494 { 4497 {
4495 Lisp_Object tail, prev; 4498 Lisp_Object tail, prev, elt, car;
4496 tail = nextb->undo_list; 4499 tail = nextb->undo_list;
4497 prev = Qnil; 4500 prev = Qnil;
4498 while (CONSP (tail)) 4501 while (CONSP (tail))
4499 { 4502 {
4500 if (GC_CONSP (XCAR (tail)) 4503 if ((elt = XCAR (tail), GC_CONSP (elt))
4501 && GC_MARKERP (XCAR (XCAR (tail))) 4504 && (car = XCAR (elt), GC_MISCP (car))
4502 && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) 4505 && XMISCTYPE (car) == Lisp_Misc_Free)
4503 { 4506 {
4507 Lisp_Object cdr = XCDR (tail);
4508 /* Do not use free_cons here, as we don't know if
4509 anybody else has a pointer to these conses. */
4510 XSETCAR (elt, Qnil);
4511 XSETCDR (elt, Qnil);
4512 XSETCAR (tail, Qnil);
4513 XSETCDR (tail, Qnil);
4504 if (NILP (prev)) 4514 if (NILP (prev))
4505 nextb->undo_list = tail = XCDR (tail); 4515 nextb->undo_list = tail = cdr;
4506 else 4516 else
4507 { 4517 {
4508 tail = XCDR (tail); 4518 tail = cdr;
4509 XSETCDR (prev, tail); 4519 XSETCDR (prev, tail);
4510 } 4520 }
4511 } 4521 }
@@ -4521,8 +4531,6 @@ returns nil, because real GC can't be done. */)
4521 } 4531 }
4522 } 4532 }
4523 4533
4524 gc_sweep ();
4525
4526 /* Clear the mark bits that we set in certain root slots. */ 4534 /* Clear the mark bits that we set in certain root slots. */
4527 4535
4528 unmark_byte_stack (); 4536 unmark_byte_stack ();
@@ -4978,14 +4986,6 @@ mark_object (arg)
4978 break; 4986 break;
4979 4987
4980 case Lisp_Misc: 4988 case Lisp_Misc:
4981 if (XMISCTYPE (obj) == Lisp_Misc_Free)
4982 {
4983 /* This is (probably) a freed marker which may still exist on
4984 a buffer undo list, so accept it here, as check below will
4985 fail (not live). KFS 2004-05-17 */
4986 XMARKER (obj)->gcmarkbit = 1;
4987 break;
4988 }
4989 CHECK_ALLOCATED_AND_LIVE (live_misc_p); 4989 CHECK_ALLOCATED_AND_LIVE (live_misc_p);
4990 if (XMARKER (obj)->gcmarkbit) 4990 if (XMARKER (obj)->gcmarkbit)
4991 break; 4991 break;
@@ -5211,16 +5211,6 @@ survives_gc_p (obj)
5211static void 5211static void
5212gc_sweep () 5212gc_sweep ()
5213{ 5213{
5214 /* Remove or mark entries in weak hash tables.
5215 This must be done before any object is unmarked. */
5216 sweep_weak_hash_tables ();
5217
5218 sweep_strings ();
5219#ifdef GC_CHECK_STRING_BYTES
5220 if (!noninteractive)
5221 check_string_bytes (1);
5222#endif
5223
5224 /* Put all unmarked conses on free list */ 5214 /* Put all unmarked conses on free list */
5225 { 5215 {
5226 register struct cons_block *cblk; 5216 register struct cons_block *cblk;
@@ -5271,6 +5261,16 @@ gc_sweep ()
5271 total_free_conses = num_free; 5261 total_free_conses = num_free;
5272 } 5262 }
5273 5263
5264 /* Remove or mark entries in weak hash tables.
5265 This must be done before any object is unmarked. */
5266 sweep_weak_hash_tables ();
5267
5268 sweep_strings ();
5269#ifdef GC_CHECK_STRING_BYTES
5270 if (!noninteractive)
5271 check_string_bytes (1);
5272#endif
5273
5274 /* Put all unmarked floats on free list */ 5274 /* Put all unmarked floats on free list */
5275 { 5275 {
5276 register struct float_block *fblk; 5276 register struct float_block *fblk;
@@ -5469,6 +5469,9 @@ gc_sweep ()
5469 /* If this block contains only free markers and we have already 5469 /* If this block contains only free markers and we have already
5470 seen more than two blocks worth of free markers then deallocate 5470 seen more than two blocks worth of free markers then deallocate
5471 this block. */ 5471 this block. */
5472#if 0
5473 /* There may still be pointers to these markers from a buffer's
5474 undo list, so don't free them. KFS 2004-05-21 /
5472 if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE) 5475 if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
5473 { 5476 {
5474 *mprev = mblk->next; 5477 *mprev = mblk->next;
@@ -5478,6 +5481,7 @@ gc_sweep ()
5478 n_marker_blocks--; 5481 n_marker_blocks--;
5479 } 5482 }
5480 else 5483 else
5484#endif
5481 { 5485 {
5482 num_free += this_free; 5486 num_free += this_free;
5483 mprev = &mblk->next; 5487 mprev = &mblk->next;
diff --git a/src/buffer.c b/src/buffer.c
index 7560e696685..532a768ba50 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -487,7 +487,7 @@ static void
487clone_per_buffer_values (from, to) 487clone_per_buffer_values (from, to)
488 struct buffer *from, *to; 488 struct buffer *from, *to;
489{ 489{
490 Lisp_Object to_buffer; 490 Lisp_Object to_buffer, tem;
491 int offset; 491 int offset;
492 492
493 XSETBUFFER (to_buffer, to); 493 XSETBUFFER (to_buffer, to);
@@ -514,6 +514,14 @@ clone_per_buffer_values (from, to)
514 514
515 to->overlays_before = copy_overlays (to, from->overlays_before); 515 to->overlays_before = copy_overlays (to, from->overlays_before);
516 to->overlays_after = copy_overlays (to, from->overlays_after); 516 to->overlays_after = copy_overlays (to, from->overlays_after);
517
518 /* Copy the alist of local variables,
519 and all the alist elements too. */
520 to->local_var_alist
521 = Fcopy_sequence (from->local_var_alist);
522 for (tem = to->local_var_alist; CONSP (tem);
523 tem = XCDR (tem))
524 XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem))));
517} 525}
518 526
519 527
diff --git a/src/casefiddle.c b/src/casefiddle.c
index ae60d2c8dd5..6387c4bc845 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -52,6 +52,12 @@ casify_object (flag, obj)
52 | CHAR_SHIFT | CHAR_CTL | CHAR_META); 52 | CHAR_SHIFT | CHAR_CTL | CHAR_META);
53 int flags = XINT (obj) & flagbits; 53 int flags = XINT (obj) & flagbits;
54 54
55 /* If the character has higher bits set
56 above the flags, return it unchanged.
57 It is not a real character. */
58 if ((unsigned) XFASTINT (obj) > (unsigned) flagbits)
59 return obj;
60
55 c = DOWNCASE (XFASTINT (obj) & ~flagbits); 61 c = DOWNCASE (XFASTINT (obj) & ~flagbits);
56 if (inword) 62 if (inword)
57 XSETFASTINT (obj, c | flags); 63 XSETFASTINT (obj, c | flags);
diff --git a/src/emacs.c b/src/emacs.c
index f7bae2dc13d..0fbc6f86b5f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -849,7 +849,7 @@ main (argc, argv
849 else 849 else
850 { 850 {
851 printf ("GNU Emacs %s\n", SDATA (tem)); 851 printf ("GNU Emacs %s\n", SDATA (tem));
852 printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); 852 printf ("Copyright (C) 2004 Free Software Foundation, Inc.\n");
853 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); 853 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n");
854 printf ("You may redistribute copies of Emacs\n"); 854 printf ("You may redistribute copies of Emacs\n");
855 printf ("under the terms of the GNU General Public License.\n"); 855 printf ("under the terms of the GNU General Public License.\n");
diff --git a/src/fileio.c b/src/fileio.c
index 6be8cbe18f6..6a95572ca3c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6200,10 +6200,13 @@ provides a file dialog box. */)
6200 6200
6201 if (NILP (dir)) 6201 if (NILP (dir))
6202 dir = current_buffer->directory; 6202 dir = current_buffer->directory;
6203 if (NILP (Ffile_name_absolute_p (dir)))
6204 dir = Fexpand_file_name (dir, Qnil);
6203 if (NILP (default_filename)) 6205 if (NILP (default_filename))
6204 default_filename = !NILP (initial) 6206 default_filename
6205 ? Fexpand_file_name (initial, dir) 6207 = (!NILP (initial)
6206 : current_buffer->filename; 6208 ? Fexpand_file_name (initial, dir)
6209 : current_buffer->filename);
6207 6210
6208 /* If dir starts with user's homedir, change that to ~. */ 6211 /* If dir starts with user's homedir, change that to ~. */
6209 homedir = (char *) egetenv ("HOME"); 6212 homedir = (char *) egetenv ("HOME");
diff --git a/src/insdel.c b/src/insdel.c
index 5e3f69161e0..ffe7006a45b 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1556,7 +1556,7 @@ replace_range (from, to, new, prepare, inherit, markers)
1556 Z_BYTE -= nbytes_del; 1556 Z_BYTE -= nbytes_del;
1557 GPT = from; 1557 GPT = from;
1558 GPT_BYTE = from_byte; 1558 GPT_BYTE = from_byte;
1559 *(GPT_ADDR) = 0; /* Put an anchor. */ 1559 if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */
1560 1560
1561 if (GPT_BYTE < GPT) 1561 if (GPT_BYTE < GPT)
1562 abort (); 1562 abort ();
@@ -1839,7 +1839,7 @@ del_range_2 (from, from_byte, to, to_byte, ret_string)
1839 Z -= nchars_del; 1839 Z -= nchars_del;
1840 GPT = from; 1840 GPT = from;
1841 GPT_BYTE = from_byte; 1841 GPT_BYTE = from_byte;
1842 *(GPT_ADDR) = 0; /* Put an anchor. */ 1842 if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */
1843 1843
1844 if (GPT_BYTE < GPT) 1844 if (GPT_BYTE < GPT)
1845 abort (); 1845 abort ();
diff --git a/src/intervals.c b/src/intervals.c
index d3f814d60ce..33ef9a34177 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1899,11 +1899,13 @@ lookup_char_property (plist, prop, textprop)
1899 return fallback; 1899 return fallback;
1900 /* Check for alternative properties */ 1900 /* Check for alternative properties */
1901 tail = Fassq (prop, Vchar_property_alias_alist); 1901 tail = Fassq (prop, Vchar_property_alias_alist);
1902 if (NILP (tail)) 1902 if (! NILP (tail))
1903 return tail; 1903 {
1904 tail = XCDR (tail); 1904 tail = XCDR (tail);
1905 for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) 1905 for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail))
1906 fallback = Fplist_get (plist, XCAR (tail)); 1906 fallback = Fplist_get (plist, XCAR (tail));
1907 }
1908
1907 if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties)) 1909 if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties))
1908 fallback = Fplist_get (Vdefault_text_properties, prop); 1910 fallback = Fplist_get (Vdefault_text_properties, prop);
1909 return fallback; 1911 return fallback;
diff --git a/src/keyboard.c b/src/keyboard.c
index 75a049b5775..31137ffc679 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -113,6 +113,8 @@ struct backtrace
113 args points to slot holding list of 113 args points to slot holding list of
114 unevalled args */ 114 unevalled args */
115 char evalargs; 115 char evalargs;
116 /* Nonzero means call value of debugger when done with this operation. */
117 char debug_on_exit;
116 }; 118 };
117 119
118#ifdef MULTI_KBOARD 120#ifdef MULTI_KBOARD
@@ -9747,6 +9749,7 @@ a special event, so ignore the prefix argument and don't clear it. */)
9747 backtrace.args = &cmd; 9749 backtrace.args = &cmd;
9748 backtrace.nargs = 1; 9750 backtrace.nargs = 1;
9749 backtrace.evalargs = 0; 9751 backtrace.evalargs = 0;
9752 backtrace.debug_on_exit = 0;
9750 9753
9751 tem = Fcall_interactively (cmd, record_flag, keys); 9754 tem = Fcall_interactively (cmd, record_flag, keys);
9752 9755
diff --git a/src/keymap.c b/src/keymap.c
index a4aeea8ae63..60a6d177e35 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1079,15 +1079,15 @@ event type that has no other definition in this keymap.
1079 1079
1080DEF is anything that can be a key's definition: 1080DEF is anything that can be a key's definition:
1081 nil (means key is undefined in this keymap), 1081 nil (means key is undefined in this keymap),
1082 a command (a Lisp function suitable for interactive calling) 1082 a command (a Lisp function suitable for interactive calling),
1083 a string (treated as a keyboard macro), 1083 a string (treated as a keyboard macro),
1084 a keymap (to define a prefix key), 1084 a keymap (to define a prefix key),
1085 a symbol. When the key is looked up, the symbol will stand for its 1085 a symbol (when the key is looked up, the symbol will stand for its
1086 function definition, which should at that time be one of the above, 1086 function definition, which should at that time be one of the above,
1087 or another symbol whose function definition is used, etc. 1087 or another symbol whose function definition is used, etc.),
1088 a cons (STRING . DEFN), meaning that DEFN is the definition 1088 a cons (STRING . DEFN), meaning that DEFN is the definition
1089 (DEFN should be a valid definition in its own right), 1089 (DEFN should be a valid definition in its own right),
1090 or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP. 1090 or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP.
1091 1091
1092If KEYMAP is a sparse keymap with a binding for KEY, the existing 1092If KEYMAP is a sparse keymap with a binding for KEY, the existing
1093binding is altered. If there is no binding for KEY, the new pair 1093binding is altered. If there is no binding for KEY, the new pair
diff --git a/src/xdisp.c b/src/xdisp.c
index 0f1dbe59225..cd62ce97f18 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10998,7 +10998,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
10998 aggressive = current_buffer->scroll_up_aggressively; 10998 aggressive = current_buffer->scroll_up_aggressively;
10999 height = WINDOW_BOX_TEXT_HEIGHT (w); 10999 height = WINDOW_BOX_TEXT_HEIGHT (w);
11000 if (NUMBERP (aggressive)) 11000 if (NUMBERP (aggressive))
11001 amount_to_scroll = XFLOATINT (aggressive) * height; 11001 {
11002 double float_amount = XFLOATINT (aggressive) * height;
11003 amount_to_scroll = float_amount;
11004 if (amount_to_scroll == 0 && float_amount > 0)
11005 amount_to_scroll = 1;
11006 }
11002 } 11007 }
11003 11008
11004 if (amount_to_scroll <= 0) 11009 if (amount_to_scroll <= 0)
@@ -11056,7 +11061,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
11056 aggressive = current_buffer->scroll_down_aggressively; 11061 aggressive = current_buffer->scroll_down_aggressively;
11057 height = WINDOW_BOX_TEXT_HEIGHT (w); 11062 height = WINDOW_BOX_TEXT_HEIGHT (w);
11058 if (NUMBERP (aggressive)) 11063 if (NUMBERP (aggressive))
11059 amount_to_scroll = XFLOATINT (aggressive) * height; 11064 {
11065 double float_amount = XFLOATINT (aggressive) * height;
11066 amount_to_scroll = float_amount;
11067 if (amount_to_scroll == 0 && float_amount > 0)
11068 amount_to_scroll = 1;
11069 }
11060 } 11070 }
11061 11071
11062 if (amount_to_scroll <= 0) 11072 if (amount_to_scroll <= 0)