aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-12-07 04:14:14 +0000
committerMiles Bader2006-12-07 04:14:14 +0000
commita0451a715e4ed018a02b825d0eb823424693d1de (patch)
treed2b10fcc69c333ccc438d7a9ad116fbc1495fc9e /src
parentd324f894beea8b485792c779659e8e20c1cb699d (diff)
parent12f7728e938fe5bb850ce2928637d1e349919142 (diff)
downloademacs-a0451a715e4ed018a02b825d0eb823424693d1de.tar.gz
emacs-a0451a715e4ed018a02b825d0eb823424693d1de.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 523-544) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 168-171) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-150
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog232
-rw-r--r--src/Makefile.in5
-rw-r--r--src/abbrev.c21
-rw-r--r--src/buffer.c4
-rw-r--r--src/config.in8
-rw-r--r--src/emacs.c29
-rw-r--r--src/fileio.c10
-rw-r--r--src/fns.c68
-rw-r--r--src/gtkutil.c33
-rw-r--r--src/keyboard.c39
-rw-r--r--src/m/amdx86-64.h8
-rw-r--r--src/m/ibmrs6000.h6
-rw-r--r--src/m/pfa50.h2
-rw-r--r--src/msdos.c2
-rw-r--r--src/process.c85
-rw-r--r--src/regex.c172
-rw-r--r--src/s/aix4-2.h14
-rw-r--r--src/s/openbsd.h15
-rw-r--r--src/sound.c16
-rw-r--r--src/strftime.c6
-rw-r--r--src/syntax.c2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/w16select.c2
-rw-r--r--src/w32fns.c47
-rw-r--r--src/w32term.c8
-rw-r--r--src/window.c13
-rw-r--r--src/xdisp.c9
-rw-r--r--src/xfaces.c16
-rw-r--r--src/xselect.c8
-rw-r--r--src/xterm.c30
30 files changed, 576 insertions, 336 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 358e6374810..de7417da7ab 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,147 @@
12006-12-05 Glenn Morris <rgm@gnu.org>
2
3 * abbrev.c (Qforce): New Lisp_Object.
4 (Fdefine_abbrev): Do not overwrite non-system abbrevs with system
5 abbrevs, unless 'force is applied.
6 (syms_of_abbrev): Add Qforce.
7
82006-12-04 Kim F. Storm <storm@cua.dk>
9
10 * process.c (parse_signal): Rename macro from handle_signal.
11 (Fsignal_process): Also accept lower-case variants of signal
12 names (to align with signal names generated by Emacs itself).
13
14 * emacs.c (handle_USR1_signal, handle_USR2_signal): Replace by...
15 (handle_user_signal): ... this, which generates two USER_SIGNAL_EVENTs
16 first with code == 0 [signal] and one with code == sig number.
17 (main): Use it as handler for SIGUR1 and SIGUSR2.
18
19 * keyboard.c (kbd_buffer_store_event_hold): Don't throw-on-input
20 if first event in [signal xxx] sequence.
21 (lispy_user_signals, Qusr1_signal, Qusr2_signal): Remove.
22 (syms_of_keyboard): Don't intern and staticpro them.
23 (Qsignal): Declare here.
24 (syms_of_keyboard): Intern and staticpro it.
25 (make_lispy_event): Use it. Intern symbols on the fly for other
26 USER_SIGNAL_EVENTs events.
27
28 * process.c (Qsignal): Declare extern.
29 (syms_of_process): Don't intern/staticpro it here.
30
31 * process.c (read_process_output): Abort if carryover < 0.
32
332006-12-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
34
35 * config.in: Regenerate.
36
37 * fileio.c [__NetBSD__]: Don't define `unix'.
38 (Funix_sync, syms_of_fileio): Use `#ifdef HAVE_SYNC' instead of
39 `#ifdef unix'.
40
412006-12-04 Glenn Morris <rgm@gnu.org>
42
43 * Makefile.in (version): New variable, set by configure.
44 (bootstrapclean, mostlyclean): Also remove emacs-${version}.
45
462006-12-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
47
48 * gtkutil.c (update_frame_tool_bar): Handle modifying a toolbar item
49 without an image.
50
512006-12-01 Eli Zaretskii <eliz@gnu.org>
52
53 * w32fns.c (Fw32_shell_execute): Doc fix.
54
552006-11-30 Chong Yidong <cyd@stupidchicken.com>
56
57 * xdisp.c (move_it_to): Correctly count tab glyphs for continued
58 lines ending in tab.
59
602006-11-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
61
62 * xterm.c (x_raise_frame): Move setting of _NET_ACTIVE_WINDOW
63 property ...
64 (XTframe_raise_lower): ... to here.
65
662006-11-30 Kenichi Handa <handa@m17n.org>
67
68 * regex.c (regex_compile): Fix previous change.
69
702006-11-29 Juanma Barranquero <lekktu@gmail.com>
71
72 * sound.c (Fplay_sound_internal): Remove spurious newline in docstring.
73
742006-11-28 Chong Yidong <cyd@stupidchicken.com>
75
76 * config.in: Regenerate.
77
782006-11-28 Kenichi Handa <handa@m17n.org>
79
80 * regex.c (regex_compile): Don't call SET_LIST_BIT with a
81 multibyte character.
82
832006-11-27 Chong Yidong <cyd@stupidchicken.com>
84
85 * s/aix4-2.h: Undefine _NO_PROTO. Suggested by Joe Buehler.
86
872006-11-27 Kim F. Storm <storm@cua.dk>
88
89 * window.c (set_window_buffer): Refactor recent changes.
90
912006-11-27 Jason Rumney <jasonr@gnu.org>
92
93 * w32term.c (w32_msg_worker): Declare correctly.
94 (w32_initialize): Don't cast w32_msg_worker.
95
96 * w32fns.c (w32_msg_worker): Define as WINAPI and arg as void pointer.
97
982006-11-26 Chong Yidong <cyd@stupidchicken.com>
99
100 * m/amdx86-64.h: Look for standard libs in /usr/lib64 only if that
101 directory exists.
102
1032006-11-25 Eli Zaretskii <eliz@gnu.org>
104
105 * w16select.c (Fw16_set_clipboard_data): Fix the call to sit_for
106 as per the calling sequence change on 2006-07-11.
107
1082006-11-25 Chong Yidong <cyd@stupidchicken.com>
109
110 * window.c (set_window_buffer): Use BLOCK_INPUT.
111
1122006-11-24 Juanma Barranquero <lekktu@gmail.com>
113
114 * fns.c (substring_both): Add missing address operator.
115
1162006-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
117
118 * fns.c: Use AREF/ASIZE macros.
119 (concat): Provide the full ANSI prototype.
120
1212006-11-24 Juanma Barranquero <lekktu@gmail.com>
122
123 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
124
1252006-11-23 William Smith <William.Smith@global360.com> (tiny change)
126
127 * strftime.c (HAVE_SYS__MBSTATE_T_H): Fix typo.
128
1292006-11-02 Alfred M. Szmidt <ams@gnu.org> (tiny change)
130
131 * s/openbsd.h (LD_SWITCH_SYSTEM): Remove /usr/pkg/lib and
132 /usr/pkg/lib from the library search path.
133 (LD_SWITCH_X_DEFAULT): New macro.
134
1352006-11-22 Chong Yidong <cyd@stupidchicken.com>
136
137 * window.c (set_window_buffer): Clear mouse highlight if it is in
138 this window.
139
1402006-11-21 Chong Yidong <cyd@stupidchicken.com>
141
142 * xfaces.c (realize_default_face): Check if the default font name
143 exists on this display before trying to use it.
144
12006-11-21 Richard Stallman <rms@gnu.org> 1452006-11-21 Richard Stallman <rms@gnu.org>
2 146
3 * fileio.c: Break line before &&, not after. 147 * fileio.c: Break line before &&, not after.
@@ -18,15 +162,13 @@
18 162
192006-11-19 Andreas Schwab <schwab@gnu.org> 1632006-11-19 Andreas Schwab <schwab@gnu.org>
20 164
21 * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize 165 * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize supports.
22 supports.
23 166
24 * xmenu.c (Fx_popup_menu): Initialize selection. 167 * xmenu.c (Fx_popup_menu): Initialize selection.
25 168
262006-11-18 Andreas Schwab <schwab@suse.de> 1692006-11-18 Andreas Schwab <schwab@suse.de>
27 170
28 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to 171 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to mark_memory.
29 mark_memory.
30 172
312006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change) 1732006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change)
32 174
@@ -44,8 +186,7 @@
44 186
452006-11-14 Kenichi Handa <handa@m17n.org> 1872006-11-14 Kenichi Handa <handa@m17n.org>
46 188
47 * coding.c (code_convert_region): Initialize 189 * coding.c (code_convert_region): Initialize coding->heading_ascii.
48 coding->heading_ascii.
49 (decode_coding_string, code_convert_region): Likewise. 190 (decode_coding_string, code_convert_region): Likewise.
50 191
512006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 1922006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@@ -142,7 +283,7 @@
142 283
1432006-11-05 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change) 2842006-11-05 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change)
144 285
145 * s/netbsd.h (POSIX_SIGNALS): Defined. 286 * s/netbsd.h (POSIX_SIGNALS): Define.
146 287
1472006-11-05 Martin Rudalics <rudalics@gmx.at> 2882006-11-05 Martin Rudalics <rudalics@gmx.at>
148 289
@@ -175,8 +316,8 @@
175 (unexec_regions_merge): Don't merge if null pages of preceding region 316 (unexec_regions_merge): Don't merge if null pages of preceding region
176 is not too small. Use long format in printf. 317 is not too small. Use long format in printf.
177 (copy_segment, copy_data_segment): Show filesize. 318 (copy_segment, copy_data_segment): Show filesize.
178 (copy_data_segment): Write filesize bytes of region data. Adjust 319 (copy_data_segment): Write filesize bytes of region data.
179 filesize in segment command accordingly. 320 Adjust filesize in segment command accordingly.
180 (dump_it): Use long format in printf. 321 (dump_it): Use long format in printf.
181 322
1822006-11-05 Juanma Barranquero <lekktu@gmail.com> 3232006-11-05 Juanma Barranquero <lekktu@gmail.com>
@@ -275,8 +416,8 @@
275 `swap_nibbles' static const. 416 `swap_nibbles' static const.
276 (atsu_get_text_layout_with_text_ptr): Make variables `lengths', 417 (atsu_get_text_layout_with_text_ptr): Make variables `lengths',
277 `tags', `sizes', `values' static const. 418 `tags', `sizes', `values' static const.
278 (mac_draw_string_common): Make variables `context' static. Make 419 (mac_draw_string_common): Make variables `context' static.
279 variables `tags', `sizes', and `values' static const. 420 Make variables `tags', `sizes', and `values' static const.
280 (pcm_get_status, x_detect_focus_change, x_scroll_bar_handle_click) 421 (pcm_get_status, x_detect_focus_change, x_scroll_bar_handle_click)
281 (xlfdpat_create, xlfdpat_block_match_1, xlfdpat_match) 422 (xlfdpat_create, xlfdpat_block_match_1, xlfdpat_match)
282 (mac_to_x_fontname, parse_x_font_name, add_mac_font_name) 423 (mac_to_x_fontname, parse_x_font_name, add_mac_font_name)
@@ -287,8 +428,8 @@
287 (fn_keycode_to_keycode_table): Make static const. 428 (fn_keycode_to_keycode_table): Make static const.
288 (mac_load_query_font): Make variables `tags', `sizes', `values', 429 (mac_load_query_font): Make variables `tags', `sizes', `values',
289 `types', and `selectors' static const. 430 `types', and `selectors' static const.
290 (mac_handle_command_event, mac_handle_window_event): Make 431 (mac_handle_command_event, mac_handle_window_event):
291 variables `names' and `types' static const. 432 Make variables `names' and `types' static const.
292 (init_command_handler, install_window_handler): Make variables 433 (init_command_handler, install_window_handler): Make variables
293 `specs*' static const. 434 `specs*' static const.
294 (mac_handle_font_event, mac_handle_text_input_event) 435 (mac_handle_font_event, mac_handle_text_input_event)
@@ -375,12 +516,12 @@
3752006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 5162006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
376 517
377 * xselect.c (x_handle_selection_request): If the converted_selection 518 * xselect.c (x_handle_selection_request): If the converted_selection
378 is NIL or XCDR (converted_selection) is NIL, decline the request. 519 is nil or XCDR (converted_selection) is nil, decline the request.
379 520
3802006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 5212006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
381 522
382 * gtkutil.c (get_utf8_string): Remove warnings with casts. 523 * gtkutil.c (get_utf8_string): Remove warnings with casts.
383 (xg_tool_bar_button_cb): Ditto 524 (xg_tool_bar_button_cb): Ditto.
384 (xg_tool_bar_callback): Ditto. 525 (xg_tool_bar_callback): Ditto.
385 526
3862006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 5272006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@@ -2480,8 +2621,8 @@
2480 (struct sound_device): Add period_size. 2621 (struct sound_device): Add period_size.
2481 (wav_play, au_play): Use period_size if set. 2622 (wav_play, au_play): Use period_size if set.
2482 2623
2483 * Makefile.in (CFLAGS_SOUND): New flags for ALSA 2624 * Makefile.in (CFLAGS_SOUND): New flags for ALSA.
2484 (ALL_CFLAGS): Add CFLAGS_SOUND 2625 (ALL_CFLAGS): Add CFLAGS_SOUND.
2485 2626
24862006-05-18 Kenichi Handa <handa@m17n.org> 26272006-05-18 Kenichi Handa <handa@m17n.org>
2487 2628
@@ -4105,8 +4246,8 @@
4105 4246
41062006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 42472006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
4107 4248
4108 * gtkutil.c (update_frame_tool_bar): Use new tool bar functions 4249 * gtkutil.c (update_frame_tool_bar): Use new tool bar function
4109 (gtk_toolbar_insert) so we can have tool bars of different sizes. 4250 gtk_toolbar_insert() so we can have tool bars of different sizes.
4110 4251
41112006-01-30 Luc Teirlinck <teirllm@auburn.edu> 42522006-01-30 Luc Teirlinck <teirllm@auburn.edu>
4112 4253
@@ -4434,7 +4575,7 @@
4434 4575
44352005-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 45762005-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
4436 4577
4437 * xfns.c: x_show_hidden_files, new variable. 4578 * xfns.c (x_show_hidden_files): New variable.
4438 (syms_of_xfns): Defvar it. 4579 (syms_of_xfns): Defvar it.
4439 4580
4440 * gtkutil.c (xg_toggle_visibility_cb): New function. 4581 * gtkutil.c (xg_toggle_visibility_cb): New function.
@@ -6719,7 +6860,7 @@
6719 6860
6720 * w32console.c (initialize_w32_display): Detect when the console 6861 * w32console.c (initialize_w32_display): Detect when the console
6721 dimensions are insane, and default to 80x25 instead. 6862 dimensions are insane, and default to 80x25 instead.
6722 (w32_use_full_screen_buffer): Default to NIL. 6863 (w32_use_full_screen_buffer): Default to nil.
6723 6864
67242005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 68652005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6725 6866
@@ -9928,7 +10069,7 @@
9928 10069
9929 * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff 10070 * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff
9930 for left and top calculations. Remove call to x_real_positions. 10071 for left and top calculations. Remove call to x_real_positions.
9931 [Bug report by Drew Adams in November] 10072 [Bug report by Drew Adams in November.]
9932 (x_check_expected_move): Do not set change_gravity to 1 when calling 10073 (x_check_expected_move): Do not set change_gravity to 1 when calling
9933 x_set_offset. 10074 x_set_offset.
9934 10075
@@ -9978,8 +10119,8 @@
9978 new variables main_thread and alloc_mutex, 10119 new variables main_thread and alloc_mutex,
9979 define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect 10120 define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect
9980 emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread. 10121 emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread.
9981 If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same as 10122 If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same
9982 (UN)BLOCK_INPUT. 10123 as (UN)BLOCK_INPUT.
9983 (emacs_blocked_free, emacs_blocked_malloc) 10124 (emacs_blocked_free, emacs_blocked_malloc)
9984 (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC. 10125 (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC.
9985 (uninterrupt_malloc): Initialize main_thread and alloc_mutex. 10126 (uninterrupt_malloc): Initialize main_thread and alloc_mutex.
@@ -9989,7 +10130,7 @@
9989 10130
9990 * emacs.c (Fdump_emacs): Call reset_malloc_hooks. 10131 * emacs.c (Fdump_emacs): Call reset_malloc_hooks.
9991 10132
9992 * keyboard.c: Conditionally include pthread.h 10133 * keyboard.c: Conditionally include pthread.h.
9993 (handle_async_input, input_available_signalt): If not in the main 10134 (handle_async_input, input_available_signalt): If not in the main
9994 thread, block signal, send signal to main thread and return. 10135 thread, block signal, send signal to main thread and return.
9995 10136
@@ -10799,7 +10940,7 @@
10799 10940
108002004-11-02 Kim F. Storm <storm@cua.dk> 109412004-11-02 Kim F. Storm <storm@cua.dk>
10801 10942
10802 * Makefile.in (callproc.o): Depend on blockinput.h atimer.h systime.h. 10943 * Makefile.in (callproc.o): Depend on blockinput.h, atimer.h, systime.h.
10803 10944
108042004-11-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 109452004-11-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10805 10946
@@ -10860,10 +11001,9 @@
10860 * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. 11001 * w32fns.c (Fx_file_dialog): Add parameter only_dir_p.
10861 Check only_dir_p instead of comparing prompt to "Dired". 11002 Check only_dir_p instead of comparing prompt to "Dired".
10862 11003
10863 * gtkutil.c (xg_get_file_with_chooser) 11004 * gtkutil.c (xg_get_file_with_chooser, xg_get_file_with_selection):
10864 (xg_get_file_with_selection): New functions, only defined ifdef 11005 New functions, only defined ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW
10865 HAVE_GTK_FILE_CHOOSER_DIALOG_NEW and HAVE_GTK_FILE_SELECTION_NEW 11006 and HAVE_GTK_FILE_SELECTION_NEW respectively.
10866 respectively.
10867 (xg_get_file_name): Add parameter only_dir_p. 11007 (xg_get_file_name): Add parameter only_dir_p.
10868 Call xg_get_file_with_chooser or xg_get_file_with_selection 11008 Call xg_get_file_with_chooser or xg_get_file_with_selection
10869 depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog. 11009 depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog.
@@ -10900,7 +11040,7 @@
10900 tool_bar_items to assignment of result. 11040 tool_bar_items to assignment of result.
10901 11041
10902 * atimer.c (alarm_signal_handler): Do not call set_alarm if 11042 * atimer.c (alarm_signal_handler): Do not call set_alarm if
10903 pending_atmers is non-zero. 11043 pending_atimers is non-zero.
10904 11044
109052004-10-31 Kim F. Storm <storm@cua.dk> 110452004-10-31 Kim F. Storm <storm@cua.dk>
10906 11046
@@ -11238,7 +11378,7 @@
11238 precedence. 11378 precedence.
11239 (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. 11379 (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area.
11240 11380
112412004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> 113812004-10-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
11242 11382
11243 * config.in: Regenerate. 11383 * config.in: Regenerate.
11244 11384
@@ -14515,14 +14655,14 @@
14515 * xterm.c (handle_one_xevent): Call x_handle_dnd_message for 14655 * xterm.c (handle_one_xevent): Call x_handle_dnd_message for
14516 ClientMessages. 14656 ClientMessages.
14517 14657
14518 * xselect.c: Include termhooks.h and X11/Xproto.h 14658 * xselect.c: Include termhooks.h and X11/Xproto.h.
14519 (x_check_property_data, x_fill_property_data) 14659 (x_check_property_data, x_fill_property_data)
14520 (x_property_data_to_lisp, mouse_position_for_drop) 14660 (x_property_data_to_lisp, mouse_position_for_drop)
14521 (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support. 14661 (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support.
14522 (Fx_send_client_event): Move here from xfns.c. 14662 (Fx_send_client_event): Move here from xfns.c.
14523 (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message. 14663 (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message.
14524 14664
14525 * xfns.c (x-send-client-message): Move to xselect.c 14665 * xfns.c (x-send-client-message): Move to xselect.c.
14526 (Fx_change_window_property): Add optional arguments TYPE, FORMAT and 14666 (Fx_change_window_property): Add optional arguments TYPE, FORMAT and
14527 OUTER_P. 14667 OUTER_P.
14528 (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P, 14668 (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P,
@@ -15617,7 +15757,7 @@
15617 Set BUF_INTERVALS (buffer)->up_obj when appropriate. 15757 Set BUF_INTERVALS (buffer)->up_obj when appropriate.
15618 Handle over_used when splitting UNDER. 15758 Handle over_used when splitting UNDER.
15619 15759
156202003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 157602003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15621 15761
15622 * regex.c (regex_compile): Free the stack when returning from function. 15762 * regex.c (regex_compile): Free the stack when returning from function.
15623 15763
@@ -18083,7 +18223,7 @@
18083 18223
180842003-03-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 182242003-03-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
18085 18225
18086 * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif 18226 * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif.
18087 18227
18088 * gtkutil.h: Take two more arguments to xg_update_scrollbar_pos. 18228 * gtkutil.h: Take two more arguments to xg_update_scrollbar_pos.
18089 (XG_SB_RANGE): New define. 18229 (XG_SB_RANGE): New define.
@@ -18320,7 +18460,7 @@
18320 * gtkutil.c: Removed handle_fixed_child, struct xg_last_sb_pos. 18460 * gtkutil.c: Removed handle_fixed_child, struct xg_last_sb_pos.
18321 (xg_resize_widgets): Don't call foreach(handle_fixed_child). 18461 (xg_resize_widgets): Don't call foreach(handle_fixed_child).
18322 (xg_gtk_scroll_destroy): Remove free of struct xg_last_sb_pos. 18462 (xg_gtk_scroll_destroy): Remove free of struct xg_last_sb_pos.
18323 (scroll_bar_button_cb): Set bar->dragging to NIL on button release. 18463 (scroll_bar_button_cb): Set bar->dragging to nil on button release.
18324 (xg_create_scroll_bar): Pass bar to button event callback. 18464 (xg_create_scroll_bar): Pass bar to button event callback.
18325 (xg_find_top_left_in_fixed): New function. 18465 (xg_find_top_left_in_fixed): New function.
18326 (xg_update_scrollbar_pos): Don't call gdk_window_clear on 18466 (xg_update_scrollbar_pos): Don't call gdk_window_clear on
@@ -18621,7 +18761,7 @@
186212003-02-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 187612003-02-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
18622 18762
18623 * keyboard.c (cancel_hourglass_unwind): Surround with 18763 * keyboard.c (cancel_hourglass_unwind): Surround with
18624 #ifdef HAVE_X_WINDOWS 18764 #ifdef HAVE_X_WINDOWS.
18625 18765
186262003-02-25 Kenichi Handa <handa@m17n.org> 187662003-02-25 Kenichi Handa <handa@m17n.org>
18627 18767
@@ -19182,7 +19322,7 @@
19182 19322
191832003-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 193232003-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
19184 19324
19185 * gtkutil.c: Must include stdio.h before termhooks.h 19325 * gtkutil.c: Must include stdio.h before termhooks.h.
19186 19326
191872003-01-21 Dave Love <fx@gnu.org> 193272003-01-21 Dave Love <fx@gnu.org>
19188 19328
@@ -19228,7 +19368,7 @@
19228 * xterm.c (handle_one_xevent): Surround popup_activated 19368 * xterm.c (handle_one_xevent): Surround popup_activated
19229 with #ifdef:s for non-toolkit version. 19369 with #ifdef:s for non-toolkit version.
19230 19370
19231 * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK 19371 * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK.
19232 (gtkutil.o): New file. 19372 (gtkutil.o): New file.
19233 (TOOLKIT_DEFINES): Set to -DUSE_GTK if HAVE_GTK. 19373 (TOOLKIT_DEFINES): Set to -DUSE_GTK if HAVE_GTK.
19234 (LIBW): Set to @GTK_LIBS@ if USE_GTK. 19374 (LIBW): Set to @GTK_LIBS@ if USE_GTK.
@@ -19274,7 +19414,7 @@
19274 (syms_of_xterm): Set Vx_toolkit_scroll_bars for USE_GTK. 19414 (syms_of_xterm): Set Vx_toolkit_scroll_bars for USE_GTK.
19275 19415
19276 * xmenu.c: Include gtkutil.h for USE_GTK. 19416 * xmenu.c: Include gtkutil.h for USE_GTK.
19277 (Fx_popup_menu): Use current position if x and y is NIL. 19417 (Fx_popup_menu): Use current position if x and y are nil.
19278 (single_menu_item, single_menu_item, Fx_popup_dialog): 19418 (single_menu_item, single_menu_item, Fx_popup_dialog):
19279 Check for USE_GTK. 19419 Check for USE_GTK.
19280 (popup_widget_loop): New function for USE_GTK. 19420 (popup_widget_loop): New function for USE_GTK.
@@ -19304,7 +19444,7 @@
19304 (x_set_tool_bar_lines): Call update_frame_tool_bar for USE_GTK. 19444 (x_set_tool_bar_lines): Call update_frame_tool_bar for USE_GTK.
19305 (x_set_name, x_set_title): Call gtk_window_set_title for USE_GTK. 19445 (x_set_name, x_set_title): Call gtk_window_set_title for USE_GTK.
19306 (x_window): Call xg_create_frame_widgets for USE_GTK. 19446 (x_window): Call xg_create_frame_widgets for USE_GTK.
19307 (Fx_create_frame): Check for USE_GTK 19447 (Fx_create_frame): Check for USE_GTK.
19308 (Fx_file_dialog): New implementation for USE_GTK. 19448 (Fx_file_dialog): New implementation for USE_GTK.
19309 19449
19310 * xdisp.c: Add check for USE_GTK for extern void set_frame_menubar. 19450 * xdisp.c: Add check for USE_GTK for extern void set_frame_menubar.
@@ -19331,7 +19471,7 @@
19331 * dispnew.c (adjust_frame_glyphs_for_window_redisplay): 19471 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
19332 Add check for USE_GTK. 19472 Add check for USE_GTK.
19333 19473
19334 * config.in: Added HAVE_GTK 19474 * config.in: Added HAVE_GTK.
19335 19475
19336 * alloc.c (Fgarbage_collect): Call xg_mark_data for GTK. 19476 * alloc.c (Fgarbage_collect): Call xg_mark_data for GTK.
19337 19477
@@ -19855,7 +19995,7 @@
19855 19995
19856 * alloca.c: Undo ifdef change accidentally made on 12-04. 19996 * alloca.c: Undo ifdef change accidentally made on 12-04.
19857 19997
198582002-12-06 Francesco Potorti` <pot@gnu.org> 199982002-12-06 Francesco Potort,Al(B <pot@gnu.org>
19859 19999
19860 * xfns.c (png_load): Avoid double gamma correction for PNG images. 20000 * xfns.c (png_load): Avoid double gamma correction for PNG images.
19861 20001
@@ -20176,7 +20316,7 @@
20176 * fns.c (Fcopy_sequence): Doc fix. 20316 * fns.c (Fcopy_sequence): Doc fix.
20177 (Fmap_char_table): Cast `call2'. 20317 (Fmap_char_table): Cast `call2'.
20178 20318
201792002-11-14 Francesco Potorti` <pot@gnu.org> 203192002-11-14 Francesco Potort,Al(B <pot@gnu.org>
20180 20320
20181 * s/sol2-8.h: New file. 20321 * s/sol2-8.h: New file.
20182 20322
@@ -20557,7 +20697,7 @@
20557 Only when it is non-nil, handle composition sequence. 20697 Only when it is non-nil, handle composition sequence.
20558 (setup_coding_system) <0>: Don't force composition handling. 20698 (setup_coding_system) <0>: Don't force composition handling.
20559 20699
20560 * Makefile.in (lisp, shortlisp): Add utf-16.elc 20700 * Makefile.in (lisp, shortlisp): Add utf-16.elc.
20561 20701
205622002-09-29 Richard M. Stallman <rms@gnu.org> 207022002-09-29 Richard M. Stallman <rms@gnu.org>
20563 20703
diff --git a/src/Makefile.in b/src/Makefile.in
index b7569b9de2a..87352d74830 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -38,6 +38,7 @@ CPPFLAGS=@CPPFLAGS@
38LDFLAGS=@LDFLAGS@ 38LDFLAGS=@LDFLAGS@
39LN_S=@LN_S@ 39LN_S=@LN_S@
40EXEEXT=@EXEEXT@ 40EXEEXT=@EXEEXT@
41version=@version@
41# Substitute an assignment for the MAKE variable, because 42# Substitute an assignment for the MAKE variable, because
42# BSD doesn't have it as a default. 43# BSD doesn't have it as a default.
43@SET_MAKE@ 44@SET_MAKE@
@@ -1347,11 +1348,11 @@ ${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r
1347${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c 1348${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c
1348 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT} 1349 cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT}
1349bootstrapclean: 1350bootstrapclean:
1350 rm -f bootstrap-emacs${EXEEXT} 1351 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
1351mostlyclean: 1352mostlyclean:
1352 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a 1353 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
1353 rm -f ../etc/DOC 1354 rm -f ../etc/DOC
1354 rm -f bootstrap-emacs${EXEEXT} 1355 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
1355 rm -f buildobj.lst 1356 rm -f buildobj.lst
1356clean: mostlyclean 1357clean: mostlyclean
1357 rm -f emacs-*${EXEEXT} emacs${EXEEXT} 1358 rm -f emacs-*${EXEEXT} emacs${EXEEXT}
diff --git a/src/abbrev.c b/src/abbrev.c
index f47a83b0bfe..5e8c8c98862 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -83,7 +83,7 @@ EMACS_INT last_abbrev_point;
83 83
84Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; 84Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook;
85 85
86Lisp_Object Qsystem_type, Qcount; 86Lisp_Object Qsystem_type, Qcount, Qforce;
87 87
88DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0, 88DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0,
89 doc: /* Create a new, empty abbrev table object. */) 89 doc: /* Create a new, empty abbrev table object. */)
@@ -107,7 +107,7 @@ DEFUN ("clear-abbrev-table", Fclear_abbrev_table, Sclear_abbrev_table, 1, 1, 0,
107 XVECTOR (table)->contents[i] = make_number (0); 107 XVECTOR (table)->contents[i] = make_number (0);
108 return Qnil; 108 return Qnil;
109} 109}
110 110
111DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, 111DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0,
112 doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. 112 doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK.
113NAME must be a string. 113NAME must be a string.
@@ -123,7 +123,9 @@ usage-count, which is incremented each time the abbrev is used.
123\(The default is zero.) 123\(The default is zero.)
124 124
125SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation 125SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation
126which should not be saved in the user's abbreviation file. */) 126which should not be saved in the user's abbreviation file.
127Unless SYSTEM-FLAG is `force', a system abbreviation will not
128overwrite a non-system abbreviation of the same name. */)
127 (table, name, expansion, hook, count, system_flag) 129 (table, name, expansion, hook, count, system_flag)
128 Lisp_Object table, name, expansion, hook, count, system_flag; 130 Lisp_Object table, name, expansion, hook, count, system_flag;
129{ 131{
@@ -131,6 +133,16 @@ which should not be saved in the user's abbreviation file. */)
131 CHECK_VECTOR (table); 133 CHECK_VECTOR (table);
132 CHECK_STRING (name); 134 CHECK_STRING (name);
133 135
136 /* If defining a system abbrev, do not overwrite a non-system abbrev
137 of the same name, unless 'force is used. */
138 if (!NILP (system_flag) && !EQ (system_flag, Qforce))
139 {
140 sym = Fintern_soft (name, table);
141
142 if (!NILP (SYMBOL_VALUE (sym)) &&
143 NILP (Fplist_get (XSYMBOL (sym)->plist, Qsystem_type))) return Qnil;
144 }
145
134 if (NILP (count)) 146 if (NILP (count))
135 count = make_number (0); 147 count = make_number (0);
136 else 148 else
@@ -646,6 +658,9 @@ syms_of_abbrev ()
646 Qcount = intern ("count"); 658 Qcount = intern ("count");
647 staticpro (&Qcount); 659 staticpro (&Qcount);
648 660
661 Qforce = intern ("force");
662 staticpro (&Qforce);
663
649 DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, 664 DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list,
650 doc: /* List of symbols whose values are abbrev tables. */); 665 doc: /* List of symbols whose values are abbrev tables. */);
651 Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"), 666 Vabbrev_table_name_list = Fcons (intern ("fundamental-mode-abbrev-table"),
diff --git a/src/buffer.c b/src/buffer.c
index 47877b6a37b..95f900aaf46 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5934,8 +5934,8 @@ An entry of the form POSITION indicates that point was at the buffer
5934location given by the integer. Undoing an entry of this form places 5934location given by the integer. Undoing an entry of this form places
5935point at POSITION. 5935point at POSITION.
5936 5936
5937nil marks undo boundaries. The undo command treats the changes 5937Entries with value `nil' mark undo boundaries. The undo command treats
5938between two undo boundaries as a single step to be undone. 5938the changes between two undo boundaries as a single step to be undone.
5939 5939
5940If the value of the variable is t, undo information is not recorded. */); 5940If the value of the variable is t, undo information is not recorded. */);
5941 5941
diff --git a/src/config.in b/src/config.in
index 10135ade386..7903c749513 100644
--- a/src/config.in
+++ b/src/config.in
@@ -1,7 +1,7 @@
1/* src/config.in. Generated from configure.in by autoheader. */ 1/* src/config.in. Generated from configure.in by autoheader. */
2 2
3/* GNU Emacs site configuration template file. 3/* GNU Emacs site configuration template file.
4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004, 2005, 2006 4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006
5 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
@@ -577,6 +577,9 @@ Boston, MA 02110-1301, USA. */
577/* Define to 1 if `struct utimbuf' is declared by <utime.h>. */ 577/* Define to 1 if `struct utimbuf' is declared by <utime.h>. */
578#undef HAVE_STRUCT_UTIMBUF 578#undef HAVE_STRUCT_UTIMBUF
579 579
580/* Define to 1 if you have the `sync' function. */
581#undef HAVE_SYNC
582
580/* Define to 1 if you have the `sysinfo' function. */ 583/* Define to 1 if you have the `sysinfo' function. */
581#undef HAVE_SYSINFO 584#undef HAVE_SYSINFO
582 585
@@ -700,6 +703,9 @@ Boston, MA 02110-1301, USA. */
700/* Define to 1 if you have the X11R6 or newer version of Xt. */ 703/* Define to 1 if you have the X11R6 or newer version of Xt. */
701#undef HAVE_X11XTR6 704#undef HAVE_X11XTR6
702 705
706/* Define to 1 if the file /usr/lib64 exists. */
707#undef HAVE_X86_64_LIB64_DIR
708
703/* Define to 1 if you have the Xaw3d library (-lXaw3d). */ 709/* Define to 1 if you have the Xaw3d library (-lXaw3d). */
704#undef HAVE_XAW3D 710#undef HAVE_XAW3D
705 711
diff --git a/src/emacs.c b/src/emacs.c
index 4e1caec3aff..935a12463dc 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -361,9 +361,9 @@ pthread_t main_thread;
361#endif 361#endif
362 362
363 363
364#ifdef SIGUSR1 364#if defined (SIGUSR1) || defined (SIGUSR2)
365SIGTYPE 365SIGTYPE
366handle_USR1_signal (sig) 366handle_user_signal (sig)
367 int sig; 367 int sig;
368{ 368{
369 struct input_event buf; 369 struct input_event buf;
@@ -374,25 +374,10 @@ handle_USR1_signal (sig)
374 buf.frame_or_window = selected_frame; 374 buf.frame_or_window = selected_frame;
375 375
376 kbd_buffer_store_event (&buf); 376 kbd_buffer_store_event (&buf);
377} 377 buf.code = sig;
378#endif /* SIGUSR1 */
379
380#ifdef SIGUSR2
381SIGTYPE
382handle_USR2_signal (sig)
383 int sig;
384{
385 struct input_event buf;
386
387 SIGNAL_THREAD_CHECK (sig);
388 bzero (&buf, sizeof buf);
389 buf.kind = USER_SIGNAL_EVENT;
390 buf.code = 1;
391 buf.frame_or_window = selected_frame;
392
393 kbd_buffer_store_event (&buf); 378 kbd_buffer_store_event (&buf);
394} 379}
395#endif /* SIGUSR2 */ 380#endif
396 381
397/* Handle bus errors, invalid instruction, etc. */ 382/* Handle bus errors, invalid instruction, etc. */
398SIGTYPE 383SIGTYPE
@@ -1229,10 +1214,10 @@ main (argc, argv
1229 signal (SIGILL, fatal_error_signal); 1214 signal (SIGILL, fatal_error_signal);
1230 signal (SIGTRAP, fatal_error_signal); 1215 signal (SIGTRAP, fatal_error_signal);
1231#ifdef SIGUSR1 1216#ifdef SIGUSR1
1232 signal (SIGUSR1, handle_USR1_signal); 1217 signal (SIGUSR1, handle_user_signal);
1233#ifdef SIGUSR2
1234 signal (SIGUSR2, handle_USR2_signal);
1235#endif 1218#endif
1219#ifdef SIGUSR2
1220 signal (SIGUSR2, handle_user_signal);
1236#endif 1221#endif
1237#ifdef SIGABRT 1222#ifdef SIGABRT
1238 signal (SIGABRT, fatal_error_signal); 1223 signal (SIGABRT, fatal_error_signal);
diff --git a/src/fileio.c b/src/fileio.c
index 601c5b5de9d..1cd1188cb63 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3546,11 +3546,7 @@ Use the current time if TIME is nil. TIME is in the format of
3546 return Qt; 3546 return Qt;
3547} 3547}
3548 3548
3549#ifdef __NetBSD__ 3549#ifdef HAVE_SYNC
3550#define unix 42
3551#endif
3552
3553#ifdef unix
3554DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", 3550DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "",
3555 doc: /* Tell Unix to finish all pending disk updates. */) 3551 doc: /* Tell Unix to finish all pending disk updates. */)
3556 () 3552 ()
@@ -3559,7 +3555,7 @@ DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "",
3559 return Qnil; 3555 return Qnil;
3560} 3556}
3561 3557
3562#endif /* unix */ 3558#endif /* HAVE_SYNC */
3563 3559
3564DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, 3560DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0,
3565 doc: /* Return t if file FILE1 is newer than file FILE2. 3561 doc: /* Return t if file FILE1 is newer than file FILE2.
@@ -6709,7 +6705,7 @@ A non-nil value may result in data loss! */);
6709 defsubr (&Sread_file_name); 6705 defsubr (&Sread_file_name);
6710 defsubr (&Snext_read_file_uses_dialog_p); 6706 defsubr (&Snext_read_file_uses_dialog_p);
6711 6707
6712#ifdef unix 6708#ifdef HAVE_SYNC
6713 defsubr (&Sunix_sync); 6709 defsubr (&Sunix_sync);
6714#endif 6710#endif
6715} 6711}
diff --git a/src/fns.c b/src/fns.c
index e6b83b8e4e1..da2c43fd6a9 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -150,13 +150,13 @@ To get the number of bytes, use `string-bytes'. */)
150 if (STRINGP (sequence)) 150 if (STRINGP (sequence))
151 XSETFASTINT (val, SCHARS (sequence)); 151 XSETFASTINT (val, SCHARS (sequence));
152 else if (VECTORP (sequence)) 152 else if (VECTORP (sequence))
153 XSETFASTINT (val, XVECTOR (sequence)->size); 153 XSETFASTINT (val, ASIZE (sequence));
154 else if (CHAR_TABLE_P (sequence)) 154 else if (CHAR_TABLE_P (sequence))
155 XSETFASTINT (val, MAX_CHAR); 155 XSETFASTINT (val, MAX_CHAR);
156 else if (BOOL_VECTOR_P (sequence)) 156 else if (BOOL_VECTOR_P (sequence))
157 XSETFASTINT (val, XBOOL_VECTOR (sequence)->size); 157 XSETFASTINT (val, XBOOL_VECTOR (sequence)->size);
158 else if (COMPILEDP (sequence)) 158 else if (COMPILEDP (sequence))
159 XSETFASTINT (val, XVECTOR (sequence)->size & PSEUDOVECTOR_SIZE_MASK); 159 XSETFASTINT (val, ASIZE (sequence) & PSEUDOVECTOR_SIZE_MASK);
160 else if (CONSP (sequence)) 160 else if (CONSP (sequence))
161 { 161 {
162 i = 0; 162 i = 0;
@@ -389,9 +389,9 @@ Symbols are also allowed; their print names are used instead. */)
389/* "gcc -O3" enables automatic function inlining, which optimizes out 389/* "gcc -O3" enables automatic function inlining, which optimizes out
390 the arguments for the invocations of this function, whereas it 390 the arguments for the invocations of this function, whereas it
391 expects these values on the stack. */ 391 expects these values on the stack. */
392static Lisp_Object concat () __attribute__((noinline)); 392static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)) __attribute__((noinline));
393#else /* !__GNUC__ */ 393#else /* !__GNUC__ */
394static Lisp_Object concat (); 394static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special));
395#endif 395#endif
396 396
397/* ARGSUSED */ 397/* ARGSUSED */
@@ -576,7 +576,7 @@ concat (nargs, args, target_type, last_special)
576 if (VECTORP (this)) 576 if (VECTORP (this))
577 for (i = 0; i < len; i++) 577 for (i = 0; i < len; i++)
578 { 578 {
579 ch = XVECTOR (this)->contents[i]; 579 ch = AREF (this, i);
580 CHECK_CHARACTER (ch); 580 CHECK_CHARACTER (ch);
581 this_len_byte = CHAR_BYTES (XINT (ch)); 581 this_len_byte = CHAR_BYTES (XINT (ch));
582 result_len_byte += this_len_byte; 582 result_len_byte += this_len_byte;
@@ -727,7 +727,7 @@ concat (nargs, args, target_type, last_special)
727 thisindex++; 727 thisindex++;
728 } 728 }
729 else 729 else
730 elt = XVECTOR (this)->contents[thisindex++]; 730 elt = AREF (this, thisindex++);
731 731
732 /* Store this element into the result. */ 732 /* Store this element into the result. */
733 if (toindex < 0) 733 if (toindex < 0)
@@ -737,7 +737,7 @@ concat (nargs, args, target_type, last_special)
737 tail = XCDR (tail); 737 tail = XCDR (tail);
738 } 738 }
739 else if (VECTORP (val)) 739 else if (VECTORP (val))
740 XVECTOR (val)->contents[toindex++] = elt; 740 AREF (val, toindex++) = elt;
741 else 741 else
742 { 742 {
743 CHECK_NUMBER (elt); 743 CHECK_NUMBER (elt);
@@ -1180,7 +1180,7 @@ This function allows vectors as well as strings. */)
1180 size_byte = SBYTES (string); 1180 size_byte = SBYTES (string);
1181 } 1181 }
1182 else 1182 else
1183 size = XVECTOR (string)->size; 1183 size = ASIZE (string);
1184 1184
1185 if (NILP (to)) 1185 if (NILP (to))
1186 { 1186 {
@@ -1218,8 +1218,7 @@ This function allows vectors as well as strings. */)
1218 string, make_number (0), res, Qnil); 1218 string, make_number (0), res, Qnil);
1219 } 1219 }
1220 else 1220 else
1221 res = Fvector (to_char - from_char, 1221 res = Fvector (to_char - from_char, &AREF (string, from_char));
1222 XVECTOR (string)->contents + from_char);
1223 1222
1224 return res; 1223 return res;
1225} 1224}
@@ -1303,7 +1302,7 @@ substring_both (string, from, from_byte, to, to_byte)
1303 size_byte = SBYTES (string); 1302 size_byte = SBYTES (string);
1304 } 1303 }
1305 else 1304 else
1306 size = XVECTOR (string)->size; 1305 size = ASIZE (string);
1307 1306
1308 if (!(0 <= from && from <= to && to <= size)) 1307 if (!(0 <= from && from <= to && to <= size))
1309 args_out_of_range_3 (string, make_number (from), make_number (to)); 1308 args_out_of_range_3 (string, make_number (from), make_number (to));
@@ -1317,8 +1316,7 @@ substring_both (string, from, from_byte, to, to_byte)
1317 string, make_number (0), res, Qnil); 1316 string, make_number (0), res, Qnil);
1318 } 1317 }
1319 else 1318 else
1320 res = Fvector (to - from, 1319 res = Fvector (to - from, &AREF (string, from));
1321 XVECTOR (string)->contents + from);
1322 1320
1323 return res; 1321 return res;
1324} 1322}
@@ -2180,11 +2178,11 @@ internal_equal (o1, o2, depth, props)
2180 case Lisp_Vectorlike: 2178 case Lisp_Vectorlike:
2181 { 2179 {
2182 register int i; 2180 register int i;
2183 EMACS_INT size = XVECTOR (o1)->size; 2181 EMACS_INT size = ASIZE (o1);
2184 /* Pseudovectors have the type encoded in the size field, so this test 2182 /* Pseudovectors have the type encoded in the size field, so this test
2185 actually checks that the objects have the same type as well as the 2183 actually checks that the objects have the same type as well as the
2186 same size. */ 2184 same size. */
2187 if (XVECTOR (o2)->size != size) 2185 if (ASIZE (o2) != size)
2188 return 0; 2186 return 0;
2189 /* Boolvectors are compared much like strings. */ 2187 /* Boolvectors are compared much like strings. */
2190 if (BOOL_VECTOR_P (o1)) 2188 if (BOOL_VECTOR_P (o1))
@@ -2215,8 +2213,8 @@ internal_equal (o1, o2, depth, props)
2215 for (i = 0; i < size; i++) 2213 for (i = 0; i < size; i++)
2216 { 2214 {
2217 Lisp_Object v1, v2; 2215 Lisp_Object v1, v2;
2218 v1 = XVECTOR (o1)->contents [i]; 2216 v1 = AREF (o1, i);
2219 v2 = XVECTOR (o2)->contents [i]; 2217 v2 = AREF (o2, i);
2220 if (!internal_equal (v1, v2, depth + 1, props)) 2218 if (!internal_equal (v1, v2, depth + 1, props))
2221 return 0; 2219 return 0;
2222 } 2220 }
@@ -2257,7 +2255,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2257 if (VECTORP (array)) 2255 if (VECTORP (array))
2258 { 2256 {
2259 register Lisp_Object *p = XVECTOR (array)->contents; 2257 register Lisp_Object *p = XVECTOR (array)->contents;
2260 size = XVECTOR (array)->size; 2258 size = ASIZE (array);
2261 for (index = 0; index < size; index++) 2259 for (index = 0; index < size; index++)
2262 p[index] = item; 2260 p[index] = item;
2263 } 2261 }
@@ -2422,14 +2420,14 @@ mapcar1 (leni, vals, fn, seq)
2422 else 2420 else
2423 GCPRO2 (fn, seq); 2421 GCPRO2 (fn, seq);
2424 /* We need not explicitly protect `tail' because it is used only on lists, and 2422 /* We need not explicitly protect `tail' because it is used only on lists, and
2425 1) lists are not relocated and 2) the list is marked via `seq' so will not be freed */ 2423 1) lists are not relocated and 2) the list is marked via `seq' so will not
2424 be freed */
2426 2425
2427 if (VECTORP (seq)) 2426 if (VECTORP (seq))
2428 { 2427 {
2429 for (i = 0; i < leni; i++) 2428 for (i = 0; i < leni; i++)
2430 { 2429 {
2431 dummy = XVECTOR (seq)->contents[i]; 2430 dummy = call1 (fn, AREF (seq, i));
2432 dummy = call1 (fn, dummy);
2433 if (vals) 2431 if (vals)
2434 vals[i] = dummy; 2432 vals[i] = dummy;
2435 } 2433 }
@@ -2440,11 +2438,7 @@ mapcar1 (leni, vals, fn, seq)
2440 { 2438 {
2441 int byte; 2439 int byte;
2442 byte = XBOOL_VECTOR (seq)->data[i / BOOL_VECTOR_BITS_PER_CHAR]; 2440 byte = XBOOL_VECTOR (seq)->data[i / BOOL_VECTOR_BITS_PER_CHAR];
2443 if (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR))) 2441 dummy = (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR))) ? Qt : Qnil;
2444 dummy = Qt;
2445 else
2446 dummy = Qnil;
2447
2448 dummy = call1 (fn, dummy); 2442 dummy = call1 (fn, dummy);
2449 if (vals) 2443 if (vals)
2450 vals[i] = dummy; 2444 vals[i] = dummy;
@@ -3757,7 +3751,7 @@ larger_vector (vec, new_size, init)
3757 int i, old_size; 3751 int i, old_size;
3758 3752
3759 xassert (VECTORP (vec)); 3753 xassert (VECTORP (vec));
3760 old_size = XVECTOR (vec)->size; 3754 old_size = ASIZE (vec);
3761 xassert (new_size >= old_size); 3755 xassert (new_size >= old_size);
3762 3756
3763 v = allocate_vector (new_size); 3757 v = allocate_vector (new_size);
@@ -4089,7 +4083,7 @@ maybe_resize_hash_table (h)
4089 if (!NILP (HASH_HASH (h, i))) 4083 if (!NILP (HASH_HASH (h, i)))
4090 { 4084 {
4091 unsigned hash_code = XUINT (HASH_HASH (h, i)); 4085 unsigned hash_code = XUINT (HASH_HASH (h, i));
4092 int start_of_bucket = hash_code % XVECTOR (h->index)->size; 4086 int start_of_bucket = hash_code % ASIZE (h->index);
4093 HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); 4087 HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket);
4094 HASH_INDEX (h, start_of_bucket) = make_number (i); 4088 HASH_INDEX (h, start_of_bucket) = make_number (i);
4095 } 4089 }
@@ -4115,7 +4109,7 @@ hash_lookup (h, key, hash)
4115 if (hash) 4109 if (hash)
4116 *hash = hash_code; 4110 *hash = hash_code;
4117 4111
4118 start_of_bucket = hash_code % XVECTOR (h->index)->size; 4112 start_of_bucket = hash_code % ASIZE (h->index);
4119 idx = HASH_INDEX (h, start_of_bucket); 4113 idx = HASH_INDEX (h, start_of_bucket);
4120 4114
4121 /* We need not gcpro idx since it's either an integer or nil. */ 4115 /* We need not gcpro idx since it's either an integer or nil. */
@@ -4162,7 +4156,7 @@ hash_put (h, key, value, hash)
4162 HASH_HASH (h, i) = make_number (hash); 4156 HASH_HASH (h, i) = make_number (hash);
4163 4157
4164 /* Add new entry to its collision chain. */ 4158 /* Add new entry to its collision chain. */
4165 start_of_bucket = hash % XVECTOR (h->index)->size; 4159 start_of_bucket = hash % ASIZE (h->index);
4166 HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); 4160 HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket);
4167 HASH_INDEX (h, start_of_bucket) = make_number (i); 4161 HASH_INDEX (h, start_of_bucket) = make_number (i);
4168 return i; 4162 return i;
@@ -4181,7 +4175,7 @@ hash_remove (h, key)
4181 Lisp_Object idx, prev; 4175 Lisp_Object idx, prev;
4182 4176
4183 hash_code = h->hashfn (h, key); 4177 hash_code = h->hashfn (h, key);
4184 start_of_bucket = hash_code % XVECTOR (h->index)->size; 4178 start_of_bucket = hash_code % ASIZE (h->index);
4185 idx = HASH_INDEX (h, start_of_bucket); 4179 idx = HASH_INDEX (h, start_of_bucket);
4186 prev = Qnil; 4180 prev = Qnil;
4187 4181
@@ -4237,8 +4231,8 @@ hash_clear (h)
4237 HASH_HASH (h, i) = Qnil; 4231 HASH_HASH (h, i) = Qnil;
4238 } 4232 }
4239 4233
4240 for (i = 0; i < XVECTOR (h->index)->size; ++i) 4234 for (i = 0; i < ASIZE (h->index); ++i)
4241 XVECTOR (h->index)->contents[i] = Qnil; 4235 AREF (h->index, i) = Qnil;
4242 4236
4243 h->next_free = make_number (0); 4237 h->next_free = make_number (0);
4244 h->count = make_number (0); 4238 h->count = make_number (0);
@@ -4263,7 +4257,7 @@ sweep_weak_table (h, remove_entries_p)
4263{ 4257{
4264 int bucket, n, marked; 4258 int bucket, n, marked;
4265 4259
4266 n = XVECTOR (h->index)->size & ~ARRAY_MARK_FLAG; 4260 n = ASIZE (h->index) & ~ARRAY_MARK_FLAG;
4267 marked = 0; 4261 marked = 0;
4268 4262
4269 for (bucket = 0; bucket < n; ++bucket) 4263 for (bucket = 0; bucket < n; ++bucket)
@@ -4477,13 +4471,13 @@ sxhash_vector (vec, depth)
4477 Lisp_Object vec; 4471 Lisp_Object vec;
4478 int depth; 4472 int depth;
4479{ 4473{
4480 unsigned hash = XVECTOR (vec)->size; 4474 unsigned hash = ASIZE (vec);
4481 int i, n; 4475 int i, n;
4482 4476
4483 n = min (SXHASH_MAX_LEN, XVECTOR (vec)->size); 4477 n = min (SXHASH_MAX_LEN, ASIZE (vec));
4484 for (i = 0; i < n; ++i) 4478 for (i = 0; i < n; ++i)
4485 { 4479 {
4486 unsigned hash2 = sxhash (XVECTOR (vec)->contents[i], depth + 1); 4480 unsigned hash2 = sxhash (AREF (vec, i), depth + 1);
4487 hash = SXHASH_COMBINE (hash, hash2); 4481 hash = SXHASH_COMBINE (hash, hash2);
4488 } 4482 }
4489 4483
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f7b9f8c18f9..6fd18882a74 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3684,6 +3684,9 @@ update_frame_tool_bar (f)
3684 struct image *img; 3684 struct image *img;
3685 Lisp_Object image; 3685 Lisp_Object image;
3686 GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0; 3686 GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0;
3687 GtkToolItem *ti = NULL;
3688 GtkWidget *wvbox;
3689 GList *chlist;
3687 3690
3688 if (iter) iter = g_list_next (iter); 3691 if (iter) iter = g_list_next (iter);
3689 3692
@@ -3723,22 +3726,40 @@ update_frame_tool_bar (f)
3723 if (wicon) 3726 if (wicon)
3724 gtk_widget_hide (wicon); 3727 gtk_widget_hide (wicon);
3725 else 3728 else
3729 /* Insert an empty (non-image) button */
3726 gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), 3730 gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget),
3727 gtk_tool_button_new (NULL, ""), 3731 gtk_tool_button_new (NULL, ""),
3728 i); 3732 i);
3729 continue; 3733 continue;
3730 } 3734 }
3731 3735
3732 if (! wicon) 3736 if (wicon)
3733 { 3737 {
3734 GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); 3738 /* The child of the tool bar is a button. Inside that button
3735 GtkToolItem *ti = gtk_tool_button_new (w, ""); 3739 is a vbox. Inside that vbox is the GtkImage. */
3740 wvbox = gtk_bin_get_child (GTK_BIN (wicon));
3741 chlist = gtk_container_get_children (GTK_CONTAINER (wvbox));
3742 if (chlist == NULL)
3743 /* In this case, we inserted an empty button (above) with no image */
3744 ti = GTK_TOOL_ITEM (wicon);
3745 }
3736 3746
3747 if (! wicon || ti != NULL)
3748 {
3749 GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
3737 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); 3750 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
3738 3751
3739 gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), 3752
3740 ti, 3753 if (ti == NULL)
3741 i); 3754 {
3755 ti = gtk_tool_button_new (w, "");
3756
3757 gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i);
3758 }
3759 else
3760 gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (ti), w);
3761
3762
3742 /* The EMACS_INT cast avoids a warning. */ 3763 /* The EMACS_INT cast avoids a warning. */
3743 g_signal_connect (GTK_WIDGET (ti), "clicked", 3764 g_signal_connect (GTK_WIDGET (ti), "clicked",
3744 GTK_SIGNAL_FUNC (xg_tool_bar_callback), 3765 GTK_SIGNAL_FUNC (xg_tool_bar_callback),
diff --git a/src/keyboard.c b/src/keyboard.c
index aca0acda24a..3a9f6f415db 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3784,7 +3784,8 @@ kbd_buffer_store_event_hold (event, hold_quit)
3784 if (!NILP (Vthrow_on_input) 3784 if (!NILP (Vthrow_on_input)
3785 && event->kind != FOCUS_IN_EVENT 3785 && event->kind != FOCUS_IN_EVENT
3786 && event->kind != HELP_EVENT 3786 && event->kind != HELP_EVENT
3787 && event->kind != DEICONIFY_EVENT) 3787 && event->kind != DEICONIFY_EVENT
3788 && !(event->kind == USER_SIGNAL_EVENT && event->code == 0))
3788 { 3789 {
3789 Vquit_flag = Vthrow_on_input; 3790 Vquit_flag = Vthrow_on_input;
3790 /* If we're inside a function that wants immediate quits, 3791 /* If we're inside a function that wants immediate quits,
@@ -5073,13 +5074,7 @@ Lisp_Object *scroll_bar_parts[] = {
5073}; 5074};
5074 5075
5075/* User signal events. */ 5076/* User signal events. */
5076Lisp_Object Qusr1_signal, Qusr2_signal; 5077Lisp_Object Qsignal;
5077
5078Lisp_Object *lispy_user_signals[] =
5079{
5080 &Qusr1_signal, &Qusr2_signal
5081};
5082
5083 5078
5084/* A vector, indexed by button number, giving the down-going location 5079/* A vector, indexed by button number, giving the down-going location
5085 of currently depressed buttons, both scroll bar and non-scroll bar. 5080 of currently depressed buttons, both scroll bar and non-scroll bar.
@@ -5706,7 +5701,7 @@ make_lispy_event (event)
5706 position = make_lispy_position (f, &event->x, &event->y, 5701 position = make_lispy_position (f, &event->x, &event->y,
5707 event->timestamp); 5702 event->timestamp);
5708 5703
5709 /* Set double or triple modifiers to indicate the wheel speed. */ 5704 /* Set double or triple modifiers to indicate the wheel speed. */
5710 { 5705 {
5711 /* On window-system frames, use the value of 5706 /* On window-system frames, use the value of
5712 double-click-fuzz as is. On other frames, interpret it 5707 double-click-fuzz as is. On other frames, interpret it
@@ -5760,7 +5755,7 @@ make_lispy_event (event)
5760 5755
5761 if (event->modifiers & up_modifier) 5756 if (event->modifiers & up_modifier)
5762 { 5757 {
5763 /* Emit a wheel-up event. */ 5758 /* Emit a wheel-up event. */
5764 event->modifiers &= ~up_modifier; 5759 event->modifiers &= ~up_modifier;
5765 symbol_num = 0; 5760 symbol_num = 0;
5766 } 5761 }
@@ -5775,7 +5770,7 @@ make_lispy_event (event)
5775 the up_modifier set. */ 5770 the up_modifier set. */
5776 abort (); 5771 abort ();
5777 5772
5778 /* Get the symbol we should use for the wheel event. */ 5773 /* Get the symbol we should use for the wheel event. */
5779 head = modify_event_symbol (symbol_num, 5774 head = modify_event_symbol (symbol_num,
5780 event->modifiers, 5775 event->modifiers,
5781 Qmouse_click, 5776 Qmouse_click,
@@ -5953,7 +5948,21 @@ make_lispy_event (event)
5953 5948
5954 case USER_SIGNAL_EVENT: 5949 case USER_SIGNAL_EVENT:
5955 /* A user signal. */ 5950 /* A user signal. */
5956 return *lispy_user_signals[event->code]; 5951 switch (event->code)
5952 {
5953 case 0:
5954 return Qsignal;
5955#ifdef SIGUSR1
5956 case SIGUSR1:
5957 return intern ("usr1");
5958#endif
5959#ifdef SIGUSR2
5960 case SIGUSR2:
5961 return intern ("usr2");
5962#endif
5963 default:
5964 return make_number (event->code);
5965 }
5957 5966
5958 case SAVE_SESSION_EVENT: 5967 case SAVE_SESSION_EVENT:
5959 return Qsave_session; 5968 return Qsave_session;
@@ -11025,10 +11034,8 @@ syms_of_keyboard ()
11025 staticpro (&Qmac_apple_event); 11034 staticpro (&Qmac_apple_event);
11026#endif 11035#endif
11027 11036
11028 Qusr1_signal = intern ("usr1-signal"); 11037 Qsignal = intern ("signal");
11029 staticpro (&Qusr1_signal); 11038 staticpro (&Qsignal);
11030 Qusr2_signal = intern ("usr2-signal");
11031 staticpro (&Qusr2_signal);
11032 11039
11033 Qmenu_enable = intern ("menu-enable"); 11040 Qmenu_enable = intern ("menu-enable");
11034 staticpro (&Qmenu_enable); 11041 staticpro (&Qmenu_enable);
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 419fa131692..940ff70dbda 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -128,7 +128,11 @@ Boston, MA 02110-1301, USA. */
128#else /* !__OpenBSD__ && !__FreeBSD__ */ 128#else /* !__OpenBSD__ && !__FreeBSD__ */
129 129
130#undef START_FILES 130#undef START_FILES
131#ifdef HAVE_X86_64_LIB64_DIR
131#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o 132#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
133#else
134#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
135#endif
132 136
133/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. 137/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
134 The reason is that some functions in libgcc.a call functions from libc.a, 138 The reason is that some functions in libgcc.a call functions from libc.a,
@@ -136,7 +140,11 @@ Boston, MA 02110-1301, USA. */
136 versions of ld are one-pass linkers, we need to mention -lgcc twice, 140 versions of ld are one-pass linkers, we need to mention -lgcc twice,
137 or else we risk getting unresolved externals. */ 141 or else we risk getting unresolved externals. */
138#undef LIB_STANDARD 142#undef LIB_STANDARD
143#ifdef HAVE_X86_64_LIB64_DIR
139#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o 144#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
145#else
146#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
147#endif
140 148
141#endif /* __FreeBSD__ */ 149#endif /* __FreeBSD__ */
142 150
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index 3d3e45eda81..10b43bf8246 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -44,7 +44,7 @@ Boston, MA 02110-1301, USA. */
44#define IBMR2AIX 44#define IBMR2AIX
45 45
46/* Use type int rather than a union, to represent Lisp_Object */ 46/* Use type int rather than a union, to represent Lisp_Object */
47/* This is desirable for most machines. */ 47/* This is desirable for most machines. */
48 48
49#define NO_UNION_TYPE 49#define NO_UNION_TYPE
50 50
@@ -72,7 +72,7 @@ Boston, MA 02110-1301, USA. */
72 72
73/* The data segment in this machine always starts at address 0x20000000. 73/* The data segment in this machine always starts at address 0x20000000.
74 An address of data cannot be stored correctly in a Lisp object; 74 An address of data cannot be stored correctly in a Lisp object;
75 we always lose the high bits. We must tell XPNTR to add them back. */ 75 we always lose the high bits. We must tell XPNTR to add them back. */
76 76
77#ifndef USG5_4 77#ifndef USG5_4
78#define DATA_SEG_BITS 0x20000000 78#define DATA_SEG_BITS 0x20000000
@@ -86,7 +86,7 @@ Boston, MA 02110-1301, USA. */
86#define PURE_SEG_BITS 0x30000000 86#define PURE_SEG_BITS 0x30000000
87 87
88/* Use shared memory. */ 88/* Use shared memory. */
89/* This is turned off because it does not always work. See etc/AIX.DUMP. */ 89/* This is turned off because it does not always work. See etc/AIX.DUMP. */
90/* #define HAVE_SHM */ 90/* #define HAVE_SHM */
91#define SHMKEY 5305035 /* used for shared memory code segments */ 91#define SHMKEY 5305035 /* used for shared memory code segments */
92#endif /* CANNOT_DUMP */ 92#endif /* CANNOT_DUMP */
diff --git a/src/m/pfa50.h b/src/m/pfa50.h
index 85d281073f1..0b1511fd8e7 100644
--- a/src/m/pfa50.h
+++ b/src/m/pfa50.h
@@ -50,7 +50,7 @@ Boston, MA 02110-1301, USA. */
50#define NO_REMAP 50#define NO_REMAP
51 51
52/* Define TEXT_START_ADDR if your linker don't set execute point to _start. 52/* Define TEXT_START_ADDR if your linker don't set execute point to _start.
53 If it needed, temacs always CORE-DUMP. */ 53 If it needed, temacs always CORE-DUMP. */
54 54
55#define TEXT_START_ADDR __start 55#define TEXT_START_ADDR __start
56 56
diff --git a/src/msdos.c b/src/msdos.c
index d42e81d9d20..4a39ce75ae1 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -2639,7 +2639,7 @@ check_x (void)
2639#define Ctrl 0x0200 /* ctrl scan-code */ 2639#define Ctrl 0x0200 /* ctrl scan-code */
2640#define Shift 0x0400 /* shift scan-code */ 2640#define Shift 0x0400 /* shift scan-code */
2641 2641
2642static int extended_kbd; /* 101 (102) keyboard present. */ 2642static int extended_kbd; /* 101 (102) keyboard present. */
2643 2643
2644struct kbd_translate { 2644struct kbd_translate {
2645 unsigned char sc; 2645 unsigned char sc;
diff --git a/src/process.c b/src/process.c
index 7042077471c..db7fcb8b201 100644
--- a/src/process.c
+++ b/src/process.c
@@ -149,7 +149,8 @@ Boston, MA 02110-1301, USA. */
149#include "atimer.h" 149#include "atimer.h"
150 150
151Lisp_Object Qprocessp; 151Lisp_Object Qprocessp;
152Lisp_Object Qrun, Qstop, Qsignal; 152Lisp_Object Qrun, Qstop;
153extern Lisp_Object Qsignal;
153Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; 154Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten;
154Lisp_Object Qlocal, Qipv4, Qdatagram; 155Lisp_Object Qlocal, Qipv4, Qdatagram;
155#ifdef AF_INET6 156#ifdef AF_INET6
@@ -6127,8 +6128,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6127 6128
6128 got_it: 6129 got_it:
6129 6130
6130#define handle_signal(NAME, VALUE) \ 6131#define parse_signal(NAME, VALUE) \
6131 else if (!strcmp (name, NAME)) \ 6132 else if (!strcasecmp (name, NAME)) \
6132 XSETINT (sigcode, VALUE) 6133 XSETINT (sigcode, VALUE)
6133 6134
6134 if (INTEGERP (sigcode)) 6135 if (INTEGERP (sigcode))
@@ -6140,106 +6141,106 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6140 CHECK_SYMBOL (sigcode); 6141 CHECK_SYMBOL (sigcode);
6141 name = SDATA (SYMBOL_NAME (sigcode)); 6142 name = SDATA (SYMBOL_NAME (sigcode));
6142 6143
6143 if (!strncmp(name, "SIG", 3)) 6144 if (!strncasecmp(name, "sig", 3))
6144 name += 3; 6145 name += 3;
6145 6146
6146 if (0) 6147 if (0)
6147 ; 6148 ;
6149#ifdef SIGUSR1
6150 parse_signal ("usr1", SIGUSR1);
6151#endif
6152#ifdef SIGUSR2
6153 parse_signal ("usr2", SIGUSR2);
6154#endif
6155#ifdef SIGTERM
6156 parse_signal ("term", SIGTERM);
6157#endif
6148#ifdef SIGHUP 6158#ifdef SIGHUP
6149 handle_signal ("HUP", SIGHUP); 6159 parse_signal ("hup", SIGHUP);
6150#endif 6160#endif
6151#ifdef SIGINT 6161#ifdef SIGINT
6152 handle_signal ("INT", SIGINT); 6162 parse_signal ("int", SIGINT);
6153#endif 6163#endif
6154#ifdef SIGQUIT 6164#ifdef SIGQUIT
6155 handle_signal ("QUIT", SIGQUIT); 6165 parse_signal ("quit", SIGQUIT);
6156#endif 6166#endif
6157#ifdef SIGILL 6167#ifdef SIGILL
6158 handle_signal ("ILL", SIGILL); 6168 parse_signal ("ill", SIGILL);
6159#endif 6169#endif
6160#ifdef SIGABRT 6170#ifdef SIGABRT
6161 handle_signal ("ABRT", SIGABRT); 6171 parse_signal ("abrt", SIGABRT);
6162#endif 6172#endif
6163#ifdef SIGEMT 6173#ifdef SIGEMT
6164 handle_signal ("EMT", SIGEMT); 6174 parse_signal ("emt", SIGEMT);
6165#endif 6175#endif
6166#ifdef SIGKILL 6176#ifdef SIGKILL
6167 handle_signal ("KILL", SIGKILL); 6177 parse_signal ("kill", SIGKILL);
6168#endif 6178#endif
6169#ifdef SIGFPE 6179#ifdef SIGFPE
6170 handle_signal ("FPE", SIGFPE); 6180 parse_signal ("fpe", SIGFPE);
6171#endif 6181#endif
6172#ifdef SIGBUS 6182#ifdef SIGBUS
6173 handle_signal ("BUS", SIGBUS); 6183 parse_signal ("bus", SIGBUS);
6174#endif 6184#endif
6175#ifdef SIGSEGV 6185#ifdef SIGSEGV
6176 handle_signal ("SEGV", SIGSEGV); 6186 parse_signal ("segv", SIGSEGV);
6177#endif 6187#endif
6178#ifdef SIGSYS 6188#ifdef SIGSYS
6179 handle_signal ("SYS", SIGSYS); 6189 parse_signal ("sys", SIGSYS);
6180#endif 6190#endif
6181#ifdef SIGPIPE 6191#ifdef SIGPIPE
6182 handle_signal ("PIPE", SIGPIPE); 6192 parse_signal ("pipe", SIGPIPE);
6183#endif 6193#endif
6184#ifdef SIGALRM 6194#ifdef SIGALRM
6185 handle_signal ("ALRM", SIGALRM); 6195 parse_signal ("alrm", SIGALRM);
6186#endif
6187#ifdef SIGTERM
6188 handle_signal ("TERM", SIGTERM);
6189#endif 6196#endif
6190#ifdef SIGURG 6197#ifdef SIGURG
6191 handle_signal ("URG", SIGURG); 6198 parse_signal ("urg", SIGURG);
6192#endif 6199#endif
6193#ifdef SIGSTOP 6200#ifdef SIGSTOP
6194 handle_signal ("STOP", SIGSTOP); 6201 parse_signal ("stop", SIGSTOP);
6195#endif 6202#endif
6196#ifdef SIGTSTP 6203#ifdef SIGTSTP
6197 handle_signal ("TSTP", SIGTSTP); 6204 parse_signal ("tstp", SIGTSTP);
6198#endif 6205#endif
6199#ifdef SIGCONT 6206#ifdef SIGCONT
6200 handle_signal ("CONT", SIGCONT); 6207 parse_signal ("cont", SIGCONT);
6201#endif 6208#endif
6202#ifdef SIGCHLD 6209#ifdef SIGCHLD
6203 handle_signal ("CHLD", SIGCHLD); 6210 parse_signal ("chld", SIGCHLD);
6204#endif 6211#endif
6205#ifdef SIGTTIN 6212#ifdef SIGTTIN
6206 handle_signal ("TTIN", SIGTTIN); 6213 parse_signal ("ttin", SIGTTIN);
6207#endif 6214#endif
6208#ifdef SIGTTOU 6215#ifdef SIGTTOU
6209 handle_signal ("TTOU", SIGTTOU); 6216 parse_signal ("ttou", SIGTTOU);
6210#endif 6217#endif
6211#ifdef SIGIO 6218#ifdef SIGIO
6212 handle_signal ("IO", SIGIO); 6219 parse_signal ("io", SIGIO);
6213#endif 6220#endif
6214#ifdef SIGXCPU 6221#ifdef SIGXCPU
6215 handle_signal ("XCPU", SIGXCPU); 6222 parse_signal ("xcpu", SIGXCPU);
6216#endif 6223#endif
6217#ifdef SIGXFSZ 6224#ifdef SIGXFSZ
6218 handle_signal ("XFSZ", SIGXFSZ); 6225 parse_signal ("xfsz", SIGXFSZ);
6219#endif 6226#endif
6220#ifdef SIGVTALRM 6227#ifdef SIGVTALRM
6221 handle_signal ("VTALRM", SIGVTALRM); 6228 parse_signal ("vtalrm", SIGVTALRM);
6222#endif 6229#endif
6223#ifdef SIGPROF 6230#ifdef SIGPROF
6224 handle_signal ("PROF", SIGPROF); 6231 parse_signal ("prof", SIGPROF);
6225#endif 6232#endif
6226#ifdef SIGWINCH 6233#ifdef SIGWINCH
6227 handle_signal ("WINCH", SIGWINCH); 6234 parse_signal ("winch", SIGWINCH);
6228#endif 6235#endif
6229#ifdef SIGINFO 6236#ifdef SIGINFO
6230 handle_signal ("INFO", SIGINFO); 6237 parse_signal ("info", SIGINFO);
6231#endif
6232#ifdef SIGUSR1
6233 handle_signal ("USR1", SIGUSR1);
6234#endif
6235#ifdef SIGUSR2
6236 handle_signal ("USR2", SIGUSR2);
6237#endif 6238#endif
6238 else 6239 else
6239 error ("Undefined signal name %s", name); 6240 error ("Undefined signal name %s", name);
6240 } 6241 }
6241 6242
6242#undef handle_signal 6243#undef parse_signal
6243 6244
6244 return make_number (kill (pid, XINT (sigcode))); 6245 return make_number (kill (pid, XINT (sigcode)));
6245} 6246}
@@ -6985,8 +6986,6 @@ syms_of_process ()
6985 staticpro (&Qrun); 6986 staticpro (&Qrun);
6986 Qstop = intern ("stop"); 6987 Qstop = intern ("stop");
6987 staticpro (&Qstop); 6988 staticpro (&Qstop);
6988 Qsignal = intern ("signal");
6989 staticpro (&Qsignal);
6990 6989
6991 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it 6990 /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it
6992 here again. 6991 here again.
diff --git a/src/regex.c b/src/regex.c
index 2eca58c23e8..b97ee7943fd 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -12,13 +12,13 @@
12 12
13 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 USA. */ 21 USA. */
22 22
23/* TODO: 23/* TODO:
24 - structure the opcode space into opcode+flag. 24 - structure the opcode space into opcode+flag.
@@ -139,7 +139,7 @@
139# endif 139# endif
140# define free xfree 140# define free xfree
141 141
142/* Converts the pointer to the char to BEG-based offset from the start. */ 142/* Converts the pointer to the char to BEG-based offset from the start. */
143# define PTR_TO_OFFSET(d) POS_AS_IN_BUFFER (POINTER_TO_OFFSET (d)) 143# define PTR_TO_OFFSET(d) POS_AS_IN_BUFFER (POINTER_TO_OFFSET (d))
144# define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object))) 144# define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object)))
145 145
@@ -565,7 +565,7 @@ init_syntax_once ()
565 565
566# define REGEX_REALLOCATE_STACK(source, osize, nsize) \ 566# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
567 REGEX_REALLOCATE (source, osize, nsize) 567 REGEX_REALLOCATE (source, osize, nsize)
568/* No need to explicitly free anything. */ 568/* No need to explicitly free anything. */
569# define REGEX_FREE_STACK(arg) ((void)0) 569# define REGEX_FREE_STACK(arg) ((void)0)
570 570
571# endif /* not REGEX_MALLOC */ 571# endif /* not REGEX_MALLOC */
@@ -679,7 +679,7 @@ typedef enum
679 jump, 679 jump,
680 680
681 /* Followed by two-byte relative address of place to resume at 681 /* Followed by two-byte relative address of place to resume at
682 in case of failure. */ 682 in case of failure. */
683 on_failure_jump, 683 on_failure_jump,
684 684
685 /* Like on_failure_jump, but pushes a placeholder instead of the 685 /* Like on_failure_jump, but pushes a placeholder instead of the
@@ -716,7 +716,7 @@ typedef enum
716 jump_n, 716 jump_n,
717 717
718 /* Set the following two-byte relative address to the 718 /* Set the following two-byte relative address to the
719 subsequent two-byte number. The address *includes* the two 719 subsequent two-byte number. The address *includes* the two
720 bytes of number. */ 720 bytes of number. */
721 set_number_at, 721 set_number_at,
722 722
@@ -724,7 +724,7 @@ typedef enum
724 wordend, /* Succeeds if at word end. */ 724 wordend, /* Succeeds if at word end. */
725 725
726 wordbound, /* Succeeds if at a word boundary. */ 726 wordbound, /* Succeeds if at a word boundary. */
727 notwordbound, /* Succeeds if not at a word boundary. */ 727 notwordbound, /* Succeeds if not at a word boundary. */
728 728
729 symbeg, /* Succeeds if at symbol beginning. */ 729 symbeg, /* Succeeds if at symbol beginning. */
730 symend, /* Succeeds if at symbol end. */ 730 symend, /* Succeeds if at symbol end. */
@@ -742,8 +742,8 @@ typedef enum
742 after_dot, /* Succeeds if after point. */ 742 after_dot, /* Succeeds if after point. */
743 743
744 /* Matches any character whose category-set contains the specified 744 /* Matches any character whose category-set contains the specified
745 category. The operator is followed by a byte which contains a 745 category. The operator is followed by a byte which contains a
746 category code (mnemonic ASCII character). */ 746 category code (mnemonic ASCII character). */
747 categoryspec, 747 categoryspec,
748 748
749 /* Matches any character whose category-set does not contain the 749 /* Matches any character whose category-set does not contain the
@@ -832,7 +832,7 @@ extract_number_and_incr (destination, source)
832 832
833/* Store a multibyte character in three contiguous bytes starting 833/* Store a multibyte character in three contiguous bytes starting
834 DESTINATION, and increment DESTINATION to the byte after where the 834 DESTINATION, and increment DESTINATION to the byte after where the
835 character is stored. Therefore, DESTINATION must be an lvalue. */ 835 character is stored. Therefore, DESTINATION must be an lvalue. */
836 836
837#define STORE_CHARACTER_AND_INCR(destination, character) \ 837#define STORE_CHARACTER_AND_INCR(destination, character) \
838 do { \ 838 do { \
@@ -843,7 +843,7 @@ extract_number_and_incr (destination, source)
843 } while (0) 843 } while (0)
844 844
845/* Put into DESTINATION a character stored in three contiguous bytes 845/* Put into DESTINATION a character stored in three contiguous bytes
846 starting at SOURCE. */ 846 starting at SOURCE. */
847 847
848#define EXTRACT_CHARACTER(destination, source) \ 848#define EXTRACT_CHARACTER(destination, source) \
849 do { \ 849 do { \
@@ -879,13 +879,13 @@ extract_number_and_incr (destination, source)
879 && (p)[2 + (c) / BYTEWIDTH] & (1 << ((c) % BYTEWIDTH))) 879 && (p)[2 + (c) / BYTEWIDTH] & (1 << ((c) % BYTEWIDTH)))
880 880
881/* Return the address of end of RANGE_TABLE. COUNT is number of 881/* Return the address of end of RANGE_TABLE. COUNT is number of
882 ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2' 882 ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2'
883 is start of range and end of range. `* 3' is size of each start 883 is start of range and end of range. `* 3' is size of each start
884 and end. */ 884 and end. */
885#define CHARSET_RANGE_TABLE_END(range_table, count) \ 885#define CHARSET_RANGE_TABLE_END(range_table, count) \
886 ((range_table) + (count) * 2 * 3) 886 ((range_table) + (count) * 2 * 3)
887 887
888/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in. 888/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in.
889 COUNT is number of ranges in RANGE_TABLE. */ 889 COUNT is number of ranges in RANGE_TABLE. */
890#define CHARSET_LOOKUP_RANGE_TABLE_RAW(not, c, range_table, count) \ 890#define CHARSET_LOOKUP_RANGE_TABLE_RAW(not, c, range_table, count) \
891 do \ 891 do \
@@ -1692,7 +1692,7 @@ do { \
1692 REGSTART, REGEND -- arrays of string positions. 1692 REGSTART, REGEND -- arrays of string positions.
1693 1693
1694 Also assumes the variables `fail_stack' and (if debugging), `bufp', 1694 Also assumes the variables `fail_stack' and (if debugging), `bufp',
1695 `pend', `string1', `size1', `string2', and `size2'. */ 1695 `pend', `string1', `size1', `string2', and `size2'. */
1696 1696
1697#define POP_FAILURE_POINT(str, pat) \ 1697#define POP_FAILURE_POINT(str, pat) \
1698do { \ 1698do { \
@@ -1961,7 +1961,7 @@ struct range_table_work_area
1961{ 1961{
1962 int *table; /* actual work area. */ 1962 int *table; /* actual work area. */
1963 int allocated; /* allocated size for work area in bytes. */ 1963 int allocated; /* allocated size for work area in bytes. */
1964 int used; /* actually used size in words. */ 1964 int used; /* actually used size in words. */
1965 int bits; /* flag to record character classes */ 1965 int bits; /* flag to record character classes */
1966}; 1966};
1967 1967
@@ -2000,7 +2000,7 @@ struct range_table_work_area
2000 (work_area).table[(work_area).used++] = (range_end); \ 2000 (work_area).table[(work_area).used++] = (range_end); \
2001 } while (0) 2001 } while (0)
2002 2002
2003/* Free allocated memory for WORK_AREA. */ 2003/* Free allocated memory for WORK_AREA. */
2004#define FREE_RANGE_TABLE_WORK_AREA(work_area) \ 2004#define FREE_RANGE_TABLE_WORK_AREA(work_area) \
2005 do { \ 2005 do { \
2006 if ((work_area).table) \ 2006 if ((work_area).table) \
@@ -2534,7 +2534,7 @@ regex_compile (pattern, size, syntax, bufp)
2534 re_char *beg_interval; 2534 re_char *beg_interval;
2535 2535
2536 /* Address of the place where a forward jump should go to the end of 2536 /* Address of the place where a forward jump should go to the end of
2537 the containing expression. Each alternative of an `or' -- except the 2537 the containing expression. Each alternative of an `or' -- except the
2538 last -- ends with a forward jump of this sort. */ 2538 last -- ends with a forward jump of this sort. */
2539 unsigned char *fixup_alt_jump = 0; 2539 unsigned char *fixup_alt_jump = 0;
2540 2540
@@ -2609,11 +2609,11 @@ regex_compile (pattern, size, syntax, bufp)
2609 if (bufp->buffer) 2609 if (bufp->buffer)
2610 { /* If zero allocated, but buffer is non-null, try to realloc 2610 { /* If zero allocated, but buffer is non-null, try to realloc
2611 enough space. This loses if buffer's address is bogus, but 2611 enough space. This loses if buffer's address is bogus, but
2612 that is the user's responsibility. */ 2612 that is the user's responsibility. */
2613 RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char); 2613 RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
2614 } 2614 }
2615 else 2615 else
2616 { /* Caller did not allocate a buffer. Do it for them. */ 2616 { /* Caller did not allocate a buffer. Do it for them. */
2617 bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char); 2617 bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
2618 } 2618 }
2619 if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE); 2619 if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE);
@@ -2677,15 +2677,15 @@ regex_compile (pattern, size, syntax, bufp)
2677 p = pattern = whitespace_regexp; 2677 p = pattern = whitespace_regexp;
2678 pend = p + strlen (p); 2678 pend = p + strlen (p);
2679 break; 2679 break;
2680 } 2680 }
2681 2681
2682 case '^': 2682 case '^':
2683 { 2683 {
2684 if ( /* If at start of pattern, it's an operator. */ 2684 if ( /* If at start of pattern, it's an operator. */
2685 p == pattern + 1 2685 p == pattern + 1
2686 /* If context independent, it's an operator. */ 2686 /* If context independent, it's an operator. */
2687 || syntax & RE_CONTEXT_INDEP_ANCHORS 2687 || syntax & RE_CONTEXT_INDEP_ANCHORS
2688 /* Otherwise, depends on what's come before. */ 2688 /* Otherwise, depends on what's come before. */
2689 || at_begline_loc_p (pattern, p, syntax)) 2689 || at_begline_loc_p (pattern, p, syntax))
2690 BUF_PUSH ((syntax & RE_NO_NEWLINE_ANCHOR) ? begbuf : begline); 2690 BUF_PUSH ((syntax & RE_NO_NEWLINE_ANCHOR) ? begbuf : begline);
2691 else 2691 else
@@ -2698,7 +2698,7 @@ regex_compile (pattern, size, syntax, bufp)
2698 { 2698 {
2699 if ( /* If at end of pattern, it's an operator. */ 2699 if ( /* If at end of pattern, it's an operator. */
2700 p == pend 2700 p == pend
2701 /* If context independent, it's an operator. */ 2701 /* If context independent, it's an operator. */
2702 || syntax & RE_CONTEXT_INDEP_ANCHORS 2702 || syntax & RE_CONTEXT_INDEP_ANCHORS
2703 /* Otherwise, depends on what's next. */ 2703 /* Otherwise, depends on what's next. */
2704 || at_endline_loc_p (p, pend, syntax)) 2704 || at_endline_loc_p (p, pend, syntax))
@@ -2726,14 +2726,14 @@ regex_compile (pattern, size, syntax, bufp)
2726 } 2726 }
2727 2727
2728 { 2728 {
2729 /* 1 means zero (many) matches is allowed. */ 2729 /* 1 means zero (many) matches is allowed. */
2730 boolean zero_times_ok = 0, many_times_ok = 0; 2730 boolean zero_times_ok = 0, many_times_ok = 0;
2731 boolean greedy = 1; 2731 boolean greedy = 1;
2732 2732
2733 /* If there is a sequence of repetition chars, collapse it 2733 /* If there is a sequence of repetition chars, collapse it
2734 down to just one (the right one). We can't combine 2734 down to just one (the right one). We can't combine
2735 interval operators with these because of, e.g., `a{2}*', 2735 interval operators with these because of, e.g., `a{2}*',
2736 which should only match an even number of `a's. */ 2736 which should only match an even number of `a's. */
2737 2737
2738 for (;;) 2738 for (;;)
2739 { 2739 {
@@ -2773,7 +2773,7 @@ regex_compile (pattern, size, syntax, bufp)
2773 break; 2773 break;
2774 2774
2775 /* Now we know whether or not zero matches is allowed 2775 /* Now we know whether or not zero matches is allowed
2776 and also whether or not two or more matches is allowed. */ 2776 and also whether or not two or more matches is allowed. */
2777 if (greedy) 2777 if (greedy)
2778 { 2778 {
2779 if (many_times_ok) 2779 if (many_times_ok)
@@ -2880,7 +2880,7 @@ regex_compile (pattern, size, syntax, bufp)
2880 laststart = b; 2880 laststart = b;
2881 2881
2882 /* We test `*p == '^' twice, instead of using an if 2882 /* We test `*p == '^' twice, instead of using an if
2883 statement, so we only need one BUF_PUSH. */ 2883 statement, so we only need one BUF_PUSH. */
2884 BUF_PUSH (*p == '^' ? charset_not : charset); 2884 BUF_PUSH (*p == '^' ? charset_not : charset);
2885 if (*p == '^') 2885 if (*p == '^')
2886 p++; 2886 p++;
@@ -2888,7 +2888,7 @@ regex_compile (pattern, size, syntax, bufp)
2888 /* Remember the first position in the bracket expression. */ 2888 /* Remember the first position in the bracket expression. */
2889 p1 = p; 2889 p1 = p;
2890 2890
2891 /* Push the number of bytes in the bitmap. */ 2891 /* Push the number of bytes in the bitmap. */
2892 BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH); 2892 BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
2893 2893
2894 /* Clear the whole map. */ 2894 /* Clear the whole map. */
@@ -2899,7 +2899,7 @@ regex_compile (pattern, size, syntax, bufp)
2899 && (syntax & RE_HAT_LISTS_NOT_NEWLINE)) 2899 && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
2900 SET_LIST_BIT ('\n'); 2900 SET_LIST_BIT ('\n');
2901 2901
2902 /* Read in characters and ranges, setting map bits. */ 2902 /* Read in characters and ranges, setting map bits. */
2903 for (;;) 2903 for (;;)
2904 { 2904 {
2905 boolean escaped_char = false; 2905 boolean escaped_char = false;
@@ -2923,7 +2923,7 @@ regex_compile (pattern, size, syntax, bufp)
2923 } 2923 }
2924 else 2924 else
2925 { 2925 {
2926 /* Could be the end of the bracket expression. If it's 2926 /* Could be the end of the bracket expression. If it's
2927 not (i.e., when the bracket expression is `[]' so 2927 not (i.e., when the bracket expression is `[]' so
2928 far), the ']' character bit gets set way below. */ 2928 far), the ']' character bit gets set way below. */
2929 if (c == ']' && p2 != p1) 2929 if (c == ']' && p2 != p1)
@@ -2936,7 +2936,7 @@ regex_compile (pattern, size, syntax, bufp)
2936 if (!escaped_char && 2936 if (!escaped_char &&
2937 syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') 2937 syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
2938 { 2938 {
2939 /* Leave room for the null. */ 2939 /* Leave room for the null. */
2940 unsigned char str[CHAR_CLASS_MAX_LENGTH + 1]; 2940 unsigned char str[CHAR_CLASS_MAX_LENGTH + 1];
2941 const unsigned char *class_beg; 2941 const unsigned char *class_beg;
2942 2942
@@ -3034,7 +3034,7 @@ regex_compile (pattern, size, syntax, bufp)
3034 3034
3035 /* Because the `:' may starts the range, we 3035 /* Because the `:' may starts the range, we
3036 can't simply set bit and repeat the loop. 3036 can't simply set bit and repeat the loop.
3037 Instead, just set it to C and handle below. */ 3037 Instead, just set it to C and handle below. */
3038 c = ':'; 3038 c = ':';
3039 } 3039 }
3040 } 3040 }
@@ -3095,7 +3095,7 @@ regex_compile (pattern, size, syntax, bufp)
3095 } 3095 }
3096 3096
3097 /* Discard any (non)matching list bytes that are all 0 at the 3097 /* Discard any (non)matching list bytes that are all 0 at the
3098 end of the map. Decrease the map-length byte too. */ 3098 end of the map. Decrease the map-length byte too. */
3099 while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) 3099 while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
3100 b[-1]--; 3100 b[-1]--;
3101 b += b[-1]; 3101 b += b[-1];
@@ -3214,7 +3214,7 @@ regex_compile (pattern, size, syntax, bufp)
3214 } 3214 }
3215 3215
3216 /* These are the values to restore when we hit end of this 3216 /* These are the values to restore when we hit end of this
3217 group. They are all relative offsets, so that if the 3217 group. They are all relative offsets, so that if the
3218 whole pattern moves because of realloc, they will still 3218 whole pattern moves because of realloc, they will still
3219 be valid. */ 3219 be valid. */
3220 COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; 3220 COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
@@ -3270,7 +3270,7 @@ regex_compile (pattern, size, syntax, bufp)
3270 { 3270 {
3271 /* We don't just want to restore into `regnum', because 3271 /* We don't just want to restore into `regnum', because
3272 later groups should continue to be numbered higher, 3272 later groups should continue to be numbered higher,
3273 as in `(ab)c(de)' -- the second group is #2. */ 3273 as in `(ab)c(de)' -- the second group is #2. */
3274 regnum_t this_group_regnum; 3274 regnum_t this_group_regnum;
3275 3275
3276 compile_stack.avail--; 3276 compile_stack.avail--;
@@ -3287,7 +3287,7 @@ regex_compile (pattern, size, syntax, bufp)
3287 pending_exact = 0; 3287 pending_exact = 0;
3288 3288
3289 /* We're at the end of the group, so now we know how many 3289 /* We're at the end of the group, so now we know how many
3290 groups were inside this one. */ 3290 groups were inside this one. */
3291 if (this_group_regnum <= MAX_REGNUM && this_group_regnum > 0) 3291 if (this_group_regnum <= MAX_REGNUM && this_group_regnum > 0)
3292 BUF_PUSH_2 (stop_memory, this_group_regnum); 3292 BUF_PUSH_2 (stop_memory, this_group_regnum);
3293 } 3293 }
@@ -3302,7 +3302,7 @@ regex_compile (pattern, size, syntax, bufp)
3302 goto normal_char; 3302 goto normal_char;
3303 3303
3304 /* Insert before the previous alternative a jump which 3304 /* Insert before the previous alternative a jump which
3305 jumps to this alternative if the former fails. */ 3305 jumps to this alternative if the former fails. */
3306 GET_BUFFER_SPACE (3); 3306 GET_BUFFER_SPACE (3);
3307 INSERT_JUMP (on_failure_jump, begalt, b + 6); 3307 INSERT_JUMP (on_failure_jump, begalt, b + 6);
3308 pending_exact = 0; 3308 pending_exact = 0;
@@ -3439,7 +3439,7 @@ regex_compile (pattern, size, syntax, bufp)
3439 b += 5; 3439 b += 5;
3440 3440
3441 /* Code to initialize the lower bound. Insert 3441 /* Code to initialize the lower bound. Insert
3442 before the `succeed_n'. The `5' is the last two 3442 before the `succeed_n'. The `5' is the last two
3443 bytes of this `set_number_at', plus 3 bytes of 3443 bytes of this `set_number_at', plus 3 bytes of
3444 the following `succeed_n'. */ 3444 the following `succeed_n'. */
3445 insert_op2 (set_number_at, laststart, 5, lower_bound, b); 3445 insert_op2 (set_number_at, laststart, 5, lower_bound, b);
@@ -3509,7 +3509,7 @@ regex_compile (pattern, size, syntax, bufp)
3509 3509
3510#ifdef emacs 3510#ifdef emacs
3511 /* There is no way to specify the before_dot and after_dot 3511 /* There is no way to specify the before_dot and after_dot
3512 operators. rms says this is ok. --karl */ 3512 operators. rms says this is ok. --karl */
3513 case '=': 3513 case '=':
3514 BUF_PUSH (at_dot); 3514 BUF_PUSH (at_dot);
3515 break; 3515 break;
@@ -3654,7 +3654,7 @@ regex_compile (pattern, size, syntax, bufp)
3654 /* We have only one byte following the exactn for the count. */ 3654 /* We have only one byte following the exactn for the count. */
3655 || *pending_exact >= (1 << BYTEWIDTH) - MAX_MULTIBYTE_LENGTH 3655 || *pending_exact >= (1 << BYTEWIDTH) - MAX_MULTIBYTE_LENGTH
3656 3656
3657 /* If followed by a repetition operator. */ 3657 /* If followed by a repetition operator. */
3658 || (p != pend && (*p == '*' || *p == '^')) 3658 || (p != pend && (*p == '*' || *p == '^'))
3659 || ((syntax & RE_BK_PLUS_QM) 3659 || ((syntax & RE_BK_PLUS_QM)
3660 ? p + 1 < pend && *p == '\\' && (p[1] == '+' || p[1] == '?') 3660 ? p + 1 < pend && *p == '\\' && (p[1] == '+' || p[1] == '?')
@@ -3759,7 +3759,7 @@ regex_compile (pattern, size, syntax, bufp)
3759 3759
3760/* Subroutines for `regex_compile'. */ 3760/* Subroutines for `regex_compile'. */
3761 3761
3762/* Store OP at LOC followed by two-byte integer parameter ARG. */ 3762/* Store OP at LOC followed by two-byte integer parameter ARG. */
3763 3763
3764static void 3764static void
3765store_op1 (op, loc, arg) 3765store_op1 (op, loc, arg)
@@ -3911,7 +3911,7 @@ analyse_first (p, pend, fastmap, multibyte)
3911 boolean not; 3911 boolean not;
3912 3912
3913 /* If all elements for base leading-codes in fastmap is set, this 3913 /* If all elements for base leading-codes in fastmap is set, this
3914 flag is set true. */ 3914 flag is set true. */
3915 boolean match_any_multibyte_characters = false; 3915 boolean match_any_multibyte_characters = false;
3916 3916
3917 assert (p); 3917 assert (p);
@@ -3959,7 +3959,7 @@ analyse_first (p, pend, fastmap, multibyte)
3959 3959
3960 3960
3961 /* Following are the cases which match a character. These end 3961 /* Following are the cases which match a character. These end
3962 with `break'. */ 3962 with `break'. */
3963 3963
3964 case exactn: 3964 case exactn:
3965 if (fastmap) 3965 if (fastmap)
@@ -4180,7 +4180,7 @@ analyse_first (p, pend, fastmap, multibyte)
4180 4180
4181 /* Getting here means we have found the possible starting 4181 /* Getting here means we have found the possible starting
4182 characters for one path of the pattern -- and that the empty 4182 characters for one path of the pattern -- and that the empty
4183 string does not match. We need not follow this path further. */ 4183 string does not match. We need not follow this path further. */
4184 return 0; 4184 return 0;
4185 } /* while p */ 4185 } /* while p */
4186 4186
@@ -4215,7 +4215,7 @@ re_compile_fastmap (bufp)
4215 4215
4216 assert (fastmap && bufp->buffer); 4216 assert (fastmap && bufp->buffer);
4217 4217
4218 bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ 4218 bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
4219 bufp->fastmap_accurate = 1; /* It will be when we're done. */ 4219 bufp->fastmap_accurate = 1; /* It will be when we're done. */
4220 4220
4221 analysis = analyse_first (bufp->buffer, bufp->buffer + bufp->used, 4221 analysis = analyse_first (bufp->buffer, bufp->buffer + bufp->used,
@@ -4260,7 +4260,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
4260} 4260}
4261WEAK_ALIAS (__re_set_registers, re_set_registers) 4261WEAK_ALIAS (__re_set_registers, re_set_registers)
4262 4262
4263/* Searching routines. */ 4263/* Searching routines. */
4264 4264
4265/* Like re_search_2, below, but only one string is specified, and 4265/* Like re_search_2, below, but only one string is specified, and
4266 doesn't let you say where to stop matching. */ 4266 doesn't let you say where to stop matching. */
@@ -4399,7 +4399,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
4399 /* If a fastmap is supplied, skip quickly over characters that 4399 /* If a fastmap is supplied, skip quickly over characters that
4400 cannot be the start of a match. If the pattern can match the 4400 cannot be the start of a match. If the pattern can match the
4401 null string, however, we don't need to skip characters; we want 4401 null string, however, we don't need to skip characters; we want
4402 the first null string. */ 4402 the first null string. */
4403 if (fastmap && startpos < total_size && !bufp->can_be_null) 4403 if (fastmap && startpos < total_size && !bufp->can_be_null)
4404 { 4404 {
4405 register re_char *d; 4405 register re_char *d;
@@ -4407,7 +4407,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
4407 4407
4408 d = POS_ADDR_VSTRING (startpos); 4408 d = POS_ADDR_VSTRING (startpos);
4409 4409
4410 if (range > 0) /* Searching forwards. */ 4410 if (range > 0) /* Searching forwards. */
4411 { 4411 {
4412 register int lim = 0; 4412 register int lim = 0;
4413 int irange = range; 4413 int irange = range;
@@ -4469,7 +4469,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
4469 } 4469 }
4470 startpos += irange - range; 4470 startpos += irange - range;
4471 } 4471 }
4472 else /* Searching backwards. */ 4472 else /* Searching backwards. */
4473 { 4473 {
4474 int room = (startpos >= size1 4474 int room = (startpos >= size1
4475 ? size2 + size1 - startpos 4475 ? size2 + size1 - startpos
@@ -4598,7 +4598,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
4598 } \ 4598 } \
4599 4599
4600/* Test if at very beginning or at very end of the virtual concatenation 4600/* Test if at very beginning or at very end of the virtual concatenation
4601 of `string1' and `string2'. If only one string, it's `string2'. */ 4601 of `string1' and `string2'. If only one string, it's `string2'. */
4602#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) 4602#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
4603#define AT_STRINGS_END(d) ((d) == end2) 4603#define AT_STRINGS_END(d) ((d) == end2)
4604 4604
@@ -4619,7 +4619,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
4619 4619
4620 The DEC Alpha C compiler 3.x generates incorrect code for the 4620 The DEC Alpha C compiler 3.x generates incorrect code for the
4621 test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of 4621 test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
4622 AT_WORD_BOUNDARY, so this code is disabled. Expanding the 4622 AT_WORD_BOUNDARY, so this code is disabled. Expanding the
4623 macro and introducing temporary variables works around the bug. */ 4623 macro and introducing temporary variables works around the bug. */
4624 4624
4625#if 0 4625#if 0
@@ -4821,7 +4821,7 @@ mutually_exclusive_p (bufp, p1, p2)
4821 { 4821 {
4822 /* Now, we are sure that P2 has no range table. 4822 /* Now, we are sure that P2 has no range table.
4823 So, for the size of bitmap in P2, `p2[1]' is 4823 So, for the size of bitmap in P2, `p2[1]' is
4824 enough. But P1 may have range table, so the 4824 enough. But P1 may have range table, so the
4825 size of bitmap table of P1 is extracted by 4825 size of bitmap table of P1 is extracted by
4826 using macro `CHARSET_BITMAP_SIZE'. 4826 using macro `CHARSET_BITMAP_SIZE'.
4827 4827
@@ -4853,7 +4853,7 @@ mutually_exclusive_p (bufp, p1, p2)
4853 { 4853 {
4854 int idx; 4854 int idx;
4855 /* We win if the charset_not inside the loop lists 4855 /* We win if the charset_not inside the loop lists
4856 every character listed in the charset after. */ 4856 every character listed in the charset after. */
4857 for (idx = 0; idx < (int) p2[1]; idx++) 4857 for (idx = 0; idx < (int) p2[1]; idx++)
4858 if (! (p2[2 + idx] == 0 4858 if (! (p2[2 + idx] == 0
4859 || (idx < CHARSET_BITMAP_SIZE (p1) 4859 || (idx < CHARSET_BITMAP_SIZE (p1)
@@ -4947,7 +4947,7 @@ WEAK_ALIAS (__re_match, re_match)
4947 4947
4948#ifdef emacs 4948#ifdef emacs
4949/* In Emacs, this is the string or buffer in which we 4949/* In Emacs, this is the string or buffer in which we
4950 are matching. It is used for looking up syntax properties. */ 4950 are matching. It is used for looking up syntax properties. */
4951Lisp_Object re_match_object; 4951Lisp_Object re_match_object;
4952#endif 4952#endif
4953 4953
@@ -4957,11 +4957,11 @@ Lisp_Object re_match_object;
4957 matching at STOP. 4957 matching at STOP.
4958 4958
4959 If REGS is non-null and the `no_sub' field of BUFP is nonzero, we 4959 If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
4960 store offsets for the substring each group matched in REGS. See the 4960 store offsets for the substring each group matched in REGS. See the
4961 documentation for exactly how many groups we fill. 4961 documentation for exactly how many groups we fill.
4962 4962
4963 We return -1 if no match, -2 if an internal error (such as the 4963 We return -1 if no match, -2 if an internal error (such as the
4964 failure stack overflowing). Otherwise, we return the length of the 4964 failure stack overflowing). Otherwise, we return the length of the
4965 matched substring. */ 4965 matched substring. */
4966 4966
4967int 4967int
@@ -5011,7 +5011,7 @@ WEAK_ALIAS (__re_match_2, re_match_2)
5011 5011
5012 5012
5013/* This is a separate function so that we can force an alloca cleanup 5013/* This is a separate function so that we can force an alloca cleanup
5014 afterwards. */ 5014 afterwards. */
5015static int 5015static int
5016re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) 5016re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5017 struct re_pattern_buffer *bufp; 5017 struct re_pattern_buffer *bufp;
@@ -5030,7 +5030,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5030 re_char *end1, *end2; 5030 re_char *end1, *end2;
5031 5031
5032 /* Pointers into string1 and string2, just past the last characters in 5032 /* Pointers into string1 and string2, just past the last characters in
5033 each to consider matching. */ 5033 each to consider matching. */
5034 re_char *end_match_1, *end_match_2; 5034 re_char *end_match_1, *end_match_2;
5035 5035
5036 /* Where we are in the data, and the end of the current string. */ 5036 /* Where we are in the data, and the end of the current string. */
@@ -5059,8 +5059,8 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5059 the subexpressions we're currently inside, plus the number of such 5059 the subexpressions we're currently inside, plus the number of such
5060 registers, and, finally, two char *'s. The first char * is where 5060 registers, and, finally, two char *'s. The first char * is where
5061 to resume scanning the pattern; the second one is where to resume 5061 to resume scanning the pattern; the second one is where to resume
5062 scanning the strings. */ 5062 scanning the strings. */
5063#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ 5063#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
5064 fail_stack_type fail_stack; 5064 fail_stack_type fail_stack;
5065#endif 5065#endif
5066#ifdef DEBUG 5066#ifdef DEBUG
@@ -5074,7 +5074,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5074#endif 5074#endif
5075 5075
5076 /* We fill all the registers internally, independent of what we 5076 /* We fill all the registers internally, independent of what we
5077 return, for use in backreferences. The number here includes 5077 return, for use in backreferences. The number here includes
5078 an element for register zero. */ 5078 an element for register zero. */
5079 size_t num_regs = bufp->re_nsub + 1; 5079 size_t num_regs = bufp->re_nsub + 1;
5080 5080
@@ -5100,7 +5100,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5100 5100
5101 /* Logically, this is `best_regend[0]'. But we don't want to have to 5101 /* Logically, this is `best_regend[0]'. But we don't want to have to
5102 allocate space for that if we're not allocating space for anything 5102 allocate space for that if we're not allocating space for anything
5103 else (see below). Also, we never need info about register 0 for 5103 else (see below). Also, we never need info about register 0 for
5104 any of the other register vectors, and it seems rather a kludge to 5104 any of the other register vectors, and it seems rather a kludge to
5105 treat `best_regend' differently than the rest. So we keep track of 5105 treat `best_regend' differently than the rest. So we keep track of
5106 the end of the best match so far in a separate variable. We 5106 the end of the best match so far in a separate variable. We
@@ -5158,7 +5158,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5158 regstart[reg] = regend[reg] = NULL; 5158 regstart[reg] = regend[reg] = NULL;
5159 5159
5160 /* We move `string1' into `string2' if the latter's empty -- but not if 5160 /* We move `string1' into `string2' if the latter's empty -- but not if
5161 `string1' is null. */ 5161 `string1' is null. */
5162 if (size2 == 0 && string1 != NULL) 5162 if (size2 == 0 && string1 != NULL)
5163 { 5163 {
5164 string2 = string1; 5164 string2 = string1;
@@ -5215,7 +5215,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5215 DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); 5215 DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
5216 DEBUG_PRINT1 ("'\n"); 5216 DEBUG_PRINT1 ("'\n");
5217 5217
5218 /* This loops over pattern commands. It exits by returning from the 5218 /* This loops over pattern commands. It exits by returning from the
5219 function if the match is complete, or it drops through if the match 5219 function if the match is complete, or it drops through if the match
5220 fails at this starting point in the input data. */ 5220 fails at this starting point in the input data. */
5221 for (;;) 5221 for (;;)
@@ -5238,7 +5238,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5238 boolean best_match_p; 5238 boolean best_match_p;
5239 5239
5240 /* AIX compiler got confused when this was combined 5240 /* AIX compiler got confused when this was combined
5241 with the previous declaration. */ 5241 with the previous declaration. */
5242 if (same_str_p) 5242 if (same_str_p)
5243 best_match_p = d > match_end; 5243 best_match_p = d > match_end;
5244 else 5244 else
@@ -5276,7 +5276,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5276 end_match_1' while the restored d is in string2. 5276 end_match_1' while the restored d is in string2.
5277 For example, the pattern `x.*y.*z' against the 5277 For example, the pattern `x.*y.*z' against the
5278 strings `x-' and `y-z-', if the two strings are 5278 strings `x-' and `y-z-', if the two strings are
5279 not consecutive in memory. */ 5279 not consecutive in memory. */
5280 DEBUG_PRINT1 ("Restoring best registers.\n"); 5280 DEBUG_PRINT1 ("Restoring best registers.\n");
5281 5281
5282 d = match_end; 5282 d = match_end;
@@ -5299,7 +5299,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5299 { 5299 {
5300 /* Have the register data arrays been allocated? */ 5300 /* Have the register data arrays been allocated? */
5301 if (bufp->regs_allocated == REGS_UNALLOCATED) 5301 if (bufp->regs_allocated == REGS_UNALLOCATED)
5302 { /* No. So allocate them with malloc. We need one 5302 { /* No. So allocate them with malloc. We need one
5303 extra element beyond `num_regs' for the `-1' marker 5303 extra element beyond `num_regs' for the `-1' marker
5304 GNU code uses. */ 5304 GNU code uses. */
5305 regs->num_regs = MAX (RE_NREGS, num_regs + 1); 5305 regs->num_regs = MAX (RE_NREGS, num_regs + 1);
@@ -5331,7 +5331,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5331 else 5331 else
5332 { 5332 {
5333 /* These braces fend off a "empty body in an else-statement" 5333 /* These braces fend off a "empty body in an else-statement"
5334 warning under GCC when assert expands to nothing. */ 5334 warning under GCC when assert expands to nothing. */
5335 assert (bufp->regs_allocated == REGS_FIXED); 5335 assert (bufp->regs_allocated == REGS_FIXED);
5336 } 5336 }
5337 5337
@@ -5363,7 +5363,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5363 were in the pattern, set the extra elements to -1. If 5363 were in the pattern, set the extra elements to -1. If
5364 we (re)allocated the registers, this is the case, 5364 we (re)allocated the registers, this is the case,
5365 because we always allocate enough to have at least one 5365 because we always allocate enough to have at least one
5366 -1 at the end. */ 5366 -1 at the end. */
5367 for (reg = num_regs; reg < regs->num_regs; reg++) 5367 for (reg = num_regs; reg < regs->num_regs; reg++)
5368 regs->start[reg] = regs->end[reg] = -1; 5368 regs->start[reg] = regs->end[reg] = -1;
5369 } /* regs && !bufp->no_sub */ 5369 } /* regs && !bufp->no_sub */
@@ -5381,7 +5381,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5381 return mcnt; 5381 return mcnt;
5382 } 5382 }
5383 5383
5384 /* Otherwise match next pattern command. */ 5384 /* Otherwise match next pattern command. */
5385 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) 5385 switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
5386 { 5386 {
5387 /* Ignore these. Used to ignore the n of succeed_n's which 5387 /* Ignore these. Used to ignore the n of succeed_n's which
@@ -5394,9 +5394,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5394 DEBUG_PRINT1 ("EXECUTING succeed.\n"); 5394 DEBUG_PRINT1 ("EXECUTING succeed.\n");
5395 goto succeed_label; 5395 goto succeed_label;
5396 5396
5397 /* Match the next n pattern characters exactly. The following 5397 /* Match the next n pattern characters exactly. The following
5398 byte in the pattern defines n, and the n bytes after that 5398 byte in the pattern defines n, and the n bytes after that
5399 are the characters to match. */ 5399 are the characters to match. */
5400 case exactn: 5400 case exactn:
5401 mcnt = *p++; 5401 mcnt = *p++;
5402 DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt); 5402 DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
@@ -5568,7 +5568,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5568 /* The beginning of a group is represented by start_memory. 5568 /* The beginning of a group is represented by start_memory.
5569 The argument is the register number. The text 5569 The argument is the register number. The text
5570 matched within the group is recorded (in the internal 5570 matched within the group is recorded (in the internal
5571 registers data structure) under the register number. */ 5571 registers data structure) under the register number. */
5572 case start_memory: 5572 case start_memory:
5573 DEBUG_PRINT2 ("EXECUTING start_memory %d:\n", *p); 5573 DEBUG_PRINT2 ("EXECUTING start_memory %d:\n", *p);
5574 5574
@@ -5617,14 +5617,14 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5617 case duplicate: 5617 case duplicate:
5618 { 5618 {
5619 register re_char *d2, *dend2; 5619 register re_char *d2, *dend2;
5620 int regno = *p++; /* Get which register to match against. */ 5620 int regno = *p++; /* Get which register to match against. */
5621 DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno); 5621 DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
5622 5622
5623 /* Can't back reference a group which we've never matched. */ 5623 /* Can't back reference a group which we've never matched. */
5624 if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) 5624 if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
5625 goto fail; 5625 goto fail;
5626 5626
5627 /* Where in input to try to start matching. */ 5627 /* Where in input to try to start matching. */
5628 d2 = regstart[regno]; 5628 d2 = regstart[regno];
5629 5629
5630 /* Remember the start point to rollback upon failure. */ 5630 /* Remember the start point to rollback upon failure. */
@@ -5737,7 +5737,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5737 pushes NULL as the value for the string on the stack. Then 5737 pushes NULL as the value for the string on the stack. Then
5738 `POP_FAILURE_POINT' will keep the current value for the 5738 `POP_FAILURE_POINT' will keep the current value for the
5739 string, instead of restoring it. To see why, consider 5739 string, instead of restoring it. To see why, consider
5740 matching `foo\nbar' against `.*\n'. The .* matches the foo; 5740 matching `foo\nbar' against `.*\n'. The .* matches the foo;
5741 then the . fails against the \n. But the next thing we want 5741 then the . fails against the \n. But the next thing we want
5742 to do is match the \n against the \n; if we restored the 5742 to do is match the \n against the \n; if we restored the
5743 string value, we would be back at the foo. 5743 string value, we would be back at the foo.
@@ -5882,7 +5882,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5882 IMMEDIATE_QUIT_CHECK; 5882 IMMEDIATE_QUIT_CHECK;
5883 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ 5883 EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
5884 DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); 5884 DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
5885 p += mcnt; /* Do the jump. */ 5885 p += mcnt; /* Do the jump. */
5886 DEBUG_PRINT2 ("(to %p).\n", p); 5886 DEBUG_PRINT2 ("(to %p).\n", p);
5887 break; 5887 break;
5888 5888
@@ -5976,7 +5976,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5976 if (/* Case 2: Only one of S1 and S2 is Sword. */ 5976 if (/* Case 2: Only one of S1 and S2 is Sword. */
5977 ((s1 == Sword) != (s2 == Sword)) 5977 ((s1 == Sword) != (s2 == Sword))
5978 /* Case 3: Both of S1 and S2 are Sword, and macro 5978 /* Case 3: Both of S1 and S2 are Sword, and macro
5979 WORD_BOUNDARY_P (C1, C2) returns nonzero. */ 5979 WORD_BOUNDARY_P (C1, C2) returns nonzero. */
5980 || ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2))) 5980 || ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2)))
5981 not = !not; 5981 not = !not;
5982 } 5982 }
@@ -5990,7 +5990,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
5990 5990
5991 /* We FAIL in one of the following cases: */ 5991 /* We FAIL in one of the following cases: */
5992 5992
5993 /* Case 1: D is at the end of string. */ 5993 /* Case 1: D is at the end of string. */
5994 if (AT_STRINGS_END (d)) 5994 if (AT_STRINGS_END (d))
5995 goto fail; 5995 goto fail;
5996 else 5996 else
@@ -6023,7 +6023,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
6023 s1 = SYNTAX (c1); 6023 s1 = SYNTAX (c1);
6024 6024
6025 /* ... and S1 is Sword, and WORD_BOUNDARY_P (C1, C2) 6025 /* ... and S1 is Sword, and WORD_BOUNDARY_P (C1, C2)
6026 returns 0. */ 6026 returns 0. */
6027 if ((s1 == Sword) && !WORD_BOUNDARY_P (c1, c2)) 6027 if ((s1 == Sword) && !WORD_BOUNDARY_P (c1, c2))
6028 goto fail; 6028 goto fail;
6029 } 6029 }
@@ -6068,7 +6068,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
6068 s2 = SYNTAX (c2); 6068 s2 = SYNTAX (c2);
6069 6069
6070 /* ... and S2 is Sword, and WORD_BOUNDARY_P (C1, C2) 6070 /* ... and S2 is Sword, and WORD_BOUNDARY_P (C1, C2)
6071 returns 0. */ 6071 returns 0. */
6072 if ((s2 == Sword) && !WORD_BOUNDARY_P (c1, c2)) 6072 if ((s2 == Sword) && !WORD_BOUNDARY_P (c1, c2))
6073 goto fail; 6073 goto fail;
6074 } 6074 }
@@ -6080,7 +6080,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
6080 6080
6081 /* We FAIL in one of the following cases: */ 6081 /* We FAIL in one of the following cases: */
6082 6082
6083 /* Case 1: D is at the end of string. */ 6083 /* Case 1: D is at the end of string. */
6084 if (AT_STRINGS_END (d)) 6084 if (AT_STRINGS_END (d))
6085 goto fail; 6085 goto fail;
6086 else 6086 else
@@ -6097,7 +6097,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
6097 PREFETCH (); 6097 PREFETCH ();
6098 c2 = RE_STRING_CHAR (d, dend - d); 6098 c2 = RE_STRING_CHAR (d, dend - d);
6099 s2 = SYNTAX (c2); 6099 s2 = SYNTAX (c2);
6100 6100
6101 /* Case 2: S2 is neither Sword nor Ssymbol. */ 6101 /* Case 2: S2 is neither Sword nor Ssymbol. */
6102 if (s2 != Sword && s2 != Ssymbol) 6102 if (s2 != Sword && s2 != Ssymbol)
6103 goto fail; 6103 goto fail;
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 02225a9226f..c23987d2d9b 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -20,5 +20,19 @@
20*/ 20*/
21#define BROKEN_GET_CURRENT_DIR_NAME 1 21#define BROKEN_GET_CURRENT_DIR_NAME 1
22 22
23/* aix3-1.h defined _NO_PROTO, probably to work around an AIX compiler
24 that did not handle prototypes. On (at least) AIX 5.2, this causes
25 the proper prototype to be thrown away for lseek64, so compiled
26 Lisp files do not load correctly and compilation fails.
27
28 The AIX compiler should have learned about function prototypes long
29 ago, so we can probably go ahead and undefine _NO_PROTO. However,
30 if someone can demonstrate that this problem still exists for AIX
31 4, this should be moved into a new file (aix5.h).
32*/
33
34#undef _NO_PROTO
35
36
23/* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 37/* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
24 (do not change this comment) */ 38 (do not change this comment) */
diff --git a/src/s/openbsd.h b/src/s/openbsd.h
index baba95a2b4b..3b996de7059 100644
--- a/src/s/openbsd.h
+++ b/src/s/openbsd.h
@@ -21,13 +21,18 @@
21#undef LD_SWITCH_SYSTEM 21#undef LD_SWITCH_SYSTEM
22#ifdef __ELF__ 22#ifdef __ELF__
23 23
24/* Han Boetes <han@mijncomputer.nl> says this 24 /* Han Boetes <han@mijncomputer.nl> says this
25 is necessary, otherwise Emacs dumps core on elf systems. */ 25 is necessary, otherwise Emacs dumps core on elf systems. */
26#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z -L/usr/pkg/lib -L/usr/local/lib 26#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z
27 27
28#else 28/* The version of gcc on OpenBSD doesn't search /usr/local/lib by
29 default. */
30#define LD_SWITCH_X_DEFAULT -L/usr/local/lib
29 31
30#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -L/usr/pkg/lib -L/usr/local/lib 32#else
33
34#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp
35#define LD_SWITCH_X_DEFAULT -L/usr/local/lib
31 36
32#endif 37#endif
33 38
diff --git a/src/sound.c b/src/sound.c
index 6f955a7d691..6f8e3ecb308 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1015,14 +1015,14 @@ alsa_configure (sd)
1015 1015
1016 val = sd->format; 1016 val = sd->format;
1017 err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val); 1017 err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val);
1018 if (err < 0) 1018 if (err < 0)
1019 alsa_sound_perror ("Could not set sound format", err); 1019 alsa_sound_perror ("Could not set sound format", err);
1020 1020
1021 uval = sd->sample_rate; 1021 uval = sd->sample_rate;
1022 err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0); 1022 err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0);
1023 if (err < 0) 1023 if (err < 0)
1024 alsa_sound_perror ("Could not set sample rate", err); 1024 alsa_sound_perror ("Could not set sample rate", err);
1025 1025
1026 val = sd->channels; 1026 val = sd->channels;
1027 err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val); 1027 err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val);
1028 if (err < 0) 1028 if (err < 0)
@@ -1072,11 +1072,11 @@ alsa_configure (sd)
1072 p->hwparams = NULL; 1072 p->hwparams = NULL;
1073 snd_pcm_sw_params_free (p->swparams); 1073 snd_pcm_sw_params_free (p->swparams);
1074 p->swparams = NULL; 1074 p->swparams = NULL;
1075 1075
1076 err = snd_pcm_prepare (p->handle); 1076 err = snd_pcm_prepare (p->handle);
1077 if (err < 0) 1077 if (err < 0)
1078 alsa_sound_perror ("Could not prepare audio interface for use", err); 1078 alsa_sound_perror ("Could not prepare audio interface for use", err);
1079 1079
1080 if (sd->volume > 0) 1080 if (sd->volume > 0)
1081 { 1081 {
1082 int chn; 1082 int chn;
@@ -1098,7 +1098,7 @@ alsa_configure (sd)
1098 long pmin, pmax; 1098 long pmin, pmax;
1099 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax); 1099 snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
1100 long vol = pmin + (sd->volume * (pmax - pmin)) / 100; 1100 long vol = pmin + (sd->volume * (pmax - pmin)) / 100;
1101 1101
1102 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) 1102 for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
1103 snd_mixer_selem_set_playback_volume (e, chn, vol); 1103 snd_mixer_selem_set_playback_volume (e, chn, vol);
1104 } 1104 }
@@ -1230,9 +1230,9 @@ alsa_write (sd, buffer, nbytes)
1230 err); 1230 err);
1231 } 1231 }
1232 } 1232 }
1233 else 1233 else
1234 alsa_sound_perror ("Error writing to sound device", err); 1234 alsa_sound_perror ("Error writing to sound device", err);
1235 1235
1236 } 1236 }
1237 else 1237 else
1238 nwritten += err * fact; 1238 nwritten += err * fact;
@@ -1374,7 +1374,7 @@ do_play_sound (psz_file, ui_volume)
1374DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0, 1374DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0,
1375 doc: /* Play sound SOUND. 1375 doc: /* Play sound SOUND.
1376 1376
1377Internal use only, use `play-sound' instead.\n */) 1377Internal use only, use `play-sound' instead. */)
1378 (sound) 1378 (sound)
1379 Lisp_Object sound; 1379 Lisp_Object sound;
1380{ 1380{
diff --git a/src/strftime.c b/src/strftime.c
index 123763d8845..88800c0d408 100644
--- a/src/strftime.c
+++ b/src/strftime.c
@@ -69,9 +69,9 @@ extern char *tzname[];
69#if DO_MULTIBYTE 69#if DO_MULTIBYTE
70# if HAVE_MBRLEN 70# if HAVE_MBRLEN
71# include <wchar.h> 71# include <wchar.h>
72# ifdef HAVE_SYS__MBSTATE_H /* previously tested __hpux */ 72# ifdef HAVE_SYS__MBSTATE_T_H /* previously tested __hpux */
73# include <sys/_mbstate_t.h> 73# include <sys/_mbstate_t.h>
74# endif 74# endif
75# if !defined (mbsinit) && !defined (HAVE_MBSINIT) 75# if !defined (mbsinit) && !defined (HAVE_MBSINIT)
76# define mbsinit(ps) 1 76# define mbsinit(ps) 1
77# endif /* !defined (mbsinit) && !defined (HAVE_MBSINIT) */ 77# endif /* !defined (mbsinit) && !defined (HAVE_MBSINIT) */
diff --git a/src/syntax.c b/src/syntax.c
index a58fc70a113..a85746be362 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1481,7 +1481,7 @@ skip_chars (forwardp, string, lim, handle_iso_classes)
1481 const unsigned char *class_beg = str + i_byte + 1; 1481 const unsigned char *class_beg = str + i_byte + 1;
1482 const unsigned char *class_end = class_beg; 1482 const unsigned char *class_end = class_beg;
1483 const unsigned char *class_limit = str + size_byte - 2; 1483 const unsigned char *class_limit = str + size_byte - 2;
1484 /* Leave room for the null. */ 1484 /* Leave room for the null. */
1485 unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1]; 1485 unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1];
1486 re_wctype_t cc; 1486 re_wctype_t cc;
1487 1487
diff --git a/src/sysdep.c b/src/sysdep.c
index 3fd134e476d..625b5d619ab 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3756,7 +3756,7 @@ set_file_times (filename, atime, mtime)
3756 * sdcsvax!rmr or rmr@uscd 3756 * sdcsvax!rmr or rmr@uscd
3757 * 3757 *
3758 * Severely hacked over by John Gilmore to make a 4.2BSD compatible 3758 * Severely hacked over by John Gilmore to make a 4.2BSD compatible
3759 * subroutine. 11Mar86; hoptoad!gnu 3759 * subroutine. 11Mar86; hoptoad!gnu
3760 * 3760 *
3761 * Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir, 3761 * Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir,
3762 * subroutine didn't return EEXIST. It does now. 3762 * subroutine didn't return EEXIST. It does now.
diff --git a/src/w16select.c b/src/w16select.c
index 50c107a0789..e77d4fca806 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -590,7 +590,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
590 message2 (system_error_msg, sizeof (system_error_msg) - 1, 0); 590 message2 (system_error_msg, sizeof (system_error_msg) - 1, 0);
591 break; 591 break;
592 } 592 }
593 sit_for (2, 0, 0, 1, 1); 593 sit_for (make_number (2), 0, 2);
594 } 594 }
595 595
596 done: 596 done:
diff --git a/src/w32fns.c b/src/w32fns.c
index 910c395d61e..1ab44486852 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2690,9 +2690,8 @@ cancel_all_deferred_msgs ()
2690 PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0); 2690 PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0);
2691} 2691}
2692 2692
2693DWORD 2693DWORD WINAPI
2694w32_msg_worker (dw) 2694w32_msg_worker (void *arg)
2695 DWORD dw;
2696{ 2695{
2697 MSG msg; 2696 MSG msg;
2698 deferred_msg dummy_buf; 2697 deferred_msg dummy_buf;
@@ -8107,17 +8106,39 @@ DEFUN ("w32-shell-execute", Fw32_shell_execute, Sw32_shell_execute, 2, 4, 0,
8107 doc: /* Get Windows to perform OPERATION on DOCUMENT. 8106 doc: /* Get Windows to perform OPERATION on DOCUMENT.
8108This is a wrapper around the ShellExecute system function, which 8107This is a wrapper around the ShellExecute system function, which
8109invokes the application registered to handle OPERATION for DOCUMENT. 8108invokes the application registered to handle OPERATION for DOCUMENT.
8110OPERATION is typically \"open\", \"print\" or \"explore\" (but can be
8111nil for the default action), and DOCUMENT is typically the name of a
8112document file or URL, but can also be a program executable to run or
8113a directory to open in the Windows Explorer.
8114 8109
8115If DOCUMENT is a program executable, PARAMETERS can be a string 8110OPERATION is either nil or a string that names a supported operation.
8116containing command line parameters, but otherwise should be nil. 8111What operations can be used depends on the particular DOCUMENT and its
8117 8112handler application, but typically it is one of the following common
8118SHOW-FLAG can be used to control whether the invoked application is hidden 8113operations:
8119or minimized. If SHOW-FLAG is nil, the application is displayed normally, 8114
8120otherwise it is an integer representing a ShowWindow flag: 8115 \"open\" - open DOCUMENT, which could be a file, a directory, or an
8116 executable program. If it is an application, that
8117 application is launched in the current buffer's default
8118 directory. Otherwise, the application associated with
8119 DOCUMENT is launched in the buffer's default directory.
8120 \"print\" - print DOCUMENT, which must be a file
8121 \"explore\" - start the Windows Explorer on DOCUMENT
8122 \"edit\" - launch an editor and open DOCUMENT for editing; which
8123 editor is launched depends on the association for the
8124 specified DOCUMENT
8125 \"find\" - initiate search starting from DOCUMENT which must specify
8126 a directory
8127 nil - invoke the default OPERATION, or \"open\" if default is
8128 not defined or unavailable
8129
8130DOCUMENT is typically the name of a document file or a URL, but can
8131also be a program executable to run, or a directory to open in the
8132Windows Explorer.
8133
8134If DOCUMENT is a program executable, the optional arg PARAMETERS can
8135be a string containing command line parameters that will be passed to
8136the program; otherwise, PARAMETERS should be nil or unspecified.
8137
8138Second optional argument SHOW-FLAG can be used to control how the
8139application will be displayed when it is invoked. If SHOW-FLAG is nil
8140or unspceified, the application is displayed normally, otherwise it is
8141an integer representing a ShowWindow flag:
8121 8142
8122 0 - start hidden 8143 0 - start hidden
8123 1 - start normally 8144 1 - start normally
diff --git a/src/w32term.c b/src/w32term.c
index dda50bfac15..89be876b920 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4590,7 +4590,7 @@ w32_read_socket (sd, expected, hold_quit)
4590 /* Ignore any mouse motion that happened before this 4590 /* Ignore any mouse motion that happened before this
4591 event; any subsequent mouse-movement Emacs events 4591 event; any subsequent mouse-movement Emacs events
4592 should reflect only motion after the 4592 should reflect only motion after the
4593 ButtonPress. */ 4593 ButtonPress. */
4594 f->mouse_moved = 0; 4594 f->mouse_moved = 0;
4595 } 4595 }
4596 last_mouse_frame = f; 4596 last_mouse_frame = f;
@@ -6450,7 +6450,7 @@ x_delete_display (dpyinfo)
6450 6450
6451/* Set up use of W32. */ 6451/* Set up use of W32. */
6452 6452
6453DWORD w32_msg_worker (); 6453DWORD WINAPI w32_msg_worker (void * arg);
6454 6454
6455void 6455void
6456x_flush (struct frame * f) 6456x_flush (struct frame * f)
@@ -6555,8 +6555,8 @@ w32_initialize ()
6555 PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE); 6555 PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE);
6556 6556
6557 hWindowsThread = CreateThread (NULL, 0, 6557 hWindowsThread = CreateThread (NULL, 0,
6558 (LPTHREAD_START_ROUTINE) w32_msg_worker, 6558 w32_msg_worker,
6559 0, 0, &dwWindowsThreadId); 6559 0, 0, &dwWindowsThreadId);
6560 6560
6561 GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); 6561 GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
6562 } 6562 }
diff --git a/src/window.c b/src/window.c
index 59463d9a71e..d687c831ef6 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3265,6 +3265,10 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
3265 struct window *w = XWINDOW (window); 3265 struct window *w = XWINDOW (window);
3266 struct buffer *b = XBUFFER (buffer); 3266 struct buffer *b = XBUFFER (buffer);
3267 int count = SPECPDL_INDEX (); 3267 int count = SPECPDL_INDEX ();
3268#ifdef HAVE_WINDOW_SYSTEM
3269 struct frame *f = XFRAME (w->frame);
3270 Display_Info *dpyinfo;
3271#endif
3268 3272
3269 w->buffer = buffer; 3273 w->buffer = buffer;
3270 3274
@@ -3345,6 +3349,15 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
3345 call1 (Vrun_hooks, Qwindow_configuration_change_hook); 3349 call1 (Vrun_hooks, Qwindow_configuration_change_hook);
3346 } 3350 }
3347 3351
3352#ifdef HAVE_WINDOW_SYSTEM
3353 BLOCK_INPUT;
3354 if (f && FRAME_X_OUTPUT (f)
3355 && (dpyinfo = FRAME_X_DISPLAY_INFO (f))
3356 && EQ (window, dpyinfo->mouse_face_window))
3357 clear_mouse_face (dpyinfo);
3358 UNBLOCK_INPUT;
3359#endif
3360
3348 unbind_to (count, Qnil); 3361 unbind_to (count, Qnil);
3349} 3362}
3350 3363
diff --git a/src/xdisp.c b/src/xdisp.c
index 40a1dfde5b2..957340674f6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6986,7 +6986,12 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
6986 break; 6986 break;
6987 6987
6988 case MOVE_LINE_CONTINUED: 6988 case MOVE_LINE_CONTINUED:
6989 it->continuation_lines_width += it->current_x; 6989 /* For continued lines ending in a tab, some of the glyphs
6990 associated with the tab are displayed on the current
6991 line. Since it->current_x does not include these glyphs,
6992 we use it->last_visible_x instead. */
6993 it->continuation_lines_width +=
6994 (it->c == '\t') ? it->last_visible_x : it->current_x;
6990 break; 6995 break;
6991 6996
6992 default: 6997 default:
@@ -17533,7 +17538,7 @@ pint2str (buf, width, d)
17533 17538
17534/* Write a null-terminated, right justified decimal and "human 17539/* Write a null-terminated, right justified decimal and "human
17535 readable" representation of the nonnegative integer D to BUF using 17540 readable" representation of the nonnegative integer D to BUF using
17536 a minimal field width WIDTH. D should be smaller than 999.5e24. */ 17541 a minimal field width WIDTH. D should be smaller than 999.5e24. */
17537 17542
17538static const char power_letter[] = 17543static const char power_letter[] =
17539 { 17544 {
diff --git a/src/xfaces.c b/src/xfaces.c
index 6c04a91a125..9c8f02d6902 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -7534,10 +7534,18 @@ realize_default_face (f)
7534#ifdef HAVE_WINDOW_SYSTEM 7534#ifdef HAVE_WINDOW_SYSTEM
7535#ifdef HAVE_X_WINDOWS 7535#ifdef HAVE_X_WINDOWS
7536 if (face->font != FRAME_FONT (f)) 7536 if (face->font != FRAME_FONT (f))
7537 /* As the font specified for the frame was not acceptable as a 7537 {
7538 font for the default face (perhaps because auto-scaled fonts 7538 /* This can happen when making a frame on a display that does
7539 are rejected), we must adjust the frame font. */ 7539 not support the default font. */
7540 x_set_font (f, build_string (face->font_name), Qnil); 7540 if (!face->font)
7541 return 0;
7542
7543 /* Otherwise, the font specified for the frame was not
7544 acceptable as a font for the default face (perhaps because
7545 auto-scaled fonts are rejected), so we must adjust the frame
7546 font. */
7547 x_set_font (f, build_string (face->font_name), Qnil);
7548 }
7541#endif /* HAVE_X_WINDOWS */ 7549#endif /* HAVE_X_WINDOWS */
7542#endif /* HAVE_WINDOW_SYSTEM */ 7550#endif /* HAVE_WINDOW_SYSTEM */
7543 return 1; 7551 return 1;
diff --git a/src/xselect.c b/src/xselect.c
index cb76e229e55..72d6aa071ca 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -835,7 +835,7 @@ x_reply_selection_request (event, format, data, size, type)
835 break; 835 break;
836 836
837 /* Now wait for the requester to ack this chunk by deleting the 837 /* Now wait for the requester to ack this chunk by deleting the
838 property. This can run random lisp code or signal. */ 838 property. This can run random lisp code or signal. */
839 TRACE1 ("Waiting for increment ACK (deletion of %s)", 839 TRACE1 ("Waiting for increment ACK (deletion of %s)",
840 XGetAtomName (display, reply.property)); 840 XGetAtomName (display, reply.property));
841 wait_for_property_change (wait_object); 841 wait_for_property_change (wait_object);
@@ -2710,11 +2710,11 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
2710 else 2710 else
2711 error ("ATOM must be a symbol or a string"); 2711 error ("ATOM must be a symbol or a string");
2712 2712
2713 for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) 2713 for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
2714 if (dpyinfo->x_dnd_atoms[i] == x_atom) 2714 if (dpyinfo->x_dnd_atoms[i] == x_atom)
2715 return Qnil; 2715 return Qnil;
2716 2716
2717 if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size) 2717 if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size)
2718 { 2718 {
2719 dpyinfo->x_dnd_atoms_size *= 2; 2719 dpyinfo->x_dnd_atoms_size *= 2;
2720 dpyinfo->x_dnd_atoms = xrealloc (dpyinfo->x_dnd_atoms, 2720 dpyinfo->x_dnd_atoms = xrealloc (dpyinfo->x_dnd_atoms,
@@ -2744,7 +2744,7 @@ x_handle_dnd_message (f, event, dpyinfo, bufp)
2744 int idata[5]; 2744 int idata[5];
2745 size_t i; 2745 size_t i;
2746 2746
2747 for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) 2747 for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
2748 if (dpyinfo->x_dnd_atoms[i] == event->message_type) break; 2748 if (dpyinfo->x_dnd_atoms[i] == event->message_type) break;
2749 2749
2750 if (i == dpyinfo->x_dnd_atoms_length) return 0; 2750 if (i == dpyinfo->x_dnd_atoms_length) return 0;
diff --git a/src/xterm.c b/src/xterm.c
index 6fdaaa83d93..277f0431a3b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9022,23 +9022,10 @@ void
9022x_raise_frame (f) 9022x_raise_frame (f)
9023 struct frame *f; 9023 struct frame *f;
9024{ 9024{
9025 Lisp_Object frame;
9026 const char *atom = "_NET_ACTIVE_WINDOW";
9027
9028 BLOCK_INPUT; 9025 BLOCK_INPUT;
9029 if (f->async_visible) 9026 if (f->async_visible)
9030 XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); 9027 XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
9031 9028
9032 XSETFRAME (frame, f);
9033 /* See Window Manager Specification/Extended Window Manager Hints at
9034 http://freedesktop.org/wiki/Standards_2fwm_2dspec */
9035
9036 Fx_send_client_event (frame, make_number (0), frame,
9037 make_unibyte_string (atom, strlen (atom)),
9038 make_number (32),
9039 Fcons (make_number (1),
9040 Fcons (make_number (time (NULL) * 1000),
9041 Qnil)));
9042 XFlush (FRAME_X_DISPLAY (f)); 9029 XFlush (FRAME_X_DISPLAY (f));
9043 UNBLOCK_INPUT; 9030 UNBLOCK_INPUT;
9044} 9031}
@@ -9064,7 +9051,22 @@ XTframe_raise_lower (f, raise_flag)
9064 int raise_flag; 9051 int raise_flag;
9065{ 9052{
9066 if (raise_flag) 9053 if (raise_flag)
9067 x_raise_frame (f); 9054 {
9055 Lisp_Object frame;
9056 const char *atom = "_NET_ACTIVE_WINDOW";
9057
9058 x_raise_frame (f);
9059 /* See Window Manager Specification/Extended Window Manager Hints at
9060 http://freedesktop.org/wiki/Standards_2fwm_2dspec */
9061
9062 XSETFRAME (frame, f);
9063 Fx_send_client_event (frame, make_number (0), frame,
9064 make_unibyte_string (atom, strlen (atom)),
9065 make_number (32),
9066 Fcons (make_number (1),
9067 Fcons (make_number (time (NULL) * 1000),
9068 Qnil)));
9069 }
9068 else 9070 else
9069 x_lower_frame (f); 9071 x_lower_frame (f);
9070} 9072}