diff options
author | Miles Bader <miles@gnu.org> | 2006-12-07 04:14:14 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-12-07 04:14:14 +0000 |
commit | a0451a715e4ed018a02b825d0eb823424693d1de (patch) | |
tree | d2b10fcc69c333ccc438d7a9ad116fbc1495fc9e /src | |
parent | d324f894beea8b485792c779659e8e20c1cb699d (diff) | |
parent | 12f7728e938fe5bb850ce2928637d1e349919142 (diff) | |
download | emacs-a0451a715e4ed018a02b825d0eb823424693d1de.tar.gz |
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/ChangeLog | 232 | ||||
-rw-r--r-- | src/Makefile.in | 5 | ||||
-rw-r--r-- | src/abbrev.c | 21 | ||||
-rw-r--r-- | src/buffer.c | 4 | ||||
-rw-r--r-- | src/config.in | 8 | ||||
-rw-r--r-- | src/emacs.c | 29 | ||||
-rw-r--r-- | src/fileio.c | 10 | ||||
-rw-r--r-- | src/fns.c | 68 | ||||
-rw-r--r-- | src/gtkutil.c | 33 | ||||
-rw-r--r-- | src/keyboard.c | 39 | ||||
-rw-r--r-- | src/m/amdx86-64.h | 8 | ||||
-rw-r--r-- | src/m/ibmrs6000.h | 6 | ||||
-rw-r--r-- | src/m/pfa50.h | 2 | ||||
-rw-r--r-- | src/msdos.c | 2 | ||||
-rw-r--r-- | src/process.c | 85 | ||||
-rw-r--r-- | src/regex.c | 172 | ||||
-rw-r--r-- | src/s/aix4-2.h | 14 | ||||
-rw-r--r-- | src/s/openbsd.h | 15 | ||||
-rw-r--r-- | src/sound.c | 16 | ||||
-rw-r--r-- | src/strftime.c | 6 | ||||
-rw-r--r-- | src/syntax.c | 2 | ||||
-rw-r--r-- | src/sysdep.c | 2 | ||||
-rw-r--r-- | src/w16select.c | 2 | ||||
-rw-r--r-- | src/w32fns.c | 47 | ||||
-rw-r--r-- | src/w32term.c | 8 | ||||
-rw-r--r-- | src/window.c | 13 | ||||
-rw-r--r-- | src/xdisp.c | 9 | ||||
-rw-r--r-- | src/xfaces.c | 16 | ||||
-rw-r--r-- | src/xselect.c | 8 | ||||
-rw-r--r-- | src/xterm.c | 30 |
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 @@ +2006-12-05 Glenn Morris <rgm@gnu.org> + + * abbrev.c (Qforce): New Lisp_Object. + (Fdefine_abbrev): Do not overwrite non-system abbrevs with system + abbrevs, unless 'force is applied. + (syms_of_abbrev): Add Qforce. + +2006-12-04 Kim F. Storm <storm@cua.dk> + + * process.c (parse_signal): Rename macro from handle_signal. + (Fsignal_process): Also accept lower-case variants of signal + names (to align with signal names generated by Emacs itself). + + * emacs.c (handle_USR1_signal, handle_USR2_signal): Replace by... + (handle_user_signal): ... this, which generates two USER_SIGNAL_EVENTs + first with code == 0 [signal] and one with code == sig number. + (main): Use it as handler for SIGUR1 and SIGUSR2. + + * keyboard.c (kbd_buffer_store_event_hold): Don't throw-on-input + if first event in [signal xxx] sequence. + (lispy_user_signals, Qusr1_signal, Qusr2_signal): Remove. + (syms_of_keyboard): Don't intern and staticpro them. + (Qsignal): Declare here. + (syms_of_keyboard): Intern and staticpro it. + (make_lispy_event): Use it. Intern symbols on the fly for other + USER_SIGNAL_EVENTs events. + + * process.c (Qsignal): Declare extern. + (syms_of_process): Don't intern/staticpro it here. + + * process.c (read_process_output): Abort if carryover < 0. + +2006-12-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * config.in: Regenerate. + + * fileio.c [__NetBSD__]: Don't define `unix'. + (Funix_sync, syms_of_fileio): Use `#ifdef HAVE_SYNC' instead of + `#ifdef unix'. + +2006-12-04 Glenn Morris <rgm@gnu.org> + + * Makefile.in (version): New variable, set by configure. + (bootstrapclean, mostlyclean): Also remove emacs-${version}. + +2006-12-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * gtkutil.c (update_frame_tool_bar): Handle modifying a toolbar item + without an image. + +2006-12-01 Eli Zaretskii <eliz@gnu.org> + + * w32fns.c (Fw32_shell_execute): Doc fix. + +2006-11-30 Chong Yidong <cyd@stupidchicken.com> + + * xdisp.c (move_it_to): Correctly count tab glyphs for continued + lines ending in tab. + +2006-11-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * xterm.c (x_raise_frame): Move setting of _NET_ACTIVE_WINDOW + property ... + (XTframe_raise_lower): ... to here. + +2006-11-30 Kenichi Handa <handa@m17n.org> + + * regex.c (regex_compile): Fix previous change. + +2006-11-29 Juanma Barranquero <lekktu@gmail.com> + + * sound.c (Fplay_sound_internal): Remove spurious newline in docstring. + +2006-11-28 Chong Yidong <cyd@stupidchicken.com> + + * config.in: Regenerate. + +2006-11-28 Kenichi Handa <handa@m17n.org> + + * regex.c (regex_compile): Don't call SET_LIST_BIT with a + multibyte character. + +2006-11-27 Chong Yidong <cyd@stupidchicken.com> + + * s/aix4-2.h: Undefine _NO_PROTO. Suggested by Joe Buehler. + +2006-11-27 Kim F. Storm <storm@cua.dk> + + * window.c (set_window_buffer): Refactor recent changes. + +2006-11-27 Jason Rumney <jasonr@gnu.org> + + * w32term.c (w32_msg_worker): Declare correctly. + (w32_initialize): Don't cast w32_msg_worker. + + * w32fns.c (w32_msg_worker): Define as WINAPI and arg as void pointer. + +2006-11-26 Chong Yidong <cyd@stupidchicken.com> + + * m/amdx86-64.h: Look for standard libs in /usr/lib64 only if that + directory exists. + +2006-11-25 Eli Zaretskii <eliz@gnu.org> + + * w16select.c (Fw16_set_clipboard_data): Fix the call to sit_for + as per the calling sequence change on 2006-07-11. + +2006-11-25 Chong Yidong <cyd@stupidchicken.com> + + * window.c (set_window_buffer): Use BLOCK_INPUT. + +2006-11-24 Juanma Barranquero <lekktu@gmail.com> + + * fns.c (substring_both): Add missing address operator. + +2006-11-24 Stefan Monnier <monnier@iro.umontreal.ca> + + * fns.c: Use AREF/ASIZE macros. + (concat): Provide the full ANSI prototype. + +2006-11-24 Juanma Barranquero <lekktu@gmail.com> + + * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix. + +2006-11-23 William Smith <William.Smith@global360.com> (tiny change) + + * strftime.c (HAVE_SYS__MBSTATE_T_H): Fix typo. + +2006-11-02 Alfred M. Szmidt <ams@gnu.org> (tiny change) + + * s/openbsd.h (LD_SWITCH_SYSTEM): Remove /usr/pkg/lib and + /usr/pkg/lib from the library search path. + (LD_SWITCH_X_DEFAULT): New macro. + +2006-11-22 Chong Yidong <cyd@stupidchicken.com> + + * window.c (set_window_buffer): Clear mouse highlight if it is in + this window. + +2006-11-21 Chong Yidong <cyd@stupidchicken.com> + + * xfaces.c (realize_default_face): Check if the default font name + exists on this display before trying to use it. + 2006-11-21 Richard Stallman <rms@gnu.org> * fileio.c: Break line before &&, not after. @@ -18,15 +162,13 @@ 2006-11-19 Andreas Schwab <schwab@gnu.org> - * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize - supports. + * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize supports. * xmenu.c (Fx_popup_menu): Initialize selection. 2006-11-18 Andreas Schwab <schwab@suse.de> - * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to - mark_memory. + * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to mark_memory. 2006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change) @@ -44,8 +186,7 @@ 2006-11-14 Kenichi Handa <handa@m17n.org> - * coding.c (code_convert_region): Initialize - coding->heading_ascii. + * coding.c (code_convert_region): Initialize coding->heading_ascii. (decode_coding_string, code_convert_region): Likewise. 2006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> @@ -142,7 +283,7 @@ 2006-11-05 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change) - * s/netbsd.h (POSIX_SIGNALS): Defined. + * s/netbsd.h (POSIX_SIGNALS): Define. 2006-11-05 Martin Rudalics <rudalics@gmx.at> @@ -175,8 +316,8 @@ (unexec_regions_merge): Don't merge if null pages of preceding region is not too small. Use long format in printf. (copy_segment, copy_data_segment): Show filesize. - (copy_data_segment): Write filesize bytes of region data. Adjust - filesize in segment command accordingly. + (copy_data_segment): Write filesize bytes of region data. + Adjust filesize in segment command accordingly. (dump_it): Use long format in printf. 2006-11-05 Juanma Barranquero <lekktu@gmail.com> @@ -275,8 +416,8 @@ `swap_nibbles' static const. (atsu_get_text_layout_with_text_ptr): Make variables `lengths', `tags', `sizes', `values' static const. - (mac_draw_string_common): Make variables `context' static. Make - variables `tags', `sizes', and `values' static const. + (mac_draw_string_common): Make variables `context' static. + Make variables `tags', `sizes', and `values' static const. (pcm_get_status, x_detect_focus_change, x_scroll_bar_handle_click) (xlfdpat_create, xlfdpat_block_match_1, xlfdpat_match) (mac_to_x_fontname, parse_x_font_name, add_mac_font_name) @@ -287,8 +428,8 @@ (fn_keycode_to_keycode_table): Make static const. (mac_load_query_font): Make variables `tags', `sizes', `values', `types', and `selectors' static const. - (mac_handle_command_event, mac_handle_window_event): Make - variables `names' and `types' static const. + (mac_handle_command_event, mac_handle_window_event): + Make variables `names' and `types' static const. (init_command_handler, install_window_handler): Make variables `specs*' static const. (mac_handle_font_event, mac_handle_text_input_event) @@ -375,12 +516,12 @@ 2006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * xselect.c (x_handle_selection_request): If the converted_selection - is NIL or XCDR (converted_selection) is NIL, decline the request. + is nil or XCDR (converted_selection) is nil, decline the request. 2006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * gtkutil.c (get_utf8_string): Remove warnings with casts. - (xg_tool_bar_button_cb): Ditto + (xg_tool_bar_button_cb): Ditto. (xg_tool_bar_callback): Ditto. 2006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> @@ -2480,8 +2621,8 @@ (struct sound_device): Add period_size. (wav_play, au_play): Use period_size if set. - * Makefile.in (CFLAGS_SOUND): New flags for ALSA - (ALL_CFLAGS): Add CFLAGS_SOUND + * Makefile.in (CFLAGS_SOUND): New flags for ALSA. + (ALL_CFLAGS): Add CFLAGS_SOUND. 2006-05-18 Kenichi Handa <handa@m17n.org> @@ -4105,8 +4246,8 @@ 2006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> - * gtkutil.c (update_frame_tool_bar): Use new tool bar functions - (gtk_toolbar_insert) so we can have tool bars of different sizes. + * gtkutil.c (update_frame_tool_bar): Use new tool bar function + gtk_toolbar_insert() so we can have tool bars of different sizes. 2006-01-30 Luc Teirlinck <teirllm@auburn.edu> @@ -4434,7 +4575,7 @@ 2005-12-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> - * xfns.c: x_show_hidden_files, new variable. + * xfns.c (x_show_hidden_files): New variable. (syms_of_xfns): Defvar it. * gtkutil.c (xg_toggle_visibility_cb): New function. @@ -6719,7 +6860,7 @@ * w32console.c (initialize_w32_display): Detect when the console dimensions are insane, and default to 80x25 instead. - (w32_use_full_screen_buffer): Default to NIL. + (w32_use_full_screen_buffer): Default to nil. 2005-07-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> @@ -9928,7 +10069,7 @@ * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff for left and top calculations. Remove call to x_real_positions. - [Bug report by Drew Adams in November] + [Bug report by Drew Adams in November.] (x_check_expected_move): Do not set change_gravity to 1 when calling x_set_offset. @@ -9978,8 +10119,8 @@ new variables main_thread and alloc_mutex, define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread. - If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same as - (UN)BLOCK_INPUT. + If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same + as (UN)BLOCK_INPUT. (emacs_blocked_free, emacs_blocked_malloc) (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC. (uninterrupt_malloc): Initialize main_thread and alloc_mutex. @@ -9989,7 +10130,7 @@ * emacs.c (Fdump_emacs): Call reset_malloc_hooks. - * keyboard.c: Conditionally include pthread.h + * keyboard.c: Conditionally include pthread.h. (handle_async_input, input_available_signalt): If not in the main thread, block signal, send signal to main thread and return. @@ -10799,7 +10940,7 @@ 2004-11-02 Kim F. Storm <storm@cua.dk> - * Makefile.in (callproc.o): Depend on blockinput.h atimer.h systime.h. + * Makefile.in (callproc.o): Depend on blockinput.h, atimer.h, systime.h. 2004-11-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> @@ -10860,10 +11001,9 @@ * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. Check only_dir_p instead of comparing prompt to "Dired". - * gtkutil.c (xg_get_file_with_chooser) - (xg_get_file_with_selection): New functions, only defined ifdef - HAVE_GTK_FILE_CHOOSER_DIALOG_NEW and HAVE_GTK_FILE_SELECTION_NEW - respectively. + * gtkutil.c (xg_get_file_with_chooser, xg_get_file_with_selection): + New functions, only defined ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW + and HAVE_GTK_FILE_SELECTION_NEW respectively. (xg_get_file_name): Add parameter only_dir_p. Call xg_get_file_with_chooser or xg_get_file_with_selection depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog. @@ -10900,7 +11040,7 @@ tool_bar_items to assignment of result. * atimer.c (alarm_signal_handler): Do not call set_alarm if - pending_atmers is non-zero. + pending_atimers is non-zero. 2004-10-31 Kim F. Storm <storm@cua.dk> @@ -11238,7 +11378,7 @@ precedence. (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. -2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> +2004-10-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * config.in: Regenerate. @@ -14515,14 +14655,14 @@ * xterm.c (handle_one_xevent): Call x_handle_dnd_message for ClientMessages. - * xselect.c: Include termhooks.h and X11/Xproto.h + * xselect.c: Include termhooks.h and X11/Xproto.h. (x_check_property_data, x_fill_property_data) (x_property_data_to_lisp, mouse_position_for_drop) (Fx_get_atom_name, x_handle_dnd_message): New functions for DND support. (Fx_send_client_event): Move here from xfns.c. (syms_of_xselect): Add Sx_get_atom_name and Sx_send_client_message. - * xfns.c (x-send-client-message): Move to xselect.c + * xfns.c (x-send-client-message): Move to xselect.c. (Fx_change_window_property): Add optional arguments TYPE, FORMAT and OUTER_P. (Fx_window_property): Add optional arguments TYPE, SOURCE, DELETE_P, @@ -15617,7 +15757,7 @@ Set BUF_INTERVALS (buffer)->up_obj when appropriate. Handle over_used when splitting UNDER. -2003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> +2003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * regex.c (regex_compile): Free the stack when returning from function. @@ -18083,7 +18223,7 @@ 2003-03-23 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> - * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif + * xdisp.c (get_glyph_string_clip_rect): Remove ; at end of #endif. * gtkutil.h: Take two more arguments to xg_update_scrollbar_pos. (XG_SB_RANGE): New define. @@ -18320,7 +18460,7 @@ * gtkutil.c: Removed handle_fixed_child, struct xg_last_sb_pos. (xg_resize_widgets): Don't call foreach(handle_fixed_child). (xg_gtk_scroll_destroy): Remove free of struct xg_last_sb_pos. - (scroll_bar_button_cb): Set bar->dragging to NIL on button release. + (scroll_bar_button_cb): Set bar->dragging to nil on button release. (xg_create_scroll_bar): Pass bar to button event callback. (xg_find_top_left_in_fixed): New function. (xg_update_scrollbar_pos): Don't call gdk_window_clear on @@ -18621,7 +18761,7 @@ 2003-02-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> * keyboard.c (cancel_hourglass_unwind): Surround with - #ifdef HAVE_X_WINDOWS + #ifdef HAVE_X_WINDOWS. 2003-02-25 Kenichi Handa <handa@m17n.org> @@ -19182,7 +19322,7 @@ 2003-01-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> - * gtkutil.c: Must include stdio.h before termhooks.h + * gtkutil.c: Must include stdio.h before termhooks.h. 2003-01-21 Dave Love <fx@gnu.org> @@ -19228,7 +19368,7 @@ * xterm.c (handle_one_xevent): Surround popup_activated with #ifdef:s for non-toolkit version. - * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK + * Makefile.in (XOBJ): Add gtkutil.o if USE_GTK. (gtkutil.o): New file. (TOOLKIT_DEFINES): Set to -DUSE_GTK if HAVE_GTK. (LIBW): Set to @GTK_LIBS@ if USE_GTK. @@ -19274,7 +19414,7 @@ (syms_of_xterm): Set Vx_toolkit_scroll_bars for USE_GTK. * xmenu.c: Include gtkutil.h for USE_GTK. - (Fx_popup_menu): Use current position if x and y is NIL. + (Fx_popup_menu): Use current position if x and y are nil. (single_menu_item, single_menu_item, Fx_popup_dialog): Check for USE_GTK. (popup_widget_loop): New function for USE_GTK. @@ -19304,7 +19444,7 @@ (x_set_tool_bar_lines): Call update_frame_tool_bar for USE_GTK. (x_set_name, x_set_title): Call gtk_window_set_title for USE_GTK. (x_window): Call xg_create_frame_widgets for USE_GTK. - (Fx_create_frame): Check for USE_GTK + (Fx_create_frame): Check for USE_GTK. (Fx_file_dialog): New implementation for USE_GTK. * xdisp.c: Add check for USE_GTK for extern void set_frame_menubar. @@ -19331,7 +19471,7 @@ * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Add check for USE_GTK. - * config.in: Added HAVE_GTK + * config.in: Added HAVE_GTK. * alloc.c (Fgarbage_collect): Call xg_mark_data for GTK. @@ -19855,7 +19995,7 @@ * alloca.c: Undo ifdef change accidentally made on 12-04. -2002-12-06 Francesco Potorti` <pot@gnu.org> +2002-12-06 Francesco Potort,Al(B <pot@gnu.org> * xfns.c (png_load): Avoid double gamma correction for PNG images. @@ -20176,7 +20316,7 @@ * fns.c (Fcopy_sequence): Doc fix. (Fmap_char_table): Cast `call2'. -2002-11-14 Francesco Potorti` <pot@gnu.org> +2002-11-14 Francesco Potort,Al(B <pot@gnu.org> * s/sol2-8.h: New file. @@ -20557,7 +20697,7 @@ Only when it is non-nil, handle composition sequence. (setup_coding_system) <0>: Don't force composition handling. - * Makefile.in (lisp, shortlisp): Add utf-16.elc + * Makefile.in (lisp, shortlisp): Add utf-16.elc. 2002-09-29 Richard M. Stallman <rms@gnu.org> 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@ LDFLAGS=@LDFLAGS@ LN_S=@LN_S@ EXEEXT=@EXEEXT@ +version=@version@ # Substitute an assignment for the MAKE variable, because # BSD doesn't have it as a default. @SET_MAKE@ @@ -1347,11 +1348,11 @@ ${emacsapp}Contents/Resources/Emacs.rsrc: ../mac/src/Emacs.r ${libsrc}emacstool${EXEEXT}: ${libsrc}emacstool.c cd ${libsrc}; ${MAKE} ${MFLAGS} emacstool${EXEEXT} bootstrapclean: - rm -f bootstrap-emacs${EXEEXT} + rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} mostlyclean: rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a rm -f ../etc/DOC - rm -f bootstrap-emacs${EXEEXT} + rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT} rm -f buildobj.lst clean: mostlyclean 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; Lisp_Object Vpre_abbrev_expand_hook, Qpre_abbrev_expand_hook; -Lisp_Object Qsystem_type, Qcount; +Lisp_Object Qsystem_type, Qcount, Qforce; DEFUN ("make-abbrev-table", Fmake_abbrev_table, Smake_abbrev_table, 0, 0, 0, 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, XVECTOR (table)->contents[i] = make_number (0); return Qnil; } - + DEFUN ("define-abbrev", Fdefine_abbrev, Sdefine_abbrev, 3, 6, 0, doc: /* Define an abbrev in TABLE named NAME, to expand to EXPANSION and call HOOK. NAME must be a string. @@ -123,7 +123,9 @@ usage-count, which is incremented each time the abbrev is used. \(The default is zero.) SYSTEM-FLAG, if non-nil, says that this is a "system" abbreviation -which should not be saved in the user's abbreviation file. */) +which should not be saved in the user's abbreviation file. +Unless SYSTEM-FLAG is `force', a system abbreviation will not +overwrite a non-system abbreviation of the same name. */) (table, name, expansion, hook, count, system_flag) Lisp_Object table, name, expansion, hook, count, system_flag; { @@ -131,6 +133,16 @@ which should not be saved in the user's abbreviation file. */) CHECK_VECTOR (table); CHECK_STRING (name); + /* If defining a system abbrev, do not overwrite a non-system abbrev + of the same name, unless 'force is used. */ + if (!NILP (system_flag) && !EQ (system_flag, Qforce)) + { + sym = Fintern_soft (name, table); + + if (!NILP (SYMBOL_VALUE (sym)) && + NILP (Fplist_get (XSYMBOL (sym)->plist, Qsystem_type))) return Qnil; + } + if (NILP (count)) count = make_number (0); else @@ -646,6 +658,9 @@ syms_of_abbrev () Qcount = intern ("count"); staticpro (&Qcount); + Qforce = intern ("force"); + staticpro (&Qforce); + DEFVAR_LISP ("abbrev-table-name-list", &Vabbrev_table_name_list, doc: /* List of symbols whose values are abbrev tables. */); 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 location given by the integer. Undoing an entry of this form places point at POSITION. -nil marks undo boundaries. The undo command treats the changes -between two undo boundaries as a single step to be undone. +Entries with value `nil' mark undo boundaries. The undo command treats +the changes between two undo boundaries as a single step to be undone. If the value of the variable is t, undo information is not recorded. */); 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 @@ /* src/config.in. Generated from configure.in by autoheader. */ /* GNU Emacs site configuration template file. - Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004, 2005, 2006 + Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -577,6 +577,9 @@ Boston, MA 02110-1301, USA. */ /* Define to 1 if `struct utimbuf' is declared by <utime.h>. */ #undef HAVE_STRUCT_UTIMBUF +/* Define to 1 if you have the `sync' function. */ +#undef HAVE_SYNC + /* Define to 1 if you have the `sysinfo' function. */ #undef HAVE_SYSINFO @@ -700,6 +703,9 @@ Boston, MA 02110-1301, USA. */ /* Define to 1 if you have the X11R6 or newer version of Xt. */ #undef HAVE_X11XTR6 +/* Define to 1 if the file /usr/lib64 exists. */ +#undef HAVE_X86_64_LIB64_DIR + /* Define to 1 if you have the Xaw3d library (-lXaw3d). */ #undef HAVE_XAW3D 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; #endif -#ifdef SIGUSR1 +#if defined (SIGUSR1) || defined (SIGUSR2) SIGTYPE -handle_USR1_signal (sig) +handle_user_signal (sig) int sig; { struct input_event buf; @@ -374,25 +374,10 @@ handle_USR1_signal (sig) buf.frame_or_window = selected_frame; kbd_buffer_store_event (&buf); -} -#endif /* SIGUSR1 */ - -#ifdef SIGUSR2 -SIGTYPE -handle_USR2_signal (sig) - int sig; -{ - struct input_event buf; - - SIGNAL_THREAD_CHECK (sig); - bzero (&buf, sizeof buf); - buf.kind = USER_SIGNAL_EVENT; - buf.code = 1; - buf.frame_or_window = selected_frame; - + buf.code = sig; kbd_buffer_store_event (&buf); } -#endif /* SIGUSR2 */ +#endif /* Handle bus errors, invalid instruction, etc. */ SIGTYPE @@ -1229,10 +1214,10 @@ main (argc, argv signal (SIGILL, fatal_error_signal); signal (SIGTRAP, fatal_error_signal); #ifdef SIGUSR1 - signal (SIGUSR1, handle_USR1_signal); -#ifdef SIGUSR2 - signal (SIGUSR2, handle_USR2_signal); + signal (SIGUSR1, handle_user_signal); #endif +#ifdef SIGUSR2 + signal (SIGUSR2, handle_user_signal); #endif #ifdef SIGABRT 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 return Qt; } -#ifdef __NetBSD__ -#define unix 42 -#endif - -#ifdef unix +#ifdef HAVE_SYNC DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", doc: /* Tell Unix to finish all pending disk updates. */) () @@ -3559,7 +3555,7 @@ DEFUN ("unix-sync", Funix_sync, Sunix_sync, 0, 0, "", return Qnil; } -#endif /* unix */ +#endif /* HAVE_SYNC */ DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, doc: /* Return t if file FILE1 is newer than file FILE2. @@ -6709,7 +6705,7 @@ A non-nil value may result in data loss! */); defsubr (&Sread_file_name); defsubr (&Snext_read_file_uses_dialog_p); -#ifdef unix +#ifdef HAVE_SYNC defsubr (&Sunix_sync); #endif } 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'. */) if (STRINGP (sequence)) XSETFASTINT (val, SCHARS (sequence)); else if (VECTORP (sequence)) - XSETFASTINT (val, XVECTOR (sequence)->size); + XSETFASTINT (val, ASIZE (sequence)); else if (CHAR_TABLE_P (sequence)) XSETFASTINT (val, MAX_CHAR); else if (BOOL_VECTOR_P (sequence)) XSETFASTINT (val, XBOOL_VECTOR (sequence)->size); else if (COMPILEDP (sequence)) - XSETFASTINT (val, XVECTOR (sequence)->size & PSEUDOVECTOR_SIZE_MASK); + XSETFASTINT (val, ASIZE (sequence) & PSEUDOVECTOR_SIZE_MASK); else if (CONSP (sequence)) { i = 0; @@ -389,9 +389,9 @@ Symbols are also allowed; their print names are used instead. */) /* "gcc -O3" enables automatic function inlining, which optimizes out the arguments for the invocations of this function, whereas it expects these values on the stack. */ -static Lisp_Object concat () __attribute__((noinline)); +static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)) __attribute__((noinline)); #else /* !__GNUC__ */ -static Lisp_Object concat (); +static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)); #endif /* ARGSUSED */ @@ -576,7 +576,7 @@ concat (nargs, args, target_type, last_special) if (VECTORP (this)) for (i = 0; i < len; i++) { - ch = XVECTOR (this)->contents[i]; + ch = AREF (this, i); CHECK_CHARACTER (ch); this_len_byte = CHAR_BYTES (XINT (ch)); result_len_byte += this_len_byte; @@ -727,7 +727,7 @@ concat (nargs, args, target_type, last_special) thisindex++; } else - elt = XVECTOR (this)->contents[thisindex++]; + elt = AREF (this, thisindex++); /* Store this element into the result. */ if (toindex < 0) @@ -737,7 +737,7 @@ concat (nargs, args, target_type, last_special) tail = XCDR (tail); } else if (VECTORP (val)) - XVECTOR (val)->contents[toindex++] = elt; + AREF (val, toindex++) = elt; else { CHECK_NUMBER (elt); @@ -1180,7 +1180,7 @@ This function allows vectors as well as strings. */) size_byte = SBYTES (string); } else - size = XVECTOR (string)->size; + size = ASIZE (string); if (NILP (to)) { @@ -1218,8 +1218,7 @@ This function allows vectors as well as strings. */) string, make_number (0), res, Qnil); } else - res = Fvector (to_char - from_char, - XVECTOR (string)->contents + from_char); + res = Fvector (to_char - from_char, &AREF (string, from_char)); return res; } @@ -1303,7 +1302,7 @@ substring_both (string, from, from_byte, to, to_byte) size_byte = SBYTES (string); } else - size = XVECTOR (string)->size; + size = ASIZE (string); if (!(0 <= from && from <= to && to <= size)) 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) string, make_number (0), res, Qnil); } else - res = Fvector (to - from, - XVECTOR (string)->contents + from); + res = Fvector (to - from, &AREF (string, from)); return res; } @@ -2180,11 +2178,11 @@ internal_equal (o1, o2, depth, props) case Lisp_Vectorlike: { register int i; - EMACS_INT size = XVECTOR (o1)->size; + EMACS_INT size = ASIZE (o1); /* Pseudovectors have the type encoded in the size field, so this test actually checks that the objects have the same type as well as the same size. */ - if (XVECTOR (o2)->size != size) + if (ASIZE (o2) != size) return 0; /* Boolvectors are compared much like strings. */ if (BOOL_VECTOR_P (o1)) @@ -2215,8 +2213,8 @@ internal_equal (o1, o2, depth, props) for (i = 0; i < size; i++) { Lisp_Object v1, v2; - v1 = XVECTOR (o1)->contents [i]; - v2 = XVECTOR (o2)->contents [i]; + v1 = AREF (o1, i); + v2 = AREF (o2, i); if (!internal_equal (v1, v2, depth + 1, props)) return 0; } @@ -2257,7 +2255,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */) if (VECTORP (array)) { register Lisp_Object *p = XVECTOR (array)->contents; - size = XVECTOR (array)->size; + size = ASIZE (array); for (index = 0; index < size; index++) p[index] = item; } @@ -2422,14 +2420,14 @@ mapcar1 (leni, vals, fn, seq) else GCPRO2 (fn, seq); /* We need not explicitly protect `tail' because it is used only on lists, and - 1) lists are not relocated and 2) the list is marked via `seq' so will not be freed */ + 1) lists are not relocated and 2) the list is marked via `seq' so will not + be freed */ if (VECTORP (seq)) { for (i = 0; i < leni; i++) { - dummy = XVECTOR (seq)->contents[i]; - dummy = call1 (fn, dummy); + dummy = call1 (fn, AREF (seq, i)); if (vals) vals[i] = dummy; } @@ -2440,11 +2438,7 @@ mapcar1 (leni, vals, fn, seq) { int byte; byte = XBOOL_VECTOR (seq)->data[i / BOOL_VECTOR_BITS_PER_CHAR]; - if (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR))) - dummy = Qt; - else - dummy = Qnil; - + dummy = (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR))) ? Qt : Qnil; dummy = call1 (fn, dummy); if (vals) vals[i] = dummy; @@ -3757,7 +3751,7 @@ larger_vector (vec, new_size, init) int i, old_size; xassert (VECTORP (vec)); - old_size = XVECTOR (vec)->size; + old_size = ASIZE (vec); xassert (new_size >= old_size); v = allocate_vector (new_size); @@ -4089,7 +4083,7 @@ maybe_resize_hash_table (h) if (!NILP (HASH_HASH (h, i))) { unsigned hash_code = XUINT (HASH_HASH (h, i)); - int start_of_bucket = hash_code % XVECTOR (h->index)->size; + int start_of_bucket = hash_code % ASIZE (h->index); HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); HASH_INDEX (h, start_of_bucket) = make_number (i); } @@ -4115,7 +4109,7 @@ hash_lookup (h, key, hash) if (hash) *hash = hash_code; - start_of_bucket = hash_code % XVECTOR (h->index)->size; + start_of_bucket = hash_code % ASIZE (h->index); idx = HASH_INDEX (h, start_of_bucket); /* We need not gcpro idx since it's either an integer or nil. */ @@ -4162,7 +4156,7 @@ hash_put (h, key, value, hash) HASH_HASH (h, i) = make_number (hash); /* Add new entry to its collision chain. */ - start_of_bucket = hash % XVECTOR (h->index)->size; + start_of_bucket = hash % ASIZE (h->index); HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket); HASH_INDEX (h, start_of_bucket) = make_number (i); return i; @@ -4181,7 +4175,7 @@ hash_remove (h, key) Lisp_Object idx, prev; hash_code = h->hashfn (h, key); - start_of_bucket = hash_code % XVECTOR (h->index)->size; + start_of_bucket = hash_code % ASIZE (h->index); idx = HASH_INDEX (h, start_of_bucket); prev = Qnil; @@ -4237,8 +4231,8 @@ hash_clear (h) HASH_HASH (h, i) = Qnil; } - for (i = 0; i < XVECTOR (h->index)->size; ++i) - XVECTOR (h->index)->contents[i] = Qnil; + for (i = 0; i < ASIZE (h->index); ++i) + AREF (h->index, i) = Qnil; h->next_free = make_number (0); h->count = make_number (0); @@ -4263,7 +4257,7 @@ sweep_weak_table (h, remove_entries_p) { int bucket, n, marked; - n = XVECTOR (h->index)->size & ~ARRAY_MARK_FLAG; + n = ASIZE (h->index) & ~ARRAY_MARK_FLAG; marked = 0; for (bucket = 0; bucket < n; ++bucket) @@ -4477,13 +4471,13 @@ sxhash_vector (vec, depth) Lisp_Object vec; int depth; { - unsigned hash = XVECTOR (vec)->size; + unsigned hash = ASIZE (vec); int i, n; - n = min (SXHASH_MAX_LEN, XVECTOR (vec)->size); + n = min (SXHASH_MAX_LEN, ASIZE (vec)); for (i = 0; i < n; ++i) { - unsigned hash2 = sxhash (XVECTOR (vec)->contents[i], depth + 1); + unsigned hash2 = sxhash (AREF (vec, i), depth + 1); hash = SXHASH_COMBINE (hash, hash2); } 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) struct image *img; Lisp_Object image; GtkWidget *wicon = iter ? GTK_WIDGET (iter->data) : 0; + GtkToolItem *ti = NULL; + GtkWidget *wvbox; + GList *chlist; if (iter) iter = g_list_next (iter); @@ -3723,22 +3726,40 @@ update_frame_tool_bar (f) if (wicon) gtk_widget_hide (wicon); else + /* Insert an empty (non-image) button */ gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), gtk_tool_button_new (NULL, ""), i); continue; } - if (! wicon) + if (wicon) { - GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); - GtkToolItem *ti = gtk_tool_button_new (w, ""); + /* The child of the tool bar is a button. Inside that button + is a vbox. Inside that vbox is the GtkImage. */ + wvbox = gtk_bin_get_child (GTK_BIN (wicon)); + chlist = gtk_container_get_children (GTK_CONTAINER (wvbox)); + if (chlist == NULL) + /* In this case, we inserted an empty button (above) with no image */ + ti = GTK_TOOL_ITEM (wicon); + } + if (! wicon || ti != NULL) + { + GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); - gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), - ti, - i); + + if (ti == NULL) + { + ti = gtk_tool_button_new (w, ""); + + gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget), ti, i); + } + else + gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (ti), w); + + /* The EMACS_INT cast avoids a warning. */ g_signal_connect (GTK_WIDGET (ti), "clicked", 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) if (!NILP (Vthrow_on_input) && event->kind != FOCUS_IN_EVENT && event->kind != HELP_EVENT - && event->kind != DEICONIFY_EVENT) + && event->kind != DEICONIFY_EVENT + && !(event->kind == USER_SIGNAL_EVENT && event->code == 0)) { Vquit_flag = Vthrow_on_input; /* If we're inside a function that wants immediate quits, @@ -5073,13 +5074,7 @@ Lisp_Object *scroll_bar_parts[] = { }; /* User signal events. */ -Lisp_Object Qusr1_signal, Qusr2_signal; - -Lisp_Object *lispy_user_signals[] = -{ - &Qusr1_signal, &Qusr2_signal -}; - +Lisp_Object Qsignal; /* A vector, indexed by button number, giving the down-going location of currently depressed buttons, both scroll bar and non-scroll bar. @@ -5706,7 +5701,7 @@ make_lispy_event (event) position = make_lispy_position (f, &event->x, &event->y, event->timestamp); - /* Set double or triple modifiers to indicate the wheel speed. */ + /* Set double or triple modifiers to indicate the wheel speed. */ { /* On window-system frames, use the value of double-click-fuzz as is. On other frames, interpret it @@ -5760,7 +5755,7 @@ make_lispy_event (event) if (event->modifiers & up_modifier) { - /* Emit a wheel-up event. */ + /* Emit a wheel-up event. */ event->modifiers &= ~up_modifier; symbol_num = 0; } @@ -5775,7 +5770,7 @@ make_lispy_event (event) the up_modifier set. */ abort (); - /* Get the symbol we should use for the wheel event. */ + /* Get the symbol we should use for the wheel event. */ head = modify_event_symbol (symbol_num, event->modifiers, Qmouse_click, @@ -5953,7 +5948,21 @@ make_lispy_event (event) case USER_SIGNAL_EVENT: /* A user signal. */ - return *lispy_user_signals[event->code]; + switch (event->code) + { + case 0: + return Qsignal; +#ifdef SIGUSR1 + case SIGUSR1: + return intern ("usr1"); +#endif +#ifdef SIGUSR2 + case SIGUSR2: + return intern ("usr2"); +#endif + default: + return make_number (event->code); + } case SAVE_SESSION_EVENT: return Qsave_session; @@ -11025,10 +11034,8 @@ syms_of_keyboard () staticpro (&Qmac_apple_event); #endif - Qusr1_signal = intern ("usr1-signal"); - staticpro (&Qusr1_signal); - Qusr2_signal = intern ("usr2-signal"); - staticpro (&Qusr2_signal); + Qsignal = intern ("signal"); + staticpro (&Qsignal); Qmenu_enable = intern ("menu-enable"); 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. */ #else /* !__OpenBSD__ && !__FreeBSD__ */ #undef START_FILES +#ifdef HAVE_X86_64_LIB64_DIR #define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o +#else +#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o +#endif /* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. The reason is that some functions in libgcc.a call functions from libc.a, @@ -136,7 +140,11 @@ Boston, MA 02110-1301, USA. */ versions of ld are one-pass linkers, we need to mention -lgcc twice, or else we risk getting unresolved externals. */ #undef LIB_STANDARD +#ifdef HAVE_X86_64_LIB64_DIR #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o +#else +#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o +#endif #endif /* __FreeBSD__ */ 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. */ #define IBMR2AIX /* Use type int rather than a union, to represent Lisp_Object */ -/* This is desirable for most machines. */ +/* This is desirable for most machines. */ #define NO_UNION_TYPE @@ -72,7 +72,7 @@ Boston, MA 02110-1301, USA. */ /* The data segment in this machine always starts at address 0x20000000. An address of data cannot be stored correctly in a Lisp object; - we always lose the high bits. We must tell XPNTR to add them back. */ + we always lose the high bits. We must tell XPNTR to add them back. */ #ifndef USG5_4 #define DATA_SEG_BITS 0x20000000 @@ -86,7 +86,7 @@ Boston, MA 02110-1301, USA. */ #define PURE_SEG_BITS 0x30000000 /* Use shared memory. */ -/* This is turned off because it does not always work. See etc/AIX.DUMP. */ +/* This is turned off because it does not always work. See etc/AIX.DUMP. */ /* #define HAVE_SHM */ #define SHMKEY 5305035 /* used for shared memory code segments */ #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. */ #define NO_REMAP /* Define TEXT_START_ADDR if your linker don't set execute point to _start. - If it needed, temacs always CORE-DUMP. */ + If it needed, temacs always CORE-DUMP. */ #define TEXT_START_ADDR __start 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) #define Ctrl 0x0200 /* ctrl scan-code */ #define Shift 0x0400 /* shift scan-code */ -static int extended_kbd; /* 101 (102) keyboard present. */ +static int extended_kbd; /* 101 (102) keyboard present. */ struct kbd_translate { 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. */ #include "atimer.h" Lisp_Object Qprocessp; -Lisp_Object Qrun, Qstop, Qsignal; +Lisp_Object Qrun, Qstop; +extern Lisp_Object Qsignal; Lisp_Object Qopen, Qclosed, Qconnect, Qfailed, Qlisten; Lisp_Object Qlocal, Qipv4, Qdatagram; #ifdef AF_INET6 @@ -6127,8 +6128,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) got_it: -#define handle_signal(NAME, VALUE) \ - else if (!strcmp (name, NAME)) \ +#define parse_signal(NAME, VALUE) \ + else if (!strcasecmp (name, NAME)) \ XSETINT (sigcode, VALUE) if (INTEGERP (sigcode)) @@ -6140,106 +6141,106 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) CHECK_SYMBOL (sigcode); name = SDATA (SYMBOL_NAME (sigcode)); - if (!strncmp(name, "SIG", 3)) + if (!strncasecmp(name, "sig", 3)) name += 3; if (0) ; +#ifdef SIGUSR1 + parse_signal ("usr1", SIGUSR1); +#endif +#ifdef SIGUSR2 + parse_signal ("usr2", SIGUSR2); +#endif +#ifdef SIGTERM + parse_signal ("term", SIGTERM); +#endif #ifdef SIGHUP - handle_signal ("HUP", SIGHUP); + parse_signal ("hup", SIGHUP); #endif #ifdef SIGINT - handle_signal ("INT", SIGINT); + parse_signal ("int", SIGINT); #endif #ifdef SIGQUIT - handle_signal ("QUIT", SIGQUIT); + parse_signal ("quit", SIGQUIT); #endif #ifdef SIGILL - handle_signal ("ILL", SIGILL); + parse_signal ("ill", SIGILL); #endif #ifdef SIGABRT - handle_signal ("ABRT", SIGABRT); + parse_signal ("abrt", SIGABRT); #endif #ifdef SIGEMT - handle_signal ("EMT", SIGEMT); + parse_signal ("emt", SIGEMT); #endif #ifdef SIGKILL - handle_signal ("KILL", SIGKILL); + parse_signal ("kill", SIGKILL); #endif #ifdef SIGFPE - handle_signal ("FPE", SIGFPE); + parse_signal ("fpe", SIGFPE); #endif #ifdef SIGBUS - handle_signal ("BUS", SIGBUS); + parse_signal ("bus", SIGBUS); #endif #ifdef SIGSEGV - handle_signal ("SEGV", SIGSEGV); + parse_signal ("segv", SIGSEGV); #endif #ifdef SIGSYS - handle_signal ("SYS", SIGSYS); + parse_signal ("sys", SIGSYS); #endif #ifdef SIGPIPE - handle_signal ("PIPE", SIGPIPE); + parse_signal ("pipe", SIGPIPE); #endif #ifdef SIGALRM - handle_signal ("ALRM", SIGALRM); -#endif -#ifdef SIGTERM - handle_signal ("TERM", SIGTERM); + parse_signal ("alrm", SIGALRM); #endif #ifdef SIGURG - handle_signal ("URG", SIGURG); + parse_signal ("urg", SIGURG); #endif #ifdef SIGSTOP - handle_signal ("STOP", SIGSTOP); + parse_signal ("stop", SIGSTOP); #endif #ifdef SIGTSTP - handle_signal ("TSTP", SIGTSTP); + parse_signal ("tstp", SIGTSTP); #endif #ifdef SIGCONT - handle_signal ("CONT", SIGCONT); + parse_signal ("cont", SIGCONT); #endif #ifdef SIGCHLD - handle_signal ("CHLD", SIGCHLD); + parse_signal ("chld", SIGCHLD); #endif #ifdef SIGTTIN - handle_signal ("TTIN", SIGTTIN); + parse_signal ("ttin", SIGTTIN); #endif #ifdef SIGTTOU - handle_signal ("TTOU", SIGTTOU); + parse_signal ("ttou", SIGTTOU); #endif #ifdef SIGIO - handle_signal ("IO", SIGIO); + parse_signal ("io", SIGIO); #endif #ifdef SIGXCPU - handle_signal ("XCPU", SIGXCPU); + parse_signal ("xcpu", SIGXCPU); #endif #ifdef SIGXFSZ - handle_signal ("XFSZ", SIGXFSZ); + parse_signal ("xfsz", SIGXFSZ); #endif #ifdef SIGVTALRM - handle_signal ("VTALRM", SIGVTALRM); + parse_signal ("vtalrm", SIGVTALRM); #endif #ifdef SIGPROF - handle_signal ("PROF", SIGPROF); + parse_signal ("prof", SIGPROF); #endif #ifdef SIGWINCH - handle_signal ("WINCH", SIGWINCH); + parse_signal ("winch", SIGWINCH); #endif #ifdef SIGINFO - handle_signal ("INFO", SIGINFO); -#endif -#ifdef SIGUSR1 - handle_signal ("USR1", SIGUSR1); -#endif -#ifdef SIGUSR2 - handle_signal ("USR2", SIGUSR2); + parse_signal ("info", SIGINFO); #endif else error ("Undefined signal name %s", name); } -#undef handle_signal +#undef parse_signal return make_number (kill (pid, XINT (sigcode))); } @@ -6985,8 +6986,6 @@ syms_of_process () staticpro (&Qrun); Qstop = intern ("stop"); staticpro (&Qstop); - Qsignal = intern ("signal"); - staticpro (&Qsignal); /* Qexit is already staticpro'd by syms_of_eval; don't staticpro it 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 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + USA. */ /* TODO: - structure the opcode space into opcode+flag. @@ -139,7 +139,7 @@ # endif # define free xfree -/* Converts the pointer to the char to BEG-based offset from the start. */ +/* Converts the pointer to the char to BEG-based offset from the start. */ # define PTR_TO_OFFSET(d) POS_AS_IN_BUFFER (POINTER_TO_OFFSET (d)) # define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object))) @@ -565,7 +565,7 @@ init_syntax_once () # define REGEX_REALLOCATE_STACK(source, osize, nsize) \ REGEX_REALLOCATE (source, osize, nsize) -/* No need to explicitly free anything. */ +/* No need to explicitly free anything. */ # define REGEX_FREE_STACK(arg) ((void)0) # endif /* not REGEX_MALLOC */ @@ -679,7 +679,7 @@ typedef enum jump, /* Followed by two-byte relative address of place to resume at - in case of failure. */ + in case of failure. */ on_failure_jump, /* Like on_failure_jump, but pushes a placeholder instead of the @@ -716,7 +716,7 @@ typedef enum jump_n, /* Set the following two-byte relative address to the - subsequent two-byte number. The address *includes* the two + subsequent two-byte number. The address *includes* the two bytes of number. */ set_number_at, @@ -724,7 +724,7 @@ typedef enum wordend, /* Succeeds if at word end. */ wordbound, /* Succeeds if at a word boundary. */ - notwordbound, /* Succeeds if not at a word boundary. */ + notwordbound, /* Succeeds if not at a word boundary. */ symbeg, /* Succeeds if at symbol beginning. */ symend, /* Succeeds if at symbol end. */ @@ -742,8 +742,8 @@ typedef enum after_dot, /* Succeeds if after point. */ /* Matches any character whose category-set contains the specified - category. The operator is followed by a byte which contains a - category code (mnemonic ASCII character). */ + category. The operator is followed by a byte which contains a + category code (mnemonic ASCII character). */ categoryspec, /* Matches any character whose category-set does not contain the @@ -832,7 +832,7 @@ extract_number_and_incr (destination, source) /* Store a multibyte character in three contiguous bytes starting DESTINATION, and increment DESTINATION to the byte after where the - character is stored. Therefore, DESTINATION must be an lvalue. */ + character is stored. Therefore, DESTINATION must be an lvalue. */ #define STORE_CHARACTER_AND_INCR(destination, character) \ do { \ @@ -843,7 +843,7 @@ extract_number_and_incr (destination, source) } while (0) /* Put into DESTINATION a character stored in three contiguous bytes - starting at SOURCE. */ + starting at SOURCE. */ #define EXTRACT_CHARACTER(destination, source) \ do { \ @@ -879,13 +879,13 @@ extract_number_and_incr (destination, source) && (p)[2 + (c) / BYTEWIDTH] & (1 << ((c) % BYTEWIDTH))) /* Return the address of end of RANGE_TABLE. COUNT is number of - ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2' - is start of range and end of range. `* 3' is size of each start + ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2' + is start of range and end of range. `* 3' is size of each start and end. */ #define CHARSET_RANGE_TABLE_END(range_table, count) \ ((range_table) + (count) * 2 * 3) -/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in. +/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in. COUNT is number of ranges in RANGE_TABLE. */ #define CHARSET_LOOKUP_RANGE_TABLE_RAW(not, c, range_table, count) \ do \ @@ -1692,7 +1692,7 @@ do { \ REGSTART, REGEND -- arrays of string positions. Also assumes the variables `fail_stack' and (if debugging), `bufp', - `pend', `string1', `size1', `string2', and `size2'. */ + `pend', `string1', `size1', `string2', and `size2'. */ #define POP_FAILURE_POINT(str, pat) \ do { \ @@ -1961,7 +1961,7 @@ struct range_table_work_area { int *table; /* actual work area. */ int allocated; /* allocated size for work area in bytes. */ - int used; /* actually used size in words. */ + int used; /* actually used size in words. */ int bits; /* flag to record character classes */ }; @@ -2000,7 +2000,7 @@ struct range_table_work_area (work_area).table[(work_area).used++] = (range_end); \ } while (0) -/* Free allocated memory for WORK_AREA. */ +/* Free allocated memory for WORK_AREA. */ #define FREE_RANGE_TABLE_WORK_AREA(work_area) \ do { \ if ((work_area).table) \ @@ -2534,7 +2534,7 @@ regex_compile (pattern, size, syntax, bufp) re_char *beg_interval; /* Address of the place where a forward jump should go to the end of - the containing expression. Each alternative of an `or' -- except the + the containing expression. Each alternative of an `or' -- except the last -- ends with a forward jump of this sort. */ unsigned char *fixup_alt_jump = 0; @@ -2609,11 +2609,11 @@ regex_compile (pattern, size, syntax, bufp) if (bufp->buffer) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but - that is the user's responsibility. */ + that is the user's responsibility. */ RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char); } else - { /* Caller did not allocate a buffer. Do it for them. */ + { /* Caller did not allocate a buffer. Do it for them. */ bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char); } if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE); @@ -2677,15 +2677,15 @@ regex_compile (pattern, size, syntax, bufp) p = pattern = whitespace_regexp; pend = p + strlen (p); break; - } + } case '^': { - if ( /* If at start of pattern, it's an operator. */ + if ( /* If at start of pattern, it's an operator. */ p == pattern + 1 - /* If context independent, it's an operator. */ + /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS - /* Otherwise, depends on what's come before. */ + /* Otherwise, depends on what's come before. */ || at_begline_loc_p (pattern, p, syntax)) BUF_PUSH ((syntax & RE_NO_NEWLINE_ANCHOR) ? begbuf : begline); else @@ -2698,7 +2698,7 @@ regex_compile (pattern, size, syntax, bufp) { if ( /* If at end of pattern, it's an operator. */ p == pend - /* If context independent, it's an operator. */ + /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's next. */ || at_endline_loc_p (p, pend, syntax)) @@ -2726,14 +2726,14 @@ regex_compile (pattern, size, syntax, bufp) } { - /* 1 means zero (many) matches is allowed. */ + /* 1 means zero (many) matches is allowed. */ boolean zero_times_ok = 0, many_times_ok = 0; boolean greedy = 1; /* If there is a sequence of repetition chars, collapse it down to just one (the right one). We can't combine interval operators with these because of, e.g., `a{2}*', - which should only match an even number of `a's. */ + which should only match an even number of `a's. */ for (;;) { @@ -2773,7 +2773,7 @@ regex_compile (pattern, size, syntax, bufp) break; /* Now we know whether or not zero matches is allowed - and also whether or not two or more matches is allowed. */ + and also whether or not two or more matches is allowed. */ if (greedy) { if (many_times_ok) @@ -2880,7 +2880,7 @@ regex_compile (pattern, size, syntax, bufp) laststart = b; /* We test `*p == '^' twice, instead of using an if - statement, so we only need one BUF_PUSH. */ + statement, so we only need one BUF_PUSH. */ BUF_PUSH (*p == '^' ? charset_not : charset); if (*p == '^') p++; @@ -2888,7 +2888,7 @@ regex_compile (pattern, size, syntax, bufp) /* Remember the first position in the bracket expression. */ p1 = p; - /* Push the number of bytes in the bitmap. */ + /* Push the number of bytes in the bitmap. */ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH); /* Clear the whole map. */ @@ -2899,7 +2899,7 @@ regex_compile (pattern, size, syntax, bufp) && (syntax & RE_HAT_LISTS_NOT_NEWLINE)) SET_LIST_BIT ('\n'); - /* Read in characters and ranges, setting map bits. */ + /* Read in characters and ranges, setting map bits. */ for (;;) { boolean escaped_char = false; @@ -2923,7 +2923,7 @@ regex_compile (pattern, size, syntax, bufp) } else { - /* Could be the end of the bracket expression. If it's + /* Could be the end of the bracket expression. If it's not (i.e., when the bracket expression is `[]' so far), the ']' character bit gets set way below. */ if (c == ']' && p2 != p1) @@ -2936,7 +2936,7 @@ regex_compile (pattern, size, syntax, bufp) if (!escaped_char && syntax & RE_CHAR_CLASSES && c == '[' && *p == ':') { - /* Leave room for the null. */ + /* Leave room for the null. */ unsigned char str[CHAR_CLASS_MAX_LENGTH + 1]; const unsigned char *class_beg; @@ -3034,7 +3034,7 @@ regex_compile (pattern, size, syntax, bufp) /* Because the `:' may starts the range, we can't simply set bit and repeat the loop. - Instead, just set it to C and handle below. */ + Instead, just set it to C and handle below. */ c = ':'; } } @@ -3095,7 +3095,7 @@ regex_compile (pattern, size, syntax, bufp) } /* Discard any (non)matching list bytes that are all 0 at the - end of the map. Decrease the map-length byte too. */ + end of the map. Decrease the map-length byte too. */ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) b[-1]--; b += b[-1]; @@ -3214,7 +3214,7 @@ regex_compile (pattern, size, syntax, bufp) } /* These are the values to restore when we hit end of this - group. They are all relative offsets, so that if the + group. They are all relative offsets, so that if the whole pattern moves because of realloc, they will still be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; @@ -3270,7 +3270,7 @@ regex_compile (pattern, size, syntax, bufp) { /* We don't just want to restore into `regnum', because later groups should continue to be numbered higher, - as in `(ab)c(de)' -- the second group is #2. */ + as in `(ab)c(de)' -- the second group is #2. */ regnum_t this_group_regnum; compile_stack.avail--; @@ -3287,7 +3287,7 @@ regex_compile (pattern, size, syntax, bufp) pending_exact = 0; /* We're at the end of the group, so now we know how many - groups were inside this one. */ + groups were inside this one. */ if (this_group_regnum <= MAX_REGNUM && this_group_regnum > 0) BUF_PUSH_2 (stop_memory, this_group_regnum); } @@ -3302,7 +3302,7 @@ regex_compile (pattern, size, syntax, bufp) goto normal_char; /* Insert before the previous alternative a jump which - jumps to this alternative if the former fails. */ + jumps to this alternative if the former fails. */ GET_BUFFER_SPACE (3); INSERT_JUMP (on_failure_jump, begalt, b + 6); pending_exact = 0; @@ -3439,7 +3439,7 @@ regex_compile (pattern, size, syntax, bufp) b += 5; /* Code to initialize the lower bound. Insert - before the `succeed_n'. The `5' is the last two + before the `succeed_n'. The `5' is the last two bytes of this `set_number_at', plus 3 bytes of the following `succeed_n'. */ insert_op2 (set_number_at, laststart, 5, lower_bound, b); @@ -3509,7 +3509,7 @@ regex_compile (pattern, size, syntax, bufp) #ifdef emacs /* There is no way to specify the before_dot and after_dot - operators. rms says this is ok. --karl */ + operators. rms says this is ok. --karl */ case '=': BUF_PUSH (at_dot); break; @@ -3654,7 +3654,7 @@ regex_compile (pattern, size, syntax, bufp) /* We have only one byte following the exactn for the count. */ || *pending_exact >= (1 << BYTEWIDTH) - MAX_MULTIBYTE_LENGTH - /* If followed by a repetition operator. */ + /* If followed by a repetition operator. */ || (p != pend && (*p == '*' || *p == '^')) || ((syntax & RE_BK_PLUS_QM) ? p + 1 < pend && *p == '\\' && (p[1] == '+' || p[1] == '?') @@ -3759,7 +3759,7 @@ regex_compile (pattern, size, syntax, bufp) /* Subroutines for `regex_compile'. */ -/* Store OP at LOC followed by two-byte integer parameter ARG. */ +/* Store OP at LOC followed by two-byte integer parameter ARG. */ static void store_op1 (op, loc, arg) @@ -3911,7 +3911,7 @@ analyse_first (p, pend, fastmap, multibyte) boolean not; /* If all elements for base leading-codes in fastmap is set, this - flag is set true. */ + flag is set true. */ boolean match_any_multibyte_characters = false; assert (p); @@ -3959,7 +3959,7 @@ analyse_first (p, pend, fastmap, multibyte) /* Following are the cases which match a character. These end - with `break'. */ + with `break'. */ case exactn: if (fastmap) @@ -4180,7 +4180,7 @@ analyse_first (p, pend, fastmap, multibyte) /* Getting here means we have found the possible starting characters for one path of the pattern -- and that the empty - string does not match. We need not follow this path further. */ + string does not match. We need not follow this path further. */ return 0; } /* while p */ @@ -4215,7 +4215,7 @@ re_compile_fastmap (bufp) assert (fastmap && bufp->buffer); - bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ + bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ bufp->fastmap_accurate = 1; /* It will be when we're done. */ analysis = analyse_first (bufp->buffer, bufp->buffer + bufp->used, @@ -4260,7 +4260,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends) } WEAK_ALIAS (__re_set_registers, re_set_registers) -/* Searching routines. */ +/* Searching routines. */ /* Like re_search_2, below, but only one string is specified, and 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) /* If a fastmap is supplied, skip quickly over characters that cannot be the start of a match. If the pattern can match the null string, however, we don't need to skip characters; we want - the first null string. */ + the first null string. */ if (fastmap && startpos < total_size && !bufp->can_be_null) { register re_char *d; @@ -4407,7 +4407,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop) d = POS_ADDR_VSTRING (startpos); - if (range > 0) /* Searching forwards. */ + if (range > 0) /* Searching forwards. */ { register int lim = 0; int irange = range; @@ -4469,7 +4469,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop) } startpos += irange - range; } - else /* Searching backwards. */ + else /* Searching backwards. */ { int room = (startpos >= size1 ? size2 + size1 - startpos @@ -4598,7 +4598,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, } \ /* Test if at very beginning or at very end of the virtual concatenation - of `string1' and `string2'. If only one string, it's `string2'. */ + of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) #define AT_STRINGS_END(d) ((d) == end2) @@ -4619,7 +4619,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, The DEC Alpha C compiler 3.x generates incorrect code for the test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of - AT_WORD_BOUNDARY, so this code is disabled. Expanding the + AT_WORD_BOUNDARY, so this code is disabled. Expanding the macro and introducing temporary variables works around the bug. */ #if 0 @@ -4821,7 +4821,7 @@ mutually_exclusive_p (bufp, p1, p2) { /* Now, we are sure that P2 has no range table. So, for the size of bitmap in P2, `p2[1]' is - enough. But P1 may have range table, so the + enough. But P1 may have range table, so the size of bitmap table of P1 is extracted by using macro `CHARSET_BITMAP_SIZE'. @@ -4853,7 +4853,7 @@ mutually_exclusive_p (bufp, p1, p2) { int idx; /* We win if the charset_not inside the loop lists - every character listed in the charset after. */ + every character listed in the charset after. */ for (idx = 0; idx < (int) p2[1]; idx++) if (! (p2[2 + idx] == 0 || (idx < CHARSET_BITMAP_SIZE (p1) @@ -4947,7 +4947,7 @@ WEAK_ALIAS (__re_match, re_match) #ifdef emacs /* In Emacs, this is the string or buffer in which we - are matching. It is used for looking up syntax properties. */ + are matching. It is used for looking up syntax properties. */ Lisp_Object re_match_object; #endif @@ -4957,11 +4957,11 @@ Lisp_Object re_match_object; matching at STOP. If REGS is non-null and the `no_sub' field of BUFP is nonzero, we - store offsets for the substring each group matched in REGS. See the + store offsets for the substring each group matched in REGS. See the documentation for exactly how many groups we fill. We return -1 if no match, -2 if an internal error (such as the - failure stack overflowing). Otherwise, we return the length of the + failure stack overflowing). Otherwise, we return the length of the matched substring. */ int @@ -5011,7 +5011,7 @@ WEAK_ALIAS (__re_match_2, re_match_2) /* This is a separate function so that we can force an alloca cleanup - afterwards. */ + afterwards. */ static int re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) struct re_pattern_buffer *bufp; @@ -5030,7 +5030,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) re_char *end1, *end2; /* Pointers into string1 and string2, just past the last characters in - each to consider matching. */ + each to consider matching. */ re_char *end_match_1, *end_match_2; /* 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) the subexpressions we're currently inside, plus the number of such registers, and, finally, two char *'s. The first char * is where to resume scanning the pattern; the second one is where to resume - scanning the strings. */ -#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ + scanning the strings. */ +#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */ fail_stack_type fail_stack; #endif #ifdef DEBUG @@ -5074,7 +5074,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) #endif /* We fill all the registers internally, independent of what we - return, for use in backreferences. The number here includes + return, for use in backreferences. The number here includes an element for register zero. */ size_t num_regs = bufp->re_nsub + 1; @@ -5100,7 +5100,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) /* Logically, this is `best_regend[0]'. But we don't want to have to allocate space for that if we're not allocating space for anything - else (see below). Also, we never need info about register 0 for + else (see below). Also, we never need info about register 0 for any of the other register vectors, and it seems rather a kludge to treat `best_regend' differently than the rest. So we keep track of 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) regstart[reg] = regend[reg] = NULL; /* We move `string1' into `string2' if the latter's empty -- but not if - `string1' is null. */ + `string1' is null. */ if (size2 == 0 && string1 != NULL) { string2 = string1; @@ -5215,7 +5215,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); DEBUG_PRINT1 ("'\n"); - /* This loops over pattern commands. It exits by returning from the + /* This loops over pattern commands. It exits by returning from the function if the match is complete, or it drops through if the match fails at this starting point in the input data. */ for (;;) @@ -5238,7 +5238,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) boolean best_match_p; /* AIX compiler got confused when this was combined - with the previous declaration. */ + with the previous declaration. */ if (same_str_p) best_match_p = d > match_end; else @@ -5276,7 +5276,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) end_match_1' while the restored d is in string2. For example, the pattern `x.*y.*z' against the strings `x-' and `y-z-', if the two strings are - not consecutive in memory. */ + not consecutive in memory. */ DEBUG_PRINT1 ("Restoring best registers.\n"); d = match_end; @@ -5299,7 +5299,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) { /* Have the register data arrays been allocated? */ if (bufp->regs_allocated == REGS_UNALLOCATED) - { /* No. So allocate them with malloc. We need one + { /* No. So allocate them with malloc. We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ 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) else { /* These braces fend off a "empty body in an else-statement" - warning under GCC when assert expands to nothing. */ + warning under GCC when assert expands to nothing. */ assert (bufp->regs_allocated == REGS_FIXED); } @@ -5363,7 +5363,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) were in the pattern, set the extra elements to -1. If we (re)allocated the registers, this is the case, because we always allocate enough to have at least one - -1 at the end. */ + -1 at the end. */ for (reg = num_regs; reg < regs->num_regs; reg++) regs->start[reg] = regs->end[reg] = -1; } /* regs && !bufp->no_sub */ @@ -5381,7 +5381,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) return mcnt; } - /* Otherwise match next pattern command. */ + /* Otherwise match next pattern command. */ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++)) { /* 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) DEBUG_PRINT1 ("EXECUTING succeed.\n"); goto succeed_label; - /* Match the next n pattern characters exactly. The following + /* Match the next n pattern characters exactly. The following byte in the pattern defines n, and the n bytes after that - are the characters to match. */ + are the characters to match. */ case exactn: mcnt = *p++; DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt); @@ -5568,7 +5568,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) /* The beginning of a group is represented by start_memory. The argument is the register number. The text matched within the group is recorded (in the internal - registers data structure) under the register number. */ + registers data structure) under the register number. */ case start_memory: DEBUG_PRINT2 ("EXECUTING start_memory %d:\n", *p); @@ -5617,14 +5617,14 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) case duplicate: { register re_char *d2, *dend2; - int regno = *p++; /* Get which register to match against. */ + int regno = *p++; /* Get which register to match against. */ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno); - /* Can't back reference a group which we've never matched. */ + /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) goto fail; - /* Where in input to try to start matching. */ + /* Where in input to try to start matching. */ d2 = regstart[regno]; /* Remember the start point to rollback upon failure. */ @@ -5737,7 +5737,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) pushes NULL as the value for the string on the stack. Then `POP_FAILURE_POINT' will keep the current value for the string, instead of restoring it. To see why, consider - matching `foo\nbar' against `.*\n'. The .* matches the foo; + matching `foo\nbar' against `.*\n'. The .* matches the foo; then the . fails against the \n. But the next thing we want to do is match the \n against the \n; if we restored the 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) IMMEDIATE_QUIT_CHECK; EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt); - p += mcnt; /* Do the jump. */ + p += mcnt; /* Do the jump. */ DEBUG_PRINT2 ("(to %p).\n", p); break; @@ -5976,7 +5976,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) if (/* Case 2: Only one of S1 and S2 is Sword. */ ((s1 == Sword) != (s2 == Sword)) /* Case 3: Both of S1 and S2 are Sword, and macro - WORD_BOUNDARY_P (C1, C2) returns nonzero. */ + WORD_BOUNDARY_P (C1, C2) returns nonzero. */ || ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2))) not = !not; } @@ -5990,7 +5990,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) /* We FAIL in one of the following cases: */ - /* Case 1: D is at the end of string. */ + /* Case 1: D is at the end of string. */ if (AT_STRINGS_END (d)) goto fail; else @@ -6023,7 +6023,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) s1 = SYNTAX (c1); /* ... and S1 is Sword, and WORD_BOUNDARY_P (C1, C2) - returns 0. */ + returns 0. */ if ((s1 == Sword) && !WORD_BOUNDARY_P (c1, c2)) goto fail; } @@ -6068,7 +6068,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) s2 = SYNTAX (c2); /* ... and S2 is Sword, and WORD_BOUNDARY_P (C1, C2) - returns 0. */ + returns 0. */ if ((s2 == Sword) && !WORD_BOUNDARY_P (c1, c2)) goto fail; } @@ -6080,7 +6080,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) /* We FAIL in one of the following cases: */ - /* Case 1: D is at the end of string. */ + /* Case 1: D is at the end of string. */ if (AT_STRINGS_END (d)) goto fail; else @@ -6097,7 +6097,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) PREFETCH (); c2 = RE_STRING_CHAR (d, dend - d); s2 = SYNTAX (c2); - + /* Case 2: S2 is neither Sword nor Ssymbol. */ if (s2 != Sword && s2 != Ssymbol) 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 @@ */ #define BROKEN_GET_CURRENT_DIR_NAME 1 +/* aix3-1.h defined _NO_PROTO, probably to work around an AIX compiler + that did not handle prototypes. On (at least) AIX 5.2, this causes + the proper prototype to be thrown away for lseek64, so compiled + Lisp files do not load correctly and compilation fails. + + The AIX compiler should have learned about function prototypes long + ago, so we can probably go ahead and undefine _NO_PROTO. However, + if someone can demonstrate that this problem still exists for AIX + 4, this should be moved into a new file (aix5.h). +*/ + +#undef _NO_PROTO + + /* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562 (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 @@ #undef LD_SWITCH_SYSTEM #ifdef __ELF__ -/* Han Boetes <han@mijncomputer.nl> says this - is necessary, otherwise Emacs dumps core on elf systems. */ -#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z -L/usr/pkg/lib -L/usr/local/lib + /* Han Boetes <han@mijncomputer.nl> says this + is necessary, otherwise Emacs dumps core on elf systems. */ +#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z -#else +/* The version of gcc on OpenBSD doesn't search /usr/local/lib by + default. */ +#define LD_SWITCH_X_DEFAULT -L/usr/local/lib -#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -L/usr/pkg/lib -L/usr/local/lib +#else + +#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp +#define LD_SWITCH_X_DEFAULT -L/usr/local/lib #endif 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) val = sd->format; err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val); - if (err < 0) + if (err < 0) alsa_sound_perror ("Could not set sound format", err); uval = sd->sample_rate; err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0); if (err < 0) alsa_sound_perror ("Could not set sample rate", err); - + val = sd->channels; err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val); if (err < 0) @@ -1072,11 +1072,11 @@ alsa_configure (sd) p->hwparams = NULL; snd_pcm_sw_params_free (p->swparams); p->swparams = NULL; - + err = snd_pcm_prepare (p->handle); if (err < 0) alsa_sound_perror ("Could not prepare audio interface for use", err); - + if (sd->volume > 0) { int chn; @@ -1098,7 +1098,7 @@ alsa_configure (sd) long pmin, pmax; snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax); long vol = pmin + (sd->volume * (pmax - pmin)) / 100; - + for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++) snd_mixer_selem_set_playback_volume (e, chn, vol); } @@ -1230,9 +1230,9 @@ alsa_write (sd, buffer, nbytes) err); } } - else + else alsa_sound_perror ("Error writing to sound device", err); - + } else nwritten += err * fact; @@ -1374,7 +1374,7 @@ do_play_sound (psz_file, ui_volume) DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0, doc: /* Play sound SOUND. -Internal use only, use `play-sound' instead.\n */) +Internal use only, use `play-sound' instead. */) (sound) Lisp_Object sound; { 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[]; #if DO_MULTIBYTE # if HAVE_MBRLEN # include <wchar.h> -# ifdef HAVE_SYS__MBSTATE_H /* previously tested __hpux */ -# include <sys/_mbstate_t.h> -# endif +# ifdef HAVE_SYS__MBSTATE_T_H /* previously tested __hpux */ +# include <sys/_mbstate_t.h> +# endif # if !defined (mbsinit) && !defined (HAVE_MBSINIT) # define mbsinit(ps) 1 # 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) const unsigned char *class_beg = str + i_byte + 1; const unsigned char *class_end = class_beg; const unsigned char *class_limit = str + size_byte - 2; - /* Leave room for the null. */ + /* Leave room for the null. */ unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1]; re_wctype_t cc; 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) * sdcsvax!rmr or rmr@uscd * * Severely hacked over by John Gilmore to make a 4.2BSD compatible - * subroutine. 11Mar86; hoptoad!gnu + * subroutine. 11Mar86; hoptoad!gnu * * Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir, * 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 message2 (system_error_msg, sizeof (system_error_msg) - 1, 0); break; } - sit_for (2, 0, 0, 1, 1); + sit_for (make_number (2), 0, 2); } 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 () PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0); } -DWORD -w32_msg_worker (dw) - DWORD dw; +DWORD WINAPI +w32_msg_worker (void *arg) { MSG msg; deferred_msg dummy_buf; @@ -8107,17 +8106,39 @@ DEFUN ("w32-shell-execute", Fw32_shell_execute, Sw32_shell_execute, 2, 4, 0, doc: /* Get Windows to perform OPERATION on DOCUMENT. This is a wrapper around the ShellExecute system function, which invokes the application registered to handle OPERATION for DOCUMENT. -OPERATION is typically \"open\", \"print\" or \"explore\" (but can be -nil for the default action), and DOCUMENT is typically the name of a -document file or URL, but can also be a program executable to run or -a directory to open in the Windows Explorer. -If DOCUMENT is a program executable, PARAMETERS can be a string -containing command line parameters, but otherwise should be nil. - -SHOW-FLAG can be used to control whether the invoked application is hidden -or minimized. If SHOW-FLAG is nil, the application is displayed normally, -otherwise it is an integer representing a ShowWindow flag: +OPERATION is either nil or a string that names a supported operation. +What operations can be used depends on the particular DOCUMENT and its +handler application, but typically it is one of the following common +operations: + + \"open\" - open DOCUMENT, which could be a file, a directory, or an + executable program. If it is an application, that + application is launched in the current buffer's default + directory. Otherwise, the application associated with + DOCUMENT is launched in the buffer's default directory. + \"print\" - print DOCUMENT, which must be a file + \"explore\" - start the Windows Explorer on DOCUMENT + \"edit\" - launch an editor and open DOCUMENT for editing; which + editor is launched depends on the association for the + specified DOCUMENT + \"find\" - initiate search starting from DOCUMENT which must specify + a directory + nil - invoke the default OPERATION, or \"open\" if default is + not defined or unavailable + +DOCUMENT is typically the name of a document file or a URL, but can +also be a program executable to run, or a directory to open in the +Windows Explorer. + +If DOCUMENT is a program executable, the optional arg PARAMETERS can +be a string containing command line parameters that will be passed to +the program; otherwise, PARAMETERS should be nil or unspecified. + +Second optional argument SHOW-FLAG can be used to control how the +application will be displayed when it is invoked. If SHOW-FLAG is nil +or unspceified, the application is displayed normally, otherwise it is +an integer representing a ShowWindow flag: 0 - start hidden 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) /* Ignore any mouse motion that happened before this event; any subsequent mouse-movement Emacs events should reflect only motion after the - ButtonPress. */ + ButtonPress. */ f->mouse_moved = 0; } last_mouse_frame = f; @@ -6450,7 +6450,7 @@ x_delete_display (dpyinfo) /* Set up use of W32. */ -DWORD w32_msg_worker (); +DWORD WINAPI w32_msg_worker (void * arg); void x_flush (struct frame * f) @@ -6555,8 +6555,8 @@ w32_initialize () PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE); hWindowsThread = CreateThread (NULL, 0, - (LPTHREAD_START_ROUTINE) w32_msg_worker, - 0, 0, &dwWindowsThreadId); + w32_msg_worker, + 0, 0, &dwWindowsThreadId); GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); } 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) struct window *w = XWINDOW (window); struct buffer *b = XBUFFER (buffer); int count = SPECPDL_INDEX (); +#ifdef HAVE_WINDOW_SYSTEM + struct frame *f = XFRAME (w->frame); + Display_Info *dpyinfo; +#endif w->buffer = buffer; @@ -3345,6 +3349,15 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) call1 (Vrun_hooks, Qwindow_configuration_change_hook); } +#ifdef HAVE_WINDOW_SYSTEM + BLOCK_INPUT; + if (f && FRAME_X_OUTPUT (f) + && (dpyinfo = FRAME_X_DISPLAY_INFO (f)) + && EQ (window, dpyinfo->mouse_face_window)) + clear_mouse_face (dpyinfo); + UNBLOCK_INPUT; +#endif + unbind_to (count, Qnil); } 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) break; case MOVE_LINE_CONTINUED: - it->continuation_lines_width += it->current_x; + /* For continued lines ending in a tab, some of the glyphs + associated with the tab are displayed on the current + line. Since it->current_x does not include these glyphs, + we use it->last_visible_x instead. */ + it->continuation_lines_width += + (it->c == '\t') ? it->last_visible_x : it->current_x; break; default: @@ -17533,7 +17538,7 @@ pint2str (buf, width, d) /* Write a null-terminated, right justified decimal and "human readable" representation of the nonnegative integer D to BUF using - a minimal field width WIDTH. D should be smaller than 999.5e24. */ + a minimal field width WIDTH. D should be smaller than 999.5e24. */ static const char power_letter[] = { 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) #ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_X_WINDOWS if (face->font != FRAME_FONT (f)) - /* As the font specified for the frame was not acceptable as a - font for the default face (perhaps because auto-scaled fonts - are rejected), we must adjust the frame font. */ - x_set_font (f, build_string (face->font_name), Qnil); + { + /* This can happen when making a frame on a display that does + not support the default font. */ + if (!face->font) + return 0; + + /* Otherwise, the font specified for the frame was not + acceptable as a font for the default face (perhaps because + auto-scaled fonts are rejected), so we must adjust the frame + font. */ + x_set_font (f, build_string (face->font_name), Qnil); + } #endif /* HAVE_X_WINDOWS */ #endif /* HAVE_WINDOW_SYSTEM */ 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) break; /* Now wait for the requester to ack this chunk by deleting the - property. This can run random lisp code or signal. */ + property. This can run random lisp code or signal. */ TRACE1 ("Waiting for increment ACK (deletion of %s)", XGetAtomName (display, reply.property)); wait_for_property_change (wait_object); @@ -2710,11 +2710,11 @@ FRAME is on. If FRAME is nil, the selected frame is used. */) else error ("ATOM must be a symbol or a string"); - for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) + for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) if (dpyinfo->x_dnd_atoms[i] == x_atom) return Qnil; - if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size) + if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size) { dpyinfo->x_dnd_atoms_size *= 2; dpyinfo->x_dnd_atoms = xrealloc (dpyinfo->x_dnd_atoms, @@ -2744,7 +2744,7 @@ x_handle_dnd_message (f, event, dpyinfo, bufp) int idata[5]; size_t i; - for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) + for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) if (dpyinfo->x_dnd_atoms[i] == event->message_type) break; 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 x_raise_frame (f) struct frame *f; { - Lisp_Object frame; - const char *atom = "_NET_ACTIVE_WINDOW"; - BLOCK_INPUT; if (f->async_visible) XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f)); - XSETFRAME (frame, f); - /* See Window Manager Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Standards_2fwm_2dspec */ - - Fx_send_client_event (frame, make_number (0), frame, - make_unibyte_string (atom, strlen (atom)), - make_number (32), - Fcons (make_number (1), - Fcons (make_number (time (NULL) * 1000), - Qnil))); XFlush (FRAME_X_DISPLAY (f)); UNBLOCK_INPUT; } @@ -9064,7 +9051,22 @@ XTframe_raise_lower (f, raise_flag) int raise_flag; { if (raise_flag) - x_raise_frame (f); + { + Lisp_Object frame; + const char *atom = "_NET_ACTIVE_WINDOW"; + + x_raise_frame (f); + /* See Window Manager Specification/Extended Window Manager Hints at + http://freedesktop.org/wiki/Standards_2fwm_2dspec */ + + XSETFRAME (frame, f); + Fx_send_client_event (frame, make_number (0), frame, + make_unibyte_string (atom, strlen (atom)), + make_number (32), + Fcons (make_number (1), + Fcons (make_number (time (NULL) * 1000), + Qnil))); + } else x_lower_frame (f); } |