diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 155 | ||||
| -rw-r--r-- | src/eval.c | 39 | ||||
| -rw-r--r-- | src/fns.c | 4 | ||||
| -rw-r--r-- | src/frame.c | 18 | ||||
| -rw-r--r-- | src/image.c | 82 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/macfns.c | 3 | ||||
| -rw-r--r-- | src/macterm.c | 314 | ||||
| -rw-r--r-- | src/makefile.w32-in | 3 | ||||
| -rw-r--r-- | src/process.c | 2 | ||||
| -rw-r--r-- | src/unexw32.c | 56 | ||||
| -rw-r--r-- | src/w32bdf.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 82 | ||||
| -rw-r--r-- | src/w32term.c | 20 | ||||
| -rw-r--r-- | src/window.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 19 | ||||
| -rw-r--r-- | src/xfaces.c | 4 |
18 files changed, 544 insertions, 265 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8736a6f156a..c38032b163a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,130 @@ | |||
| 1 | 2005-06-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * macterm.c (mac_compute_glyph_string_overhangs): Don't set | ||
| 4 | overhangs unless the given glyph type is noncomposite CHAR_GLYPH. | ||
| 5 | [USE_CARBON_EVENTS] (mac_convert_event_ref): Convert dead key down | ||
| 6 | events. | ||
| 7 | (XTread_socket): Don't pass keyboard events with the option | ||
| 8 | modifier to the system when Vmac_command_key_is_meta is nil or | ||
| 9 | Vmac_option_modifier is non-nil. | ||
| 10 | [USE_CARBON_EVENTS] (read_socket_inev): New variable. | ||
| 11 | [USE_CARBON_EVENTS] (init_command_handler): Fix argument. | ||
| 12 | [USE_CARBON_EVENTS] (mac_handle_mouse_event): New Carbon event | ||
| 13 | handler function. | ||
| 14 | (install_window_handler) [USE_CARBON_EVENTS]: Install it. | ||
| 15 | (XTread_socket) [USE_CARBON_EVENTS]: Move mouse wheel event | ||
| 16 | handler part to mac_handle_mouse_event. | ||
| 17 | |||
| 18 | 2005-06-14 Juanma Barranquero <lekktu@gmail.com> | ||
| 19 | |||
| 20 | * eval.c (Fdefvaralias): Rename arguments SYMBOL and ALIASED to | ||
| 21 | NEW-ALIAS and BASE-VARIABLE, respectively. | ||
| 22 | |||
| 23 | 2005-06-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * xdisp.c (note_mode_line_or_margin_highlight): Lisp_Object/int mixup. | ||
| 26 | (get_phys_cursor_geometry, format_mode_line_unwind_data) | ||
| 27 | (get_line_height_property, x_produce_glyphs): Remove unused vars. | ||
| 28 | |||
| 29 | * coding.c (run_pre_post_conversion_on_str): Remove unused var `buf'. | ||
| 30 | |||
| 31 | 2005-06-13 Eli Zaretskii <eliz@gnu.org> | ||
| 32 | |||
| 33 | * w32term.c (x_use_underline_position_properties): New variable. | ||
| 34 | (x_draw_glyph_string): Remind in a comment to change doc string of | ||
| 35 | x-use-underline-position-properties if/when underline positioning | ||
| 36 | is implemented. | ||
| 37 | (syms_of_w32term): DEFVAR_BOOL x-use-underline-position-properties, | ||
| 38 | and initialize it to nil. | ||
| 39 | |||
| 40 | 2005-06-12 Jason Rumney <jasonr@gnu.org> | ||
| 41 | |||
| 42 | * w32fns.c (NEWOPENFILENAME): New struct. | ||
| 43 | (Fx_file_dialog): Use it to trick the system into giving us up to | ||
| 44 | date dialogs on systems that are documented to support it. | ||
| 45 | Do not set OFN_FILEMUSTEXIST flag if looking for a directory. | ||
| 46 | |||
| 47 | 2005-06-12 Eli Zaretskii <eliz@gnu.org> | ||
| 48 | |||
| 49 | * w32fns.c (w32_abort): Use the MB_YESNO dialog instead of | ||
| 50 | MB_ABORTRETRYIGNORE. Never return, even if DebugBreak does. | ||
| 51 | |||
| 52 | 2005-06-11 Eli Zaretskii <eliz@gnu.org> | ||
| 53 | |||
| 54 | * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Cast 4th arg | ||
| 55 | to CreateDIBSection to avoid a compiler warning. | ||
| 56 | (pbm_load): Cast 3rd arg to IMAGE_BACKGROUND to avoid a compiler | ||
| 57 | warning. | ||
| 58 | (png_load): Cast return values of fn_png_create_read_struct and | ||
| 59 | fn_png_create_info_struct, to avoid compiler warnings on W32. | ||
| 60 | Cast 3rd arg to IMAGE_BACKGROUND and image_background_transparent | ||
| 61 | to avoid compiler warnings. | ||
| 62 | (jpeg_load): Cast return value of fn_jpeg_std_error to avoid a | ||
| 63 | compiler warning on W32. Cast 3rd arg to IMAGE_BACKGROUND to | ||
| 64 | avoid a compiler warning. | ||
| 65 | (tiff_load): Cast return values of fn_TIFFOpen and | ||
| 66 | fn_TIFFClientOpen to avoid compiler warning on W32. Cast 3rd arg | ||
| 67 | to IMAGE_BACKGROUND to avoid a compiler warning. | ||
| 68 | (gif_load): Cast return values of fn_DGifOpenFileName and | ||
| 69 | fn_DGifOpen to avoid compiler warnings on W32. Cast 3rd arg to | ||
| 70 | IMAGE_BACKGROUND to avoid a compiler warning. | ||
| 71 | (DrawText) [HAVE_NTGUI || MAC_OS]: If already defined, undef | ||
| 72 | before redefining. | ||
| 73 | |||
| 74 | * w32bdf.c (create_offscreen_bitmap): Cast `bitsp' to `void **' in | ||
| 75 | the call to CreateDIBSection, to avoid a compiler warning. | ||
| 76 | |||
| 77 | 2005-06-11 Jason Rumney <jasonr@gnu.org> | ||
| 78 | |||
| 79 | * w32fns.c (Fx_file_dialog): Unblock input before falling back to | ||
| 80 | minibuffer. | ||
| 81 | * macfns.c (Fx_file_dialog): Likewise. | ||
| 82 | |||
| 83 | 2005-06-10 Eli Zaretskii <eliz@gnu.org> | ||
| 84 | |||
| 85 | * makefile.w32-in ($(TEMACS)): Depend on addsection.exe. | ||
| 86 | |||
| 87 | 2005-06-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 88 | |||
| 89 | * process.c (syms_of_process) [ADAPTIVE_READ_BUFFERING]: | ||
| 90 | * w32fns.c (syms_of_w32fns): Fix spellings. | ||
| 91 | |||
| 92 | 2005-06-10 Eli Zaretskii <eliz@gnu.org> | ||
| 93 | |||
| 94 | * unexw32.c (COPY_CHUNK, COPY_PROC_CHUNK): Add a new argument | ||
| 95 | `verbose'; print diagnostic messages only if it is non-zero. | ||
| 96 | All callers changed to pass a zero value unless DEBUG_DUMP is defined | ||
| 97 | in the environment. | ||
| 98 | (copy_executable_and_dump_data): Print section names with %.8s. | ||
| 99 | |||
| 100 | 2005-06-10 Masatake YAMATO <jet@gyve.org> | ||
| 101 | |||
| 102 | * xdisp.c (note_mode_line_or_margin_highlight): Call clear_mouse_face | ||
| 103 | when mouse_face is not given. | ||
| 104 | Remove unnecessary tabs. | ||
| 105 | |||
| 106 | 2005-06-09 Luc Teirlinck <teirllm@auburn.edu> | ||
| 107 | |||
| 108 | * window.c (Fselect_window): Adapt call to Fselect_frame. | ||
| 109 | |||
| 110 | * lisp.h: Update EXFUN of Fselect_frame. | ||
| 111 | |||
| 112 | * keyboard.c (command_loop_1): Adapt call to Fselect_frame. | ||
| 113 | |||
| 114 | * frame.c (Fhandle_switch_frame, Fselect_frame): Delete unused arg | ||
| 115 | no_enter. | ||
| 116 | (Fset_mouse_position, Fset_mouse_pixel_position, Ficonify_frame): | ||
| 117 | Adapt to above change. | ||
| 118 | |||
| 119 | 2005-06-10 Juanma Barranquero <lekktu@gmail.com> | ||
| 120 | |||
| 121 | * fns.c (Fmemq, Fmaphash): Doc fixes. | ||
| 122 | |||
| 123 | 2005-06-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 124 | |||
| 125 | * xfaces.c (Fdisplay_supports_face_attributes_p): | ||
| 126 | Fix typo in docstring. | ||
| 127 | |||
| 1 | 2005-06-08 Steven Tamm <steventamm@mac.com> | 128 | 2005-06-08 Steven Tamm <steventamm@mac.com> |
| 2 | 129 | ||
| 3 | * unexmacosx.c (copy_data_segment): Copy __la_sym_ptr2 section | 130 | * unexmacosx.c (copy_data_segment): Copy __la_sym_ptr2 section |
| @@ -40,8 +167,8 @@ | |||
| 40 | 167 | ||
| 41 | 2005-06-07 Masatake YAMATO <jet@gyve.org> | 168 | 2005-06-07 Masatake YAMATO <jet@gyve.org> |
| 42 | 169 | ||
| 43 | * xdisp.c (note_mode_line_or_margin_highlight): Check | 170 | * xdisp.c (note_mode_line_or_margin_highlight): |
| 44 | the overlapping of re-rendering area to avoid flickering. | 171 | Check the overlapping of re-rendering area to avoid flickering. |
| 45 | (note_mouse_highlight): Call clear_mouse_face if PART | 172 | (note_mouse_highlight): Call clear_mouse_face if PART |
| 46 | is not ON_MODE_LINE nor ON_HEADER_LINE. | 173 | is not ON_MODE_LINE nor ON_HEADER_LINE. |
| 47 | 174 | ||
| @@ -56,21 +183,21 @@ | |||
| 56 | 183 | ||
| 57 | 2005-06-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 184 | 2005-06-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 58 | 185 | ||
| 59 | * macmenu.c (menu_quit_handler, install_menu_quit_handler): New | 186 | * macmenu.c (menu_quit_handler, install_menu_quit_handler): |
| 60 | functions for popping down menus on C-g. | 187 | New functions for popping down menus on C-g. |
| 61 | (set_frame_menubar, mac_menu_show): Call install_menu_quit_handler. | 188 | (set_frame_menubar, mac_menu_show): Call install_menu_quit_handler. |
| 62 | 189 | ||
| 63 | * macterm.c: Make mac_quit_char_modifiers and mac_quit_char_keycode | 190 | * macterm.c: Make mac_quit_char_modifiers and mac_quit_char_keycode |
| 64 | non-static. | 191 | non-static. |
| 65 | 192 | ||
| 66 | * config.in: Added HAVE_CANCELMENUTRACKING | 193 | * config.in: Add HAVE_CANCELMENUTRACKING. |
| 67 | 194 | ||
| 68 | 2005-06-06 Eli Zaretskii <eliz@gnu.org> | 195 | 2005-06-06 Eli Zaretskii <eliz@gnu.org> |
| 69 | 196 | ||
| 70 | * w32heap.h (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_PTR): Remove | 197 | * w32heap.h (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_PTR): |
| 71 | macros. | 198 | Remove macros. |
| 72 | 199 | ||
| 73 | * unexw32.c (RVA_TO_PTR): Moved here from w32heap.h. | 200 | * unexw32.c (RVA_TO_PTR): Move here from w32heap.h. |
| 74 | 201 | ||
| 75 | * w32proc.c (RVA_TO_PTR): New macro. | 202 | * w32proc.c (RVA_TO_PTR): New macro. |
| 76 | 203 | ||
| @@ -194,11 +321,11 @@ | |||
| 194 | (format_mode_line_unwind_data, unwind_format_mode_line): | 321 | (format_mode_line_unwind_data, unwind_format_mode_line): |
| 195 | New functions for unwind protection in mode line formatting. | 322 | New functions for unwind protection in mode line formatting. |
| 196 | (x_consider_frame_title): Use them and new local var 'title_start' | 323 | (x_consider_frame_title): Use them and new local var 'title_start' |
| 197 | to support nested calls to format-mode-line and redisplay. Set | 324 | to support nested calls to format-mode-line and redisplay. |
| 198 | mode_line_target to MODE_LINE_TITLE. | 325 | Set mode_line_target to MODE_LINE_TITLE. |
| 199 | (Fformat_mode_line): Use them and new local var 'string_start' to | 326 | (Fformat_mode_line): Use them and new local var 'string_start' to |
| 200 | support nested calls to format-mode-line and redisplay. Set | 327 | support nested calls to format-mode-line and redisplay. |
| 201 | mode_line_target to MODE_LINE_NOPROP or MODE_LINE_STRING. | 328 | Set mode_line_target to MODE_LINE_NOPROP or MODE_LINE_STRING. |
| 202 | Don't trim trailing dashes. | 329 | Don't trim trailing dashes. |
| 203 | (decode_mode_spec): Don't make infinite number of trailing dashes | 330 | (decode_mode_spec): Don't make infinite number of trailing dashes |
| 204 | for MODE_LINE_NOPROP and MODE_LINE_STRING targets. | 331 | for MODE_LINE_NOPROP and MODE_LINE_STRING targets. |
| @@ -12989,9 +13116,9 @@ | |||
| 12989 | * sound.c: Added a partial implementation of play-sound-internal | 13116 | * sound.c: Added a partial implementation of play-sound-internal |
| 12990 | for Microsoft Windows. Added various #ifdef / #else / #endif | 13117 | for Microsoft Windows. Added various #ifdef / #else / #endif |
| 12991 | code blocks to separate the code that will compile under | 13118 | code blocks to separate the code that will compile under |
| 12992 | Microsoft Windows from the code that is specific to Gnu/Linux. | 13119 | Microsoft Windows from the code that is specific to GNU/Linux. |
| 12993 | Moved several blocks of code around to make this separation of code | 13120 | Moved several blocks of code around to make this separation of code |
| 12994 | into Windows compatible and Gnu/Linux compatible code blocks easier. | 13121 | into Windows compatible and GNU/Linux compatible code blocks easier. |
| 12995 | 13122 | ||
| 12996 | * makefile.w32-in: Include sound.c and link with WinMM.lib. | 13123 | * makefile.w32-in: Include sound.c and link with WinMM.lib. |
| 12997 | 13124 | ||
diff --git a/src/eval.c b/src/eval.c index 46affcac418..445eb283114 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -722,35 +722,36 @@ usage: (defmacro NAME ARGLIST [DOCSTRING] [DECL] BODY...) */) | |||
| 722 | 722 | ||
| 723 | 723 | ||
| 724 | DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, | 724 | DEFUN ("defvaralias", Fdefvaralias, Sdefvaralias, 2, 3, 0, |
| 725 | doc: /* Make SYMBOL a variable alias for symbol ALIASED. | 725 | doc: /* Make NEW-ALIAS a variable alias for symbol BASE-VARIABLE. |
| 726 | Setting the value of SYMBOL will subsequently set the value of ALIASED, | 726 | Setting the value of NEW-ALIAS will subsequently set the value of BASE-VARIABLE, |
| 727 | and getting the value of SYMBOL will return the value ALIASED has. | 727 | and getting the value of NEW-ALIAS will return the value BASE-VARIABLE has. |
| 728 | Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. If it is | 728 | Third arg DOCSTRING, if non-nil, is documentation for NEW-ALIAS. If it is |
| 729 | omitted or nil, SYMBOL gets the documentation string of ALIASED, or of the | 729 | omitted or nil, NEW-ALIAS gets the documentation string of BASE-VARIABLE, |
| 730 | variable at the end of the chain of aliases, if ALIASED is itself an alias. | 730 | or of the variable at the end of the chain of aliases, if BASE-VARIABLE is |
| 731 | The return value is ALIASED. */) | 731 | itself an alias. |
| 732 | (symbol, aliased, docstring) | 732 | The return value is BASE-VARIABLE. */) |
| 733 | Lisp_Object symbol, aliased, docstring; | 733 | (new_alias, base_variable, docstring) |
| 734 | Lisp_Object new_alias, base_variable, docstring; | ||
| 734 | { | 735 | { |
| 735 | struct Lisp_Symbol *sym; | 736 | struct Lisp_Symbol *sym; |
| 736 | 737 | ||
| 737 | CHECK_SYMBOL (symbol); | 738 | CHECK_SYMBOL (new_alias); |
| 738 | CHECK_SYMBOL (aliased); | 739 | CHECK_SYMBOL (base_variable); |
| 739 | 740 | ||
| 740 | if (SYMBOL_CONSTANT_P (symbol)) | 741 | if (SYMBOL_CONSTANT_P (new_alias)) |
| 741 | error ("Cannot make a constant an alias"); | 742 | error ("Cannot make a constant an alias"); |
| 742 | 743 | ||
| 743 | sym = XSYMBOL (symbol); | 744 | sym = XSYMBOL (new_alias); |
| 744 | sym->indirect_variable = 1; | 745 | sym->indirect_variable = 1; |
| 745 | sym->value = aliased; | 746 | sym->value = base_variable; |
| 746 | sym->constant = SYMBOL_CONSTANT_P (aliased); | 747 | sym->constant = SYMBOL_CONSTANT_P (base_variable); |
| 747 | LOADHIST_ATTACH (symbol); | 748 | LOADHIST_ATTACH (new_alias); |
| 748 | if (!NILP (docstring)) | 749 | if (!NILP (docstring)) |
| 749 | Fput (symbol, Qvariable_documentation, docstring); | 750 | Fput (new_alias, Qvariable_documentation, docstring); |
| 750 | else | 751 | else |
| 751 | Fput (symbol, Qvariable_documentation, Qnil); | 752 | Fput (new_alias, Qvariable_documentation, Qnil); |
| 752 | 753 | ||
| 753 | return aliased; | 754 | return base_variable; |
| 754 | } | 755 | } |
| 755 | 756 | ||
| 756 | 757 | ||
| @@ -1390,7 +1390,7 @@ The value is actually the tail of LIST whose car is ELT. */) | |||
| 1390 | 1390 | ||
| 1391 | DEFUN ("memq", Fmemq, Smemq, 2, 2, 0, | 1391 | DEFUN ("memq", Fmemq, Smemq, 2, 2, 0, |
| 1392 | doc: /* Return non-nil if ELT is an element of LIST. | 1392 | doc: /* Return non-nil if ELT is an element of LIST. |
| 1393 | Comparison done with EQ. The value is actually the tail of LIST | 1393 | Comparison done with `eq'. The value is actually the tail of LIST |
| 1394 | whose car is ELT. */) | 1394 | whose car is ELT. */) |
| 1395 | (elt, list) | 1395 | (elt, list) |
| 1396 | Lisp_Object elt, list; | 1396 | Lisp_Object elt, list; |
| @@ -4845,7 +4845,7 @@ DEFUN ("remhash", Fremhash, Sremhash, 2, 2, 0, | |||
| 4845 | 4845 | ||
| 4846 | DEFUN ("maphash", Fmaphash, Smaphash, 2, 2, 0, | 4846 | DEFUN ("maphash", Fmaphash, Smaphash, 2, 2, 0, |
| 4847 | doc: /* Call FUNCTION for all entries in hash table TABLE. | 4847 | doc: /* Call FUNCTION for all entries in hash table TABLE. |
| 4848 | FUNCTION is called with 2 arguments KEY and VALUE. */) | 4848 | FUNCTION is called with two arguments, KEY and VALUE. */) |
| 4849 | (function, table) | 4849 | (function, table) |
| 4850 | Lisp_Object function, table; | 4850 | Lisp_Object function, table; |
| 4851 | { | 4851 | { |
diff --git a/src/frame.c b/src/frame.c index 1a84072b40b..204a31fa050 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -729,7 +729,7 @@ do_switch_frame (frame, track, for_deletion) | |||
| 729 | return frame; | 729 | return frame; |
| 730 | } | 730 | } |
| 731 | 731 | ||
| 732 | DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 2, "e", | 732 | DEFUN ("select-frame", Fselect_frame, Sselect_frame, 1, 1, "e", |
| 733 | doc: /* Select the frame FRAME. | 733 | doc: /* Select the frame FRAME. |
| 734 | Subsequent editing commands apply to its selected window. | 734 | Subsequent editing commands apply to its selected window. |
| 735 | The selection of FRAME lasts until the next time the user does | 735 | The selection of FRAME lasts until the next time the user does |
| @@ -740,14 +740,14 @@ the command loop, because it still may have the window system's input | |||
| 740 | focus. On a text-only terminal, the next redisplay will display FRAME. | 740 | focus. On a text-only terminal, the next redisplay will display FRAME. |
| 741 | 741 | ||
| 742 | This function returns FRAME, or nil if FRAME has been deleted. */) | 742 | This function returns FRAME, or nil if FRAME has been deleted. */) |
| 743 | (frame, no_enter) | 743 | (frame) |
| 744 | Lisp_Object frame, no_enter; | 744 | Lisp_Object frame; |
| 745 | { | 745 | { |
| 746 | return do_switch_frame (frame, 1, 0); | 746 | return do_switch_frame (frame, 1, 0); |
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | 749 | ||
| 750 | DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 2, "e", | 750 | DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "e", |
| 751 | doc: /* Handle a switch-frame event EVENT. | 751 | doc: /* Handle a switch-frame event EVENT. |
| 752 | Switch-frame events are usually bound to this function. | 752 | Switch-frame events are usually bound to this function. |
| 753 | A switch-frame event tells Emacs that the window manager has requested | 753 | A switch-frame event tells Emacs that the window manager has requested |
| @@ -756,8 +756,8 @@ This function selects the selected window of the frame of EVENT. | |||
| 756 | 756 | ||
| 757 | If EVENT is frame object, handle it as if it were a switch-frame event | 757 | If EVENT is frame object, handle it as if it were a switch-frame event |
| 758 | to that frame. */) | 758 | to that frame. */) |
| 759 | (event, no_enter) | 759 | (event) |
| 760 | Lisp_Object event, no_enter; | 760 | Lisp_Object event; |
| 761 | { | 761 | { |
| 762 | /* Preserve prefix arg that the command loop just cleared. */ | 762 | /* Preserve prefix arg that the command loop just cleared. */ |
| 763 | current_kboard->Vprefix_arg = Vcurrent_prefix_arg; | 763 | current_kboard->Vprefix_arg = Vcurrent_prefix_arg; |
| @@ -1530,7 +1530,7 @@ before calling this function on it, like this. | |||
| 1530 | #if defined (MSDOS) && defined (HAVE_MOUSE) | 1530 | #if defined (MSDOS) && defined (HAVE_MOUSE) |
| 1531 | if (FRAME_MSDOS_P (XFRAME (frame))) | 1531 | if (FRAME_MSDOS_P (XFRAME (frame))) |
| 1532 | { | 1532 | { |
| 1533 | Fselect_frame (frame, Qnil); | 1533 | Fselect_frame (frame); |
| 1534 | mouse_moveto (XINT (x), XINT (y)); | 1534 | mouse_moveto (XINT (x), XINT (y)); |
| 1535 | } | 1535 | } |
| 1536 | #endif | 1536 | #endif |
| @@ -1562,7 +1562,7 @@ before calling this function on it, like this. | |||
| 1562 | #if defined (MSDOS) && defined (HAVE_MOUSE) | 1562 | #if defined (MSDOS) && defined (HAVE_MOUSE) |
| 1563 | if (FRAME_MSDOS_P (XFRAME (frame))) | 1563 | if (FRAME_MSDOS_P (XFRAME (frame))) |
| 1564 | { | 1564 | { |
| 1565 | Fselect_frame (frame, Qnil); | 1565 | Fselect_frame (frame); |
| 1566 | mouse_moveto (XINT (x), XINT (y)); | 1566 | mouse_moveto (XINT (x), XINT (y)); |
| 1567 | } | 1567 | } |
| 1568 | #endif | 1568 | #endif |
| @@ -1684,7 +1684,7 @@ If omitted, FRAME defaults to the currently selected frame. */) | |||
| 1684 | #if 0 /* This isn't logically necessary, and it can do GC. */ | 1684 | #if 0 /* This isn't logically necessary, and it can do GC. */ |
| 1685 | /* Don't let the frame remain selected. */ | 1685 | /* Don't let the frame remain selected. */ |
| 1686 | if (EQ (frame, selected_frame)) | 1686 | if (EQ (frame, selected_frame)) |
| 1687 | Fhandle_switch_frame (next_frame (frame, Qt), Qnil); | 1687 | Fhandle_switch_frame (next_frame (frame, Qt)); |
| 1688 | #endif | 1688 | #endif |
| 1689 | 1689 | ||
| 1690 | /* Don't allow minibuf_window to remain on a deleted frame. */ | 1690 | /* Don't allow minibuf_window to remain on a deleted frame. */ |
diff --git a/src/image.c b/src/image.c index bc88c9d1d04..462294b33b4 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -1972,7 +1972,8 @@ x_create_x_image_and_pixmap (f, width, height, depth, ximg, pixmap) | |||
| 1972 | and store its handle in *pixmap. */ | 1972 | and store its handle in *pixmap. */ |
| 1973 | *pixmap = CreateDIBSection (hdc, &((*ximg)->info), | 1973 | *pixmap = CreateDIBSection (hdc, &((*ximg)->info), |
| 1974 | (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, | 1974 | (depth < 16) ? DIB_PAL_COLORS : DIB_RGB_COLORS, |
| 1975 | &((*ximg)->data), NULL, 0); | 1975 | /* casting avoids a GCC warning */ |
| 1976 | (void **)&((*ximg)->data), NULL, 0); | ||
| 1976 | 1977 | ||
| 1977 | /* Realize display palette and garbage all frames. */ | 1978 | /* Realize display palette and garbage all frames. */ |
| 1978 | release_frame_dc (f, hdc); | 1979 | release_frame_dc (f, hdc); |
| @@ -5517,7 +5518,8 @@ pbm_load (f, img) | |||
| 5517 | /* Maybe fill in the background field while we have ximg handy. */ | 5518 | /* Maybe fill in the background field while we have ximg handy. */ |
| 5518 | 5519 | ||
| 5519 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 5520 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 5520 | IMAGE_BACKGROUND (img, f, ximg); | 5521 | /* Casting avoids a GCC warning. */ |
| 5522 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 5521 | 5523 | ||
| 5522 | /* Put the image into a pixmap. */ | 5524 | /* Put the image into a pixmap. */ |
| 5523 | x_put_x_image (f, ximg, img->pixmap, width, height); | 5525 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -5843,9 +5845,11 @@ png_load (f, img) | |||
| 5843 | tbr.bytes += sizeof (sig); | 5845 | tbr.bytes += sizeof (sig); |
| 5844 | } | 5846 | } |
| 5845 | 5847 | ||
| 5846 | /* Initialize read and info structs for PNG lib. */ | 5848 | /* Initialize read and info structs for PNG lib. Casting return |
| 5847 | png_ptr = fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, | 5849 | value avoids a GCC warning on W32. */ |
| 5848 | my_png_error, my_png_warning); | 5850 | png_ptr = (png_structp)fn_png_create_read_struct (PNG_LIBPNG_VER_STRING, |
| 5851 | NULL, my_png_error, | ||
| 5852 | my_png_warning); | ||
| 5849 | if (!png_ptr) | 5853 | if (!png_ptr) |
| 5850 | { | 5854 | { |
| 5851 | if (fp) fclose (fp); | 5855 | if (fp) fclose (fp); |
| @@ -5853,7 +5857,8 @@ png_load (f, img) | |||
| 5853 | return 0; | 5857 | return 0; |
| 5854 | } | 5858 | } |
| 5855 | 5859 | ||
| 5856 | info_ptr = fn_png_create_info_struct (png_ptr); | 5860 | /* Casting return value avoids a GCC warning on W32. */ |
| 5861 | info_ptr = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5857 | if (!info_ptr) | 5862 | if (!info_ptr) |
| 5858 | { | 5863 | { |
| 5859 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); | 5864 | fn_png_destroy_read_struct (&png_ptr, NULL, NULL); |
| @@ -5862,7 +5867,8 @@ png_load (f, img) | |||
| 5862 | return 0; | 5867 | return 0; |
| 5863 | } | 5868 | } |
| 5864 | 5869 | ||
| 5865 | end_info = fn_png_create_info_struct (png_ptr); | 5870 | /* Casting return value avoids a GCC warning on W32. */ |
| 5871 | end_info = (png_infop)fn_png_create_info_struct (png_ptr); | ||
| 5866 | if (!end_info) | 5872 | if (!end_info) |
| 5867 | { | 5873 | { |
| 5868 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); | 5874 | fn_png_destroy_read_struct (&png_ptr, &info_ptr, NULL); |
| @@ -6135,8 +6141,9 @@ png_load (f, img) | |||
| 6135 | img->width = width; | 6141 | img->width = width; |
| 6136 | img->height = height; | 6142 | img->height = height; |
| 6137 | 6143 | ||
| 6138 | /* Maybe fill in the background field while we have ximg handy. */ | 6144 | /* Maybe fill in the background field while we have ximg handy. |
| 6139 | IMAGE_BACKGROUND (img, f, ximg); | 6145 | Casting avoids a GCC warning. */ |
| 6146 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 6140 | 6147 | ||
| 6141 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 6148 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 6142 | x_put_x_image (f, ximg, img->pixmap, width, height); | 6149 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -6145,9 +6152,9 @@ png_load (f, img) | |||
| 6145 | /* Same for the mask. */ | 6152 | /* Same for the mask. */ |
| 6146 | if (mask_img) | 6153 | if (mask_img) |
| 6147 | { | 6154 | { |
| 6148 | /* Fill in the background_transparent field while we have the mask | 6155 | /* Fill in the background_transparent field while we have the |
| 6149 | handy. */ | 6156 | mask handy. Casting avoids a GCC warning. */ |
| 6150 | image_background_transparent (img, f, mask_img); | 6157 | image_background_transparent (img, f, (XImagePtr_or_DC)mask_img); |
| 6151 | 6158 | ||
| 6152 | x_put_x_image (f, mask_img, img->mask, img->width, img->height); | 6159 | x_put_x_image (f, mask_img, img->mask, img->width, img->height); |
| 6153 | x_destroy_x_image (mask_img); | 6160 | x_destroy_x_image (mask_img); |
| @@ -6494,8 +6501,9 @@ jpeg_load (f, img) | |||
| 6494 | } | 6501 | } |
| 6495 | 6502 | ||
| 6496 | /* Customize libjpeg's error handling to call my_error_exit when an | 6503 | /* Customize libjpeg's error handling to call my_error_exit when an |
| 6497 | error is detected. This function will perform a longjmp. */ | 6504 | error is detected. This function will perform a longjmp. |
| 6498 | cinfo.err = fn_jpeg_std_error (&mgr.pub); | 6505 | Casting return value avoids a GCC warning on W32. */ |
| 6506 | cinfo.err = (struct jpeg_error_mgr *)fn_jpeg_std_error (&mgr.pub); | ||
| 6499 | mgr.pub.error_exit = my_error_exit; | 6507 | mgr.pub.error_exit = my_error_exit; |
| 6500 | 6508 | ||
| 6501 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) | 6509 | if ((rc = setjmp (mgr.setjmp_buffer)) != 0) |
| @@ -6606,7 +6614,8 @@ jpeg_load (f, img) | |||
| 6606 | 6614 | ||
| 6607 | /* Maybe fill in the background field while we have ximg handy. */ | 6615 | /* Maybe fill in the background field while we have ximg handy. */ |
| 6608 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 6616 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 6609 | IMAGE_BACKGROUND (img, f, ximg); | 6617 | /* Casting avoids a GCC warning. */ |
| 6618 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 6610 | 6619 | ||
| 6611 | /* Put the image into the pixmap. */ | 6620 | /* Put the image into the pixmap. */ |
| 6612 | x_put_x_image (f, ximg, img->pixmap, width, height); | 6621 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -6932,8 +6941,9 @@ tiff_load (f, img) | |||
| 6932 | return 0; | 6941 | return 0; |
| 6933 | } | 6942 | } |
| 6934 | 6943 | ||
| 6935 | /* Try to open the image file. */ | 6944 | /* Try to open the image file. Casting return value avoids a |
| 6936 | tiff = fn_TIFFOpen (SDATA (file), "r"); | 6945 | GCC warning on W32. */ |
| 6946 | tiff = (TIFF *)fn_TIFFOpen (SDATA (file), "r"); | ||
| 6937 | if (tiff == NULL) | 6947 | if (tiff == NULL) |
| 6938 | { | 6948 | { |
| 6939 | image_error ("Cannot open `%s'", file, Qnil); | 6949 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -6948,14 +6958,15 @@ tiff_load (f, img) | |||
| 6948 | memsrc.len = SBYTES (specified_data); | 6958 | memsrc.len = SBYTES (specified_data); |
| 6949 | memsrc.index = 0; | 6959 | memsrc.index = 0; |
| 6950 | 6960 | ||
| 6951 | tiff = fn_TIFFClientOpen ("memory_source", "r", &memsrc, | 6961 | /* Casting return value avoids a GCC warning on W32. */ |
| 6952 | (TIFFReadWriteProc) tiff_read_from_memory, | 6962 | tiff = (TIFF *)fn_TIFFClientOpen ("memory_source", "r", &memsrc, |
| 6953 | (TIFFReadWriteProc) tiff_write_from_memory, | 6963 | (TIFFReadWriteProc) tiff_read_from_memory, |
| 6954 | tiff_seek_in_memory, | 6964 | (TIFFReadWriteProc) tiff_write_from_memory, |
| 6955 | tiff_close_memory, | 6965 | tiff_seek_in_memory, |
| 6956 | tiff_size_of_memory, | 6966 | tiff_close_memory, |
| 6957 | tiff_mmap_memory, | 6967 | tiff_size_of_memory, |
| 6958 | tiff_unmap_memory); | 6968 | tiff_mmap_memory, |
| 6969 | tiff_unmap_memory); | ||
| 6959 | 6970 | ||
| 6960 | if (!tiff) | 6971 | if (!tiff) |
| 6961 | { | 6972 | { |
| @@ -7018,7 +7029,8 @@ tiff_load (f, img) | |||
| 7018 | 7029 | ||
| 7019 | /* Maybe fill in the background field while we have ximg handy. */ | 7030 | /* Maybe fill in the background field while we have ximg handy. */ |
| 7020 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 7031 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 7021 | IMAGE_BACKGROUND (img, f, ximg); | 7032 | /* Casting avoids a GCC warning on W32. */ |
| 7033 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 7022 | 7034 | ||
| 7023 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 7035 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 7024 | x_put_x_image (f, ximg, img->pixmap, width, height); | 7036 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -7126,6 +7138,11 @@ gif_image_p (object) | |||
| 7126 | #ifdef HAVE_GIF | 7138 | #ifdef HAVE_GIF |
| 7127 | 7139 | ||
| 7128 | #if defined (HAVE_NTGUI) || defined (MAC_OS) | 7140 | #if defined (HAVE_NTGUI) || defined (MAC_OS) |
| 7141 | /* winuser.h might define DrawText to DrawTextA or DrawTextW. | ||
| 7142 | Undefine before redefining to avoid a preprocessor warning. */ | ||
| 7143 | #ifdef DrawText | ||
| 7144 | #undef DrawText | ||
| 7145 | #endif | ||
| 7129 | /* avoid conflict with QuickdrawText.h */ | 7146 | /* avoid conflict with QuickdrawText.h */ |
| 7130 | #define DrawText gif_DrawText | 7147 | #define DrawText gif_DrawText |
| 7131 | #include <gif_lib.h> | 7148 | #include <gif_lib.h> |
| @@ -7239,8 +7256,9 @@ gif_load (f, img) | |||
| 7239 | return 0; | 7256 | return 0; |
| 7240 | } | 7257 | } |
| 7241 | 7258 | ||
| 7242 | /* Open the GIF file. */ | 7259 | /* Open the GIF file. Casting return value avoids a GCC warning |
| 7243 | gif = fn_DGifOpenFileName (SDATA (file)); | 7260 | on W32. */ |
| 7261 | gif = (GifFileType *)fn_DGifOpenFileName (SDATA (file)); | ||
| 7244 | if (gif == NULL) | 7262 | if (gif == NULL) |
| 7245 | { | 7263 | { |
| 7246 | image_error ("Cannot open `%s'", file, Qnil); | 7264 | image_error ("Cannot open `%s'", file, Qnil); |
| @@ -7256,7 +7274,8 @@ gif_load (f, img) | |||
| 7256 | memsrc.len = SBYTES (specified_data); | 7274 | memsrc.len = SBYTES (specified_data); |
| 7257 | memsrc.index = 0; | 7275 | memsrc.index = 0; |
| 7258 | 7276 | ||
| 7259 | gif = fn_DGifOpen(&memsrc, gif_read_from_memory); | 7277 | /* Casting return value avoids a GCC warning on W32. */ |
| 7278 | gif = (GifFileType *)fn_DGifOpen(&memsrc, gif_read_from_memory); | ||
| 7260 | if (!gif) | 7279 | if (!gif) |
| 7261 | { | 7280 | { |
| 7262 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); | 7281 | image_error ("Cannot open memory source `%s'", img->spec, Qnil); |
| @@ -7390,7 +7409,8 @@ gif_load (f, img) | |||
| 7390 | 7409 | ||
| 7391 | /* Maybe fill in the background field while we have ximg handy. */ | 7410 | /* Maybe fill in the background field while we have ximg handy. */ |
| 7392 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) | 7411 | if (NILP (image_spec_value (img->spec, QCbackground, NULL))) |
| 7393 | IMAGE_BACKGROUND (img, f, ximg); | 7412 | /* Casting avoids a GCC warning. */ |
| 7413 | IMAGE_BACKGROUND (img, f, (XImagePtr_or_DC)ximg); | ||
| 7394 | 7414 | ||
| 7395 | /* Put the image into the pixmap, then free the X image and its buffer. */ | 7415 | /* Put the image into the pixmap, then free the X image and its buffer. */ |
| 7396 | x_put_x_image (f, ximg, img->pixmap, width, height); | 7416 | x_put_x_image (f, ximg, img->pixmap, width, height); |
| @@ -7400,7 +7420,7 @@ gif_load (f, img) | |||
| 7400 | return 1; | 7420 | return 1; |
| 7401 | } | 7421 | } |
| 7402 | 7422 | ||
| 7403 | #else | 7423 | #else /* !HAVE_GIF */ |
| 7404 | 7424 | ||
| 7405 | #ifdef MAC_OS | 7425 | #ifdef MAC_OS |
| 7406 | static int | 7426 | static int |
diff --git a/src/keyboard.c b/src/keyboard.c index dee131b8c61..7c268dc475e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1509,7 +1509,7 @@ command_loop_1 () | |||
| 1509 | Is this a good idea? */ | 1509 | Is this a good idea? */ |
| 1510 | if (FRAMEP (internal_last_event_frame) | 1510 | if (FRAMEP (internal_last_event_frame) |
| 1511 | && !EQ (internal_last_event_frame, selected_frame)) | 1511 | && !EQ (internal_last_event_frame, selected_frame)) |
| 1512 | Fselect_frame (internal_last_event_frame, Qnil); | 1512 | Fselect_frame (internal_last_event_frame); |
| 1513 | #endif | 1513 | #endif |
| 1514 | /* If it has changed current-menubar from previous value, | 1514 | /* If it has changed current-menubar from previous value, |
| 1515 | really recompute the menubar from the value. */ | 1515 | really recompute the menubar from the value. */ |
diff --git a/src/lisp.h b/src/lisp.h index af07de3fbaa..d523f98f937 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2992,7 +2992,7 @@ extern Lisp_Object do_switch_frame P_ ((Lisp_Object, int, int)); | |||
| 2992 | extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object)); | 2992 | extern Lisp_Object get_frame_param P_ ((struct frame *, Lisp_Object)); |
| 2993 | extern Lisp_Object frame_buffer_predicate P_ ((Lisp_Object)); | 2993 | extern Lisp_Object frame_buffer_predicate P_ ((Lisp_Object)); |
| 2994 | EXFUN (Fframep, 1); | 2994 | EXFUN (Fframep, 1); |
| 2995 | EXFUN (Fselect_frame, 2); | 2995 | EXFUN (Fselect_frame, 1); |
| 2996 | EXFUN (Fselected_frame, 0); | 2996 | EXFUN (Fselected_frame, 0); |
| 2997 | EXFUN (Fwindow_frame, 1); | 2997 | EXFUN (Fwindow_frame, 1); |
| 2998 | EXFUN (Fframe_root_window, 1); | 2998 | EXFUN (Fframe_root_window, 1); |
diff --git a/src/macfns.c b/src/macfns.c index 8ec05b59e19..96f588207d1 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -4375,14 +4375,15 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 4375 | break; | 4375 | break; |
| 4376 | } | 4376 | } |
| 4377 | NavDialogDispose(dialogRef); | 4377 | NavDialogDispose(dialogRef); |
| 4378 | UNBLOCK_INPUT; | ||
| 4378 | } | 4379 | } |
| 4379 | else { | 4380 | else { |
| 4381 | UNBLOCK_INPUT; | ||
| 4380 | /* Fall back on minibuffer if there was a problem */ | 4382 | /* Fall back on minibuffer if there was a problem */ |
| 4381 | file = Fcompleting_read (prompt, intern ("read-file-name-internal"), | 4383 | file = Fcompleting_read (prompt, intern ("read-file-name-internal"), |
| 4382 | dir, mustmatch, dir, Qfile_name_history, | 4384 | dir, mustmatch, dir, Qfile_name_history, |
| 4383 | default_filename, Qnil); | 4385 | default_filename, Qnil); |
| 4384 | } | 4386 | } |
| 4385 | UNBLOCK_INPUT; | ||
| 4386 | } | 4387 | } |
| 4387 | 4388 | ||
| 4388 | UNGCPRO; | 4389 | UNGCPRO; |
diff --git a/src/macterm.c b/src/macterm.c index dd48d43a039..cef213024fa 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -2002,33 +2002,37 @@ static void | |||
| 2002 | mac_compute_glyph_string_overhangs (s) | 2002 | mac_compute_glyph_string_overhangs (s) |
| 2003 | struct glyph_string *s; | 2003 | struct glyph_string *s; |
| 2004 | { | 2004 | { |
| 2005 | Rect r; | 2005 | if (s->cmp == NULL |
| 2006 | MacFontStruct *font = s->font; | 2006 | && s->first_glyph->type == CHAR_GLYPH) |
| 2007 | |||
| 2008 | TextFont (font->mac_fontnum); | ||
| 2009 | TextSize (font->mac_fontsize); | ||
| 2010 | TextFace (font->mac_fontface); | ||
| 2011 | |||
| 2012 | if (s->two_byte_p) | ||
| 2013 | QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); | ||
| 2014 | else | ||
| 2015 | { | 2007 | { |
| 2016 | int i; | 2008 | Rect r; |
| 2017 | char *buf = xmalloc (s->nchars); | 2009 | MacFontStruct *font = s->font; |
| 2018 | 2010 | ||
| 2019 | if (buf == NULL) | 2011 | TextFont (font->mac_fontnum); |
| 2020 | SetRect (&r, 0, 0, 0, 0); | 2012 | TextSize (font->mac_fontsize); |
| 2013 | TextFace (font->mac_fontface); | ||
| 2014 | |||
| 2015 | if (s->two_byte_p) | ||
| 2016 | QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); | ||
| 2021 | else | 2017 | else |
| 2022 | { | 2018 | { |
| 2023 | for (i = 0; i < s->nchars; ++i) | 2019 | int i; |
| 2024 | buf[i] = s->char2b[i].byte2; | 2020 | char *buf = xmalloc (s->nchars); |
| 2025 | QDTextBounds (s->nchars, buf, &r); | 2021 | |
| 2026 | xfree (buf); | 2022 | if (buf == NULL) |
| 2023 | SetRect (&r, 0, 0, 0, 0); | ||
| 2024 | else | ||
| 2025 | { | ||
| 2026 | for (i = 0; i < s->nchars; ++i) | ||
| 2027 | buf[i] = s->char2b[i].byte2; | ||
| 2028 | QDTextBounds (s->nchars, buf, &r); | ||
| 2029 | xfree (buf); | ||
| 2030 | } | ||
| 2027 | } | 2031 | } |
| 2028 | } | ||
| 2029 | 2032 | ||
| 2030 | s->right_overhang = r.right > s->width ? r.right - s->width : 0; | 2033 | s->right_overhang = r.right > s->width ? r.right - s->width : 0; |
| 2031 | s->left_overhang = r.left < 0 ? -r.left : 0; | 2034 | s->left_overhang = r.left < 0 ? -r.left : 0; |
| 2035 | } | ||
| 2032 | } | 2036 | } |
| 2033 | 2037 | ||
| 2034 | 2038 | ||
| @@ -7495,6 +7499,11 @@ Lisp_Object Vmac_pass_command_to_system; | |||
| 7495 | /* If Non-nil, the Mac "Control" key is passed on to the Mac Toolbox | 7499 | /* If Non-nil, the Mac "Control" key is passed on to the Mac Toolbox |
| 7496 | for processing before Emacs sees it. */ | 7500 | for processing before Emacs sees it. */ |
| 7497 | Lisp_Object Vmac_pass_control_to_system; | 7501 | Lisp_Object Vmac_pass_control_to_system; |
| 7502 | |||
| 7503 | /* Points to the variable `inev' in the function XTread_socket. It is | ||
| 7504 | used for passing an input event to the function back from a Carbon | ||
| 7505 | event handler. */ | ||
| 7506 | static struct input_event *read_socket_inev = NULL; | ||
| 7498 | #endif | 7507 | #endif |
| 7499 | 7508 | ||
| 7500 | /* Set in term/mac-win.el to indicate that event loop can now generate | 7509 | /* Set in term/mac-win.el to indicate that event loop can now generate |
| @@ -7627,45 +7636,79 @@ mac_get_mouse_btn (EventRef ref) | |||
| 7627 | 7636 | ||
| 7628 | /* Normally, ConvertEventRefToEventRecord will correctly handle all | 7637 | /* Normally, ConvertEventRefToEventRecord will correctly handle all |
| 7629 | events. However the click of the mouse wheel is not converted to a | 7638 | events. However the click of the mouse wheel is not converted to a |
| 7630 | mouseDown or mouseUp event. This calls ConvertEventRef, but then | 7639 | mouseDown or mouseUp event. Likewise for dead key down events. |
| 7631 | checks to see if it is a mouse up or down carbon event that has not | 7640 | This calls ConvertEventRef, but then checks to see if it is a mouse |
| 7632 | been converted, and if so, converts it by hand (to be picked up in | 7641 | up/down, or a dead key down carbon event that has not been |
| 7633 | the XTread_socket loop). */ | 7642 | converted, and if so, converts it by hand (to be picked up in the |
| 7643 | XTread_socket loop). */ | ||
| 7634 | static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec) | 7644 | static Boolean mac_convert_event_ref (EventRef eventRef, EventRecord *eventRec) |
| 7635 | { | 7645 | { |
| 7636 | Boolean result = ConvertEventRefToEventRecord (eventRef, eventRec); | 7646 | Boolean result = ConvertEventRefToEventRecord (eventRef, eventRec); |
| 7637 | /* Do special case for mouse wheel button. */ | 7647 | |
| 7638 | if (!result && GetEventClass (eventRef) == kEventClassMouse) | 7648 | if (result) |
| 7649 | return result; | ||
| 7650 | |||
| 7651 | switch (GetEventClass (eventRef)) | ||
| 7639 | { | 7652 | { |
| 7640 | UInt32 kind = GetEventKind (eventRef); | 7653 | case kEventClassMouse: |
| 7641 | if (kind == kEventMouseDown && !(eventRec->what == mouseDown)) | 7654 | switch (GetEventKind (eventRef)) |
| 7642 | { | 7655 | { |
| 7656 | case kEventMouseDown: | ||
| 7643 | eventRec->what = mouseDown; | 7657 | eventRec->what = mouseDown; |
| 7644 | result=1; | 7658 | result = 1; |
| 7645 | } | 7659 | break; |
| 7646 | if (kind == kEventMouseUp && !(eventRec->what == mouseUp)) | 7660 | |
| 7647 | { | 7661 | case kEventMouseUp: |
| 7648 | eventRec->what = mouseUp; | 7662 | eventRec->what = mouseUp; |
| 7649 | result=1; | 7663 | result = 1; |
| 7664 | break; | ||
| 7665 | |||
| 7666 | default: | ||
| 7667 | break; | ||
| 7650 | } | 7668 | } |
| 7651 | if (result) | 7669 | |
| 7670 | case kEventClassKeyboard: | ||
| 7671 | switch (GetEventKind (eventRef)) | ||
| 7652 | { | 7672 | { |
| 7653 | /* Need where and when. */ | 7673 | case kEventRawKeyDown: |
| 7654 | UInt32 mods; | 7674 | { |
| 7655 | GetEventParameter (eventRef, kEventParamMouseLocation, | 7675 | unsigned char char_codes; |
| 7656 | typeQDPoint, NULL, sizeof (Point), | 7676 | UInt32 key_code; |
| 7657 | NULL, &eventRec->where); | 7677 | |
| 7658 | /* Use two step process because new event modifiers are | 7678 | eventRec->what = keyDown; |
| 7659 | 32-bit and old are 16-bit. Currently, only loss is | 7679 | GetEventParameter (eventRef, kEventParamKeyMacCharCodes, typeChar, |
| 7660 | NumLock & Fn. */ | 7680 | NULL, sizeof (char), NULL, &char_codes); |
| 7661 | GetEventParameter (eventRef, kEventParamKeyModifiers, | 7681 | GetEventParameter (eventRef, kEventParamKeyCode, typeUInt32, |
| 7662 | typeUInt32, NULL, sizeof (UInt32), | 7682 | NULL, sizeof (UInt32), NULL, &key_code); |
| 7663 | NULL, &mods); | 7683 | eventRec->message = char_codes | ((key_code & 0xff) << 8); |
| 7664 | eventRec->modifiers = mods; | 7684 | result = 1; |
| 7665 | 7685 | } | |
| 7666 | eventRec->when = EventTimeToTicks (GetEventTime (eventRef)); | 7686 | break; |
| 7687 | |||
| 7688 | default: | ||
| 7689 | break; | ||
| 7667 | } | 7690 | } |
| 7691 | |||
| 7692 | default: | ||
| 7693 | break; | ||
| 7668 | } | 7694 | } |
| 7695 | |||
| 7696 | if (result) | ||
| 7697 | { | ||
| 7698 | /* Need where and when. */ | ||
| 7699 | UInt32 mods; | ||
| 7700 | |||
| 7701 | GetEventParameter (eventRef, kEventParamMouseLocation, typeQDPoint, | ||
| 7702 | NULL, sizeof (Point), NULL, &eventRec->where); | ||
| 7703 | /* Use two step process because new event modifiers are 32-bit | ||
| 7704 | and old are 16-bit. Currently, only loss is NumLock & Fn. */ | ||
| 7705 | GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, | ||
| 7706 | NULL, sizeof (UInt32), NULL, &mods); | ||
| 7707 | eventRec->modifiers = mods; | ||
| 7708 | |||
| 7709 | eventRec->when = EventTimeToTicks (GetEventTime (eventRef)); | ||
| 7710 | } | ||
| 7711 | |||
| 7669 | return result; | 7712 | return result; |
| 7670 | } | 7713 | } |
| 7671 | 7714 | ||
| @@ -8235,8 +8278,7 @@ mac_handle_command_event (next_handler, event, data) | |||
| 8235 | } | 8278 | } |
| 8236 | 8279 | ||
| 8237 | static OSErr | 8280 | static OSErr |
| 8238 | init_command_handler (window) | 8281 | init_command_handler () |
| 8239 | WindowPtr window; | ||
| 8240 | { | 8282 | { |
| 8241 | OSErr err = noErr; | 8283 | OSErr err = noErr; |
| 8242 | EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; | 8284 | EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; |
| @@ -8321,6 +8363,68 @@ mac_handle_window_event (next_handler, event, data) | |||
| 8321 | 8363 | ||
| 8322 | return eventNotHandledErr; | 8364 | return eventNotHandledErr; |
| 8323 | } | 8365 | } |
| 8366 | |||
| 8367 | static pascal OSStatus | ||
| 8368 | mac_handle_mouse_event (next_handler, event, data) | ||
| 8369 | EventHandlerCallRef next_handler; | ||
| 8370 | EventRef event; | ||
| 8371 | void *data; | ||
| 8372 | { | ||
| 8373 | OSStatus result; | ||
| 8374 | |||
| 8375 | switch (GetEventKind (event)) | ||
| 8376 | { | ||
| 8377 | case kEventMouseWheelMoved: | ||
| 8378 | { | ||
| 8379 | WindowPtr wp; | ||
| 8380 | struct frame *f; | ||
| 8381 | EventMouseWheelAxis axis; | ||
| 8382 | SInt32 delta; | ||
| 8383 | Point point; | ||
| 8384 | |||
| 8385 | result = CallNextEventHandler (next_handler, event); | ||
| 8386 | if (result != eventNotHandledErr || read_socket_inev == NULL) | ||
| 8387 | return result; | ||
| 8388 | |||
| 8389 | GetEventParameter (event, kEventParamWindowRef, typeWindowRef, | ||
| 8390 | NULL, sizeof (WindowRef), NULL, &wp); | ||
| 8391 | f = mac_window_to_frame (wp); | ||
| 8392 | if (f != mac_focus_frame (&one_mac_display_info)) | ||
| 8393 | break; | ||
| 8394 | |||
| 8395 | GetEventParameter (event, kEventParamMouseWheelAxis, | ||
| 8396 | typeMouseWheelAxis, NULL, | ||
| 8397 | sizeof (EventMouseWheelAxis), NULL, &axis); | ||
| 8398 | if (axis != kEventMouseWheelAxisY) | ||
| 8399 | break; | ||
| 8400 | |||
| 8401 | GetEventParameter (event, kEventParamMouseWheelDelta, typeSInt32, | ||
| 8402 | NULL, sizeof (SInt32), NULL, &delta); | ||
| 8403 | GetEventParameter (event, kEventParamMouseLocation, typeQDPoint, | ||
| 8404 | NULL, sizeof (Point), NULL, &point); | ||
| 8405 | read_socket_inev->kind = WHEEL_EVENT; | ||
| 8406 | read_socket_inev->code = 0; | ||
| 8407 | read_socket_inev->modifiers = | ||
| 8408 | (mac_event_to_emacs_modifiers (event) | ||
| 8409 | | ((delta < 0) ? down_modifier : up_modifier)); | ||
| 8410 | SetPortWindowPort (wp); | ||
| 8411 | GlobalToLocal (&point); | ||
| 8412 | XSETINT (read_socket_inev->x, point.h); | ||
| 8413 | XSETINT (read_socket_inev->y, point.v); | ||
| 8414 | XSETFRAME (read_socket_inev->frame_or_window, f); | ||
| 8415 | read_socket_inev->timestamp = | ||
| 8416 | EventTimeToTicks (GetEventTime (event)) * (1000/60); | ||
| 8417 | |||
| 8418 | return noErr; | ||
| 8419 | } | ||
| 8420 | break; | ||
| 8421 | |||
| 8422 | default: | ||
| 8423 | break; | ||
| 8424 | } | ||
| 8425 | |||
| 8426 | return eventNotHandledErr; | ||
| 8427 | } | ||
| 8324 | #endif /* USE_CARBON_EVENTS */ | 8428 | #endif /* USE_CARBON_EVENTS */ |
| 8325 | 8429 | ||
| 8326 | 8430 | ||
| @@ -8330,16 +8434,24 @@ install_window_handler (window) | |||
| 8330 | { | 8434 | { |
| 8331 | OSErr err = noErr; | 8435 | OSErr err = noErr; |
| 8332 | #if USE_CARBON_EVENTS | 8436 | #if USE_CARBON_EVENTS |
| 8333 | EventTypeSpec specs[] = {{kEventClassWindow, kEventWindowUpdate}, | 8437 | EventTypeSpec specs_window[] = |
| 8334 | {kEventClassWindow, kEventWindowBoundsChanging}}; | 8438 | {{kEventClassWindow, kEventWindowUpdate}, |
| 8335 | static EventHandlerUPP handle_window_event_UPP = NULL; | 8439 | {kEventClassWindow, kEventWindowBoundsChanging}}; |
| 8336 | 8440 | EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; | |
| 8337 | if (handle_window_event_UPP == NULL) | 8441 | static EventHandlerUPP handle_window_eventUPP = NULL; |
| 8338 | handle_window_event_UPP = NewEventHandlerUPP (mac_handle_window_event); | 8442 | static EventHandlerUPP handle_mouse_eventUPP = NULL; |
| 8339 | 8443 | ||
| 8340 | err = InstallWindowEventHandler (window, handle_window_event_UPP, | 8444 | if (handle_window_eventUPP == NULL) |
| 8341 | GetEventTypeCount (specs), specs, | 8445 | handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); |
| 8342 | NULL, NULL); | 8446 | if (handle_mouse_eventUPP == NULL) |
| 8447 | handle_mouse_eventUPP = NewEventHandlerUPP (mac_handle_mouse_event); | ||
| 8448 | err = InstallWindowEventHandler (window, handle_window_eventUPP, | ||
| 8449 | GetEventTypeCount (specs_window), | ||
| 8450 | specs_window, NULL, NULL); | ||
| 8451 | if (err == noErr) | ||
| 8452 | err = InstallWindowEventHandler (window, handle_mouse_eventUPP, | ||
| 8453 | GetEventTypeCount (specs_mouse), | ||
| 8454 | specs_mouse, NULL, NULL); | ||
| 8343 | #endif | 8455 | #endif |
| 8344 | #if TARGET_API_MAC_CARBON | 8456 | #if TARGET_API_MAC_CARBON |
| 8345 | if (mac_do_track_dragUPP == NULL) | 8457 | if (mac_do_track_dragUPP == NULL) |
| @@ -8891,68 +9003,19 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8891 | #if USE_CARBON_EVENTS | 9003 | #if USE_CARBON_EVENTS |
| 8892 | /* Handle new events */ | 9004 | /* Handle new events */ |
| 8893 | if (!mac_convert_event_ref (eventRef, &er)) | 9005 | if (!mac_convert_event_ref (eventRef, &er)) |
| 8894 | switch (GetEventClass (eventRef)) | 9006 | { |
| 8895 | { | 9007 | /* There used to be a handler for the kEventMouseWheelMoved |
| 8896 | case kEventClassWindow: | 9008 | event here. But as of Mac OS X 10.4, this kind of event |
| 8897 | if (GetEventKind (eventRef) == kEventWindowBoundsChanged) | 9009 | is not directly posted to the main event queue by |
| 8898 | { | 9010 | two-finger scrolling on the trackpad. Instead, some |
| 8899 | WindowPtr window_ptr; | 9011 | private event is posted and it is converted to a wheel |
| 8900 | GetEventParameter(eventRef, kEventParamDirectObject, | 9012 | event by the default handler for the application target. |
| 8901 | typeWindowRef, NULL, sizeof(WindowPtr), | 9013 | The converted one can be received by a Carbon event |
| 8902 | NULL, &window_ptr); | 9014 | handler installed on a window target. */ |
| 8903 | f = mac_window_to_frame (window_ptr); | 9015 | read_socket_inev = &inev; |
| 8904 | if (f && !f->async_iconified) | 9016 | SendEventToEventTarget (eventRef, toolbox_dispatcher); |
| 8905 | x_real_positions (f, &f->left_pos, &f->top_pos); | 9017 | read_socket_inev = NULL; |
| 8906 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | 9018 | } |
| 8907 | } | ||
| 8908 | break; | ||
| 8909 | case kEventClassMouse: | ||
| 8910 | if (GetEventKind (eventRef) == kEventMouseWheelMoved) | ||
| 8911 | { | ||
| 8912 | SInt32 delta; | ||
| 8913 | Point point; | ||
| 8914 | struct frame *f = mac_focus_frame (dpyinfo); | ||
| 8915 | WindowPtr window_ptr; | ||
| 8916 | |||
| 8917 | #if 0 | ||
| 8918 | if (dpyinfo->x_focus_frame == NULL) | ||
| 8919 | { | ||
| 8920 | /* Beep if wheel move occurs when all the frames | ||
| 8921 | are invisible. */ | ||
| 8922 | SysBeep(1); | ||
| 8923 | break; | ||
| 8924 | } | ||
| 8925 | #endif | ||
| 8926 | |||
| 8927 | GetEventParameter(eventRef, kEventParamMouseWheelDelta, | ||
| 8928 | typeSInt32, NULL, sizeof (SInt32), | ||
| 8929 | NULL, &delta); | ||
| 8930 | GetEventParameter(eventRef, kEventParamMouseLocation, | ||
| 8931 | typeQDPoint, NULL, sizeof (Point), | ||
| 8932 | NULL, &point); | ||
| 8933 | inev.kind = WHEEL_EVENT; | ||
| 8934 | inev.code = 0; | ||
| 8935 | inev.modifiers = (mac_event_to_emacs_modifiers (eventRef) | ||
| 8936 | | ((delta < 0) ? down_modifier | ||
| 8937 | : up_modifier)); | ||
| 8938 | window_ptr = FRAME_MAC_WINDOW (f); | ||
| 8939 | SetPortWindowPort (window_ptr); | ||
| 8940 | GlobalToLocal (&point); | ||
| 8941 | XSETINT (inev.x, point.h); | ||
| 8942 | XSETINT (inev.y, point.v); | ||
| 8943 | XSETFRAME (inev.frame_or_window, | ||
| 8944 | mac_window_to_frame (window_ptr)); | ||
| 8945 | inev.timestamp = EventTimeToTicks (GetEventTime (eventRef))*(1000/60); | ||
| 8946 | } | ||
| 8947 | else | ||
| 8948 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | ||
| 8949 | |||
| 8950 | break; | ||
| 8951 | |||
| 8952 | default: | ||
| 8953 | /* Send the event to the appropriate receiver. */ | ||
| 8954 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | ||
| 8955 | } | ||
| 8956 | else | 9019 | else |
| 8957 | #endif /* USE_CARBON_EVENTS */ | 9020 | #endif /* USE_CARBON_EVENTS */ |
| 8958 | switch (er.what) | 9021 | switch (er.what) |
| @@ -9388,7 +9451,10 @@ XTread_socket (sd, expected, hold_quit) | |||
| 9388 | if ((!NILP (Vmac_pass_command_to_system) | 9451 | if ((!NILP (Vmac_pass_command_to_system) |
| 9389 | || !(er.modifiers & cmdKey)) | 9452 | || !(er.modifiers & cmdKey)) |
| 9390 | && (!NILP (Vmac_pass_control_to_system) | 9453 | && (!NILP (Vmac_pass_control_to_system) |
| 9391 | || !(er.modifiers & controlKey))) | 9454 | || !(er.modifiers & controlKey)) |
| 9455 | && (!NILP (Vmac_command_key_is_meta) | ||
| 9456 | && NILP (Vmac_option_modifier) | ||
| 9457 | || !(er.modifiers & optionKey))) | ||
| 9392 | if (SendEventToEventTarget (eventRef, toolbox_dispatcher) | 9458 | if (SendEventToEventTarget (eventRef, toolbox_dispatcher) |
| 9393 | != eventNotHandledErr) | 9459 | != eventNotHandledErr) |
| 9394 | break; | 9460 | break; |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 471f0cbc6ea..0ab23c72f78 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -170,7 +170,8 @@ $(EMACS): $(DOC) $(TEMACS) | |||
| 170 | # (it is the preload heap size in MB). | 170 | # (it is the preload heap size in MB). |
| 171 | # | 171 | # |
| 172 | temacs: $(BLD) $(TEMACS) | 172 | temacs: $(BLD) $(TEMACS) |
| 173 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) | 173 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) \ |
| 174 | ../nt/$(BLD)/addsection.exe | ||
| 174 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) | 175 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) |
| 175 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 20 | 176 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 20 |
| 176 | echo $(OBJ0) > $(BLD)/buildobj.lst | 177 | echo $(OBJ0) > $(BLD)/buildobj.lst |
diff --git a/src/process.c b/src/process.c index d60fe1e3bf6..b61c6e8d6fe 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6822,7 +6822,7 @@ The value takes effect when `start-process' is called. */); | |||
| 6822 | doc: /* If non-nil, improve receive buffering by delaying after short reads. | 6822 | doc: /* If non-nil, improve receive buffering by delaying after short reads. |
| 6823 | On some systems, when Emacs reads the output from a subprocess, the output data | 6823 | On some systems, when Emacs reads the output from a subprocess, the output data |
| 6824 | is read in very small blocks, potentially resulting in very poor performance. | 6824 | is read in very small blocks, potentially resulting in very poor performance. |
| 6825 | This behaviour can be remedied to some extent by setting this variable to a | 6825 | This behavior can be remedied to some extent by setting this variable to a |
| 6826 | non-nil value, as it will automatically delay reading from such processes, to | 6826 | non-nil value, as it will automatically delay reading from such processes, to |
| 6827 | allowing them to produce more output before Emacs tries to read it. | 6827 | allowing them to produce more output before Emacs tries to read it. |
| 6828 | If the value is t, the delay is reset after each write to the process; any other | 6828 | If the value is t, the delay is reset after each write to the process; any other |
diff --git a/src/unexw32.c b/src/unexw32.c index 1b2dbe74c31..ebeb7355673 100644 --- a/src/unexw32.c +++ b/src/unexw32.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* unexec for GNU Emacs on Windows NT. | 1 | /* unexec for GNU Emacs on Windows NT. |
| 2 | Copyright (C) 1994 Free Software Foundation, Inc. | 2 | Copyright (C) 1994, 2005 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -491,27 +491,34 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 491 | PIMAGE_SECTION_HEADER dst_section; | 491 | PIMAGE_SECTION_HEADER dst_section; |
| 492 | DWORD offset; | 492 | DWORD offset; |
| 493 | int i; | 493 | int i; |
| 494 | int be_verbose = GetEnvironmentVariable ("DEBUG_DUMP", NULL, 0) > 0; | ||
| 494 | 495 | ||
| 495 | #define COPY_CHUNK(message, src, size) \ | 496 | #define COPY_CHUNK(message, src, size, verbose) \ |
| 496 | do { \ | 497 | do { \ |
| 497 | unsigned char *s = (void *)(src); \ | 498 | unsigned char *s = (void *)(src); \ |
| 498 | unsigned long count = (size); \ | 499 | unsigned long count = (size); \ |
| 499 | printf ("%s\n", (message)); \ | 500 | if (verbose) \ |
| 500 | printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base); \ | 501 | { \ |
| 501 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | 502 | printf ("%s\n", (message)); \ |
| 502 | printf ("\t0x%08x Size in bytes.\n", count); \ | 503 | printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base); \ |
| 504 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | ||
| 505 | printf ("\t0x%08x Size in bytes.\n", count); \ | ||
| 506 | } \ | ||
| 503 | memcpy (dst, s, count); \ | 507 | memcpy (dst, s, count); \ |
| 504 | dst += count; \ | 508 | dst += count; \ |
| 505 | } while (0) | 509 | } while (0) |
| 506 | 510 | ||
| 507 | #define COPY_PROC_CHUNK(message, src, size) \ | 511 | #define COPY_PROC_CHUNK(message, src, size, verbose) \ |
| 508 | do { \ | 512 | do { \ |
| 509 | unsigned char *s = (void *)(src); \ | 513 | unsigned char *s = (void *)(src); \ |
| 510 | unsigned long count = (size); \ | 514 | unsigned long count = (size); \ |
| 511 | printf ("%s\n", (message)); \ | 515 | if (verbose) \ |
| 512 | printf ("\t0x%08x Address in process.\n", s); \ | 516 | { \ |
| 513 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | 517 | printf ("%s\n", (message)); \ |
| 514 | printf ("\t0x%08x Size in bytes.\n", count); \ | 518 | printf ("\t0x%08x Address in process.\n", s); \ |
| 519 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | ||
| 520 | printf ("\t0x%08x Size in bytes.\n", count); \ | ||
| 521 | } \ | ||
| 515 | memcpy (dst, s, count); \ | 522 | memcpy (dst, s, count); \ |
| 516 | dst += count; \ | 523 | dst += count; \ |
| 517 | } while (0) | 524 | } while (0) |
| @@ -542,13 +549,14 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 542 | dst = (unsigned char *) p_outfile->file_base; | 549 | dst = (unsigned char *) p_outfile->file_base; |
| 543 | 550 | ||
| 544 | COPY_CHUNK ("Copying DOS header...", dos_header, | 551 | COPY_CHUNK ("Copying DOS header...", dos_header, |
| 545 | (DWORD) nt_header - (DWORD) dos_header); | 552 | (DWORD) nt_header - (DWORD) dos_header, be_verbose); |
| 546 | dst_nt_header = (PIMAGE_NT_HEADERS) dst; | 553 | dst_nt_header = (PIMAGE_NT_HEADERS) dst; |
| 547 | COPY_CHUNK ("Copying NT header...", nt_header, | 554 | COPY_CHUNK ("Copying NT header...", nt_header, |
| 548 | (DWORD) section - (DWORD) nt_header); | 555 | (DWORD) section - (DWORD) nt_header, be_verbose); |
| 549 | dst_section = (PIMAGE_SECTION_HEADER) dst; | 556 | dst_section = (PIMAGE_SECTION_HEADER) dst; |
| 550 | COPY_CHUNK ("Copying section table...", section, | 557 | COPY_CHUNK ("Copying section table...", section, |
| 551 | nt_header->FileHeader.NumberOfSections * sizeof (*section)); | 558 | nt_header->FileHeader.NumberOfSections * sizeof (*section), |
| 559 | be_verbose); | ||
| 552 | 560 | ||
| 553 | /* Align the first section's raw data area, and set the header size | 561 | /* Align the first section's raw data area, and set the header size |
| 554 | field accordingly. */ | 562 | field accordingly. */ |
| @@ -558,7 +566,9 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 558 | for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) | 566 | for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) |
| 559 | { | 567 | { |
| 560 | char msg[100]; | 568 | char msg[100]; |
| 561 | sprintf (msg, "Copying raw data for %s...", section->Name); | 569 | /* Windows section names are fixed 8-char strings, only |
| 570 | zero-terminated if the name is shorter than 8 characters. */ | ||
| 571 | sprintf (msg, "Copying raw data for %.8s...", section->Name); | ||
| 562 | 572 | ||
| 563 | dst_save = dst; | 573 | dst_save = dst; |
| 564 | 574 | ||
| @@ -571,7 +581,7 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 571 | /* Can always copy the original raw data. */ | 581 | /* Can always copy the original raw data. */ |
| 572 | COPY_CHUNK | 582 | COPY_CHUNK |
| 573 | (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile), | 583 | (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile), |
| 574 | section->SizeOfRawData); | 584 | section->SizeOfRawData, be_verbose); |
| 575 | /* Ensure alignment slop is zeroed. */ | 585 | /* Ensure alignment slop is zeroed. */ |
| 576 | ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment); | 586 | ROUND_UP_DST_AND_ZERO (dst_nt_header->OptionalHeader.FileAlignment); |
| 577 | 587 | ||
| @@ -580,7 +590,8 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 580 | { | 590 | { |
| 581 | dst = dst_save | 591 | dst = dst_save |
| 582 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (data_start), dst_section); | 592 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (data_start), dst_section); |
| 583 | COPY_PROC_CHUNK ("Dumping initialized data...", data_start, data_size); | 593 | COPY_PROC_CHUNK ("Dumping initialized data...", |
| 594 | data_start, data_size, be_verbose); | ||
| 584 | dst = dst_save + dst_section->SizeOfRawData; | 595 | dst = dst_save + dst_section->SizeOfRawData; |
| 585 | } | 596 | } |
| 586 | if (section == bss_section) | 597 | if (section == bss_section) |
| @@ -589,7 +600,8 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 589 | data size as necessary. */ | 600 | data size as necessary. */ |
| 590 | dst = dst_save | 601 | dst = dst_save |
| 591 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start), dst_section); | 602 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start), dst_section); |
| 592 | COPY_PROC_CHUNK ("Dumping bss data...", bss_start, bss_size); | 603 | COPY_PROC_CHUNK ("Dumping bss data...", bss_start, |
| 604 | bss_size, be_verbose); | ||
| 593 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); | 605 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); |
| 594 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); | 606 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); |
| 595 | /* Determine new size of raw data area. */ | 607 | /* Determine new size of raw data area. */ |
| @@ -604,7 +616,8 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 604 | section's raw data size as necessary. */ | 616 | section's raw data size as necessary. */ |
| 605 | dst = dst_save | 617 | dst = dst_save |
| 606 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start_static), dst_section); | 618 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (bss_start_static), dst_section); |
| 607 | COPY_PROC_CHUNK ("Dumping static bss data...", bss_start_static, bss_size_static); | 619 | COPY_PROC_CHUNK ("Dumping static bss data...", bss_start_static, |
| 620 | bss_size_static, be_verbose); | ||
| 608 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); | 621 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); |
| 609 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); | 622 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); |
| 610 | /* Determine new size of raw data area. */ | 623 | /* Determine new size of raw data area. */ |
| @@ -622,7 +635,8 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 622 | section's size to the appropriate size. */ | 635 | section's size to the appropriate size. */ |
| 623 | dst = dst_save | 636 | dst = dst_save |
| 624 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (heap_start), dst_section); | 637 | + RVA_TO_SECTION_OFFSET (PTR_TO_RVA (heap_start), dst_section); |
| 625 | COPY_PROC_CHUNK ("Dumping heap...", heap_start, heap_size); | 638 | COPY_PROC_CHUNK ("Dumping heap...", heap_start, heap_size, |
| 639 | be_verbose); | ||
| 626 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); | 640 | ROUND_UP_DST (dst_nt_header->OptionalHeader.FileAlignment); |
| 627 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); | 641 | dst_section->PointerToRawData = PTR_TO_OFFSET (dst_save, p_outfile); |
| 628 | /* Determine new size of raw data area. */ | 642 | /* Determine new size of raw data area. */ |
| @@ -657,7 +671,7 @@ copy_executable_and_dump_data (file_data *p_infile, | |||
| 657 | COPY_CHUNK | 671 | COPY_CHUNK |
| 658 | ("Copying remainder of executable...", | 672 | ("Copying remainder of executable...", |
| 659 | OFFSET_TO_PTR (offset, p_infile), | 673 | OFFSET_TO_PTR (offset, p_infile), |
| 660 | p_infile->size - offset); | 674 | p_infile->size - offset, be_verbose); |
| 661 | 675 | ||
| 662 | /* Final size for new image. */ | 676 | /* Final size for new image. */ |
| 663 | p_outfile->size = DST_TO_OFFSET (); | 677 | p_outfile->size = DST_TO_OFFSET (); |
diff --git a/src/w32bdf.c b/src/w32bdf.c index 5f073dc8478..425669ee2a5 100644 --- a/src/w32bdf.c +++ b/src/w32bdf.c | |||
| @@ -604,7 +604,7 @@ create_offscreen_bitmap(HDC hdc, int width, int height, unsigned char **bitsp) | |||
| 604 | info.c[1].rgbRed = info.c[1].rgbGreen = info.c[1].rgbBlue = 255; | 604 | info.c[1].rgbRed = info.c[1].rgbGreen = info.c[1].rgbBlue = 255; |
| 605 | 605 | ||
| 606 | return CreateDIBSection(hdc, (LPBITMAPINFO)&info, | 606 | return CreateDIBSection(hdc, (LPBITMAPINFO)&info, |
| 607 | DIB_RGB_COLORS, bitsp, NULL, 0); | 607 | DIB_RGB_COLORS, (void **)bitsp, NULL, 0); |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | glyph_metric * | 610 | glyph_metric * |
diff --git a/src/w32fns.c b/src/w32fns.c index e05c45c2a4e..db7297059a2 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7821,6 +7821,19 @@ file_dialog_callback (hwnd, msg, wParam, lParam) | |||
| 7821 | return 0; | 7821 | return 0; |
| 7822 | } | 7822 | } |
| 7823 | 7823 | ||
| 7824 | /* Since we compile with _WIN32_WINNT set to 0x0400 (for NT4 compatibility) | ||
| 7825 | we end up with the old file dialogs. Define a big enough struct for the | ||
| 7826 | new dialog to trick GetOpenFileName into giving us the new dialogs on | ||
| 7827 | Windows 2000 and XP. */ | ||
| 7828 | typedef struct | ||
| 7829 | { | ||
| 7830 | OPENFILENAME real_details; | ||
| 7831 | void * pReserved; | ||
| 7832 | DWORD dwReserved; | ||
| 7833 | DWORD FlagsEx; | ||
| 7834 | } NEWOPENFILENAME; | ||
| 7835 | |||
| 7836 | |||
| 7824 | DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, | 7837 | DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, |
| 7825 | doc: /* Read file name, prompting with PROMPT in directory DIR. | 7838 | doc: /* Read file name, prompting with PROMPT in directory DIR. |
| 7826 | Use a file selection dialog. | 7839 | Use a file selection dialog. |
| @@ -7869,39 +7882,58 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 7869 | filename[0] = '\0'; | 7882 | filename[0] = '\0'; |
| 7870 | 7883 | ||
| 7871 | { | 7884 | { |
| 7872 | OPENFILENAME file_details; | 7885 | NEWOPENFILENAME new_file_details; |
| 7873 | 7886 | BOOL file_opened = FALSE; | |
| 7887 | OPENFILENAME * file_details = &new_file_details.real_details; | ||
| 7888 | |||
| 7874 | /* Prevent redisplay. */ | 7889 | /* Prevent redisplay. */ |
| 7875 | specbind (Qinhibit_redisplay, Qt); | 7890 | specbind (Qinhibit_redisplay, Qt); |
| 7876 | BLOCK_INPUT; | 7891 | BLOCK_INPUT; |
| 7877 | 7892 | ||
| 7878 | bzero (&file_details, sizeof (file_details)); | 7893 | bzero (&new_file_details, sizeof (new_file_details)); |
| 7879 | file_details.lStructSize = sizeof (file_details); | 7894 | /* Apparently NT4 crashes if you give it an unexpected size. |
| 7880 | file_details.hwndOwner = FRAME_W32_WINDOW (f); | 7895 | I'm not sure about Windows 9x, so play it safe. */ |
| 7896 | if (w32_major_version > 4 && w32_major_version < 95) | ||
| 7897 | file_details->lStructSize = sizeof (new_file_details); | ||
| 7898 | else | ||
| 7899 | file_details->lStructSize = sizeof (file_details); | ||
| 7900 | |||
| 7901 | file_details->hwndOwner = FRAME_W32_WINDOW (f); | ||
| 7881 | /* Undocumented Bug in Common File Dialog: | 7902 | /* Undocumented Bug in Common File Dialog: |
| 7882 | If a filter is not specified, shell links are not resolved. */ | 7903 | If a filter is not specified, shell links are not resolved. */ |
| 7883 | file_details.lpstrFilter = "All Files (*.*)\0*.*\0Directories\0*|*\0\0"; | 7904 | file_details->lpstrFilter = "All Files (*.*)\0*.*\0Directories\0*|*\0\0"; |
| 7884 | file_details.lpstrFile = filename; | 7905 | file_details->lpstrFile = filename; |
| 7885 | file_details.nMaxFile = sizeof (filename); | 7906 | file_details->nMaxFile = sizeof (filename); |
| 7886 | file_details.lpstrInitialDir = init_dir; | 7907 | file_details->lpstrInitialDir = init_dir; |
| 7887 | file_details.lpstrTitle = SDATA (prompt); | 7908 | file_details->lpstrTitle = SDATA (prompt); |
| 7888 | 7909 | ||
| 7889 | if (! NILP (only_dir_p)) | 7910 | if (! NILP (only_dir_p)) |
| 7890 | default_filter_index = 2; | 7911 | default_filter_index = 2; |
| 7891 | 7912 | ||
| 7892 | file_details.nFilterIndex = default_filter_index; | 7913 | file_details->nFilterIndex = default_filter_index; |
| 7893 | 7914 | ||
| 7894 | file_details.Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR | 7915 | file_details->Flags = (OFN_HIDEREADONLY | OFN_NOCHANGEDIR |
| 7895 | | OFN_EXPLORER | OFN_ENABLEHOOK); | 7916 | | OFN_EXPLORER | OFN_ENABLEHOOK); |
| 7896 | if (!NILP (mustmatch)) | 7917 | if (!NILP (mustmatch)) |
| 7897 | file_details.Flags |= OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST; | 7918 | { |
| 7919 | /* Require that the path to the parent directory exists. */ | ||
| 7920 | file_details->Flags |= OFN_PATHMUSTEXIST; | ||
| 7921 | /* If we are looking for a file, require that it exists. */ | ||
| 7922 | if (NILP (only_dir_p)) | ||
| 7923 | file_details->Flags |= OFN_FILEMUSTEXIST; | ||
| 7924 | } | ||
| 7925 | |||
| 7926 | file_details->lpfnHook = (LPOFNHOOKPROC) file_dialog_callback; | ||
| 7898 | 7927 | ||
| 7899 | file_details.lpfnHook = (LPOFNHOOKPROC) file_dialog_callback; | 7928 | file_opened = GetOpenFileName (file_details); |
| 7900 | 7929 | ||
| 7901 | if (GetOpenFileName (&file_details)) | 7930 | UNBLOCK_INPUT; |
| 7931 | |||
| 7932 | if (file_opened) | ||
| 7902 | { | 7933 | { |
| 7903 | dostounix_filename (filename); | 7934 | dostounix_filename (filename); |
| 7904 | if (file_details.nFilterIndex == 2) | 7935 | |
| 7936 | if (file_details->nFilterIndex == 2) | ||
| 7905 | { | 7937 | { |
| 7906 | /* "Directories" selected - strip dummy file name. */ | 7938 | /* "Directories" selected - strip dummy file name. */ |
| 7907 | char * last = strrchr (filename, '/'); | 7939 | char * last = strrchr (filename, '/'); |
| @@ -7919,7 +7951,6 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 7919 | dir, mustmatch, dir, Qfile_name_history, | 7951 | dir, mustmatch, dir, Qfile_name_history, |
| 7920 | default_filename, Qnil); | 7952 | default_filename, Qnil); |
| 7921 | 7953 | ||
| 7922 | UNBLOCK_INPUT; | ||
| 7923 | file = unbind_to (count, file); | 7954 | file = unbind_to (count, file); |
| 7924 | } | 7955 | } |
| 7925 | 7956 | ||
| @@ -8760,7 +8791,7 @@ fontsets are automatically created. */); | |||
| 8760 | DEFVAR_BOOL ("w32-strict-painting", | 8791 | DEFVAR_BOOL ("w32-strict-painting", |
| 8761 | &w32_strict_painting, | 8792 | &w32_strict_painting, |
| 8762 | doc: /* Non-nil means use strict rules for repainting frames. | 8793 | doc: /* Non-nil means use strict rules for repainting frames. |
| 8763 | Set this to nil to get the old behaviour for repainting; this should | 8794 | Set this to nil to get the old behavior for repainting; this should |
| 8764 | only be necessary if the default setting causes problems. */); | 8795 | only be necessary if the default setting causes problems. */); |
| 8765 | w32_strict_painting = 1; | 8796 | w32_strict_painting = 1; |
| 8766 | 8797 | ||
| @@ -8953,24 +8984,25 @@ void globals_of_w32fns () | |||
| 8953 | 8984 | ||
| 8954 | #undef abort | 8985 | #undef abort |
| 8955 | 8986 | ||
| 8987 | void w32_abort (void) NO_RETURN; | ||
| 8988 | |||
| 8956 | void | 8989 | void |
| 8957 | w32_abort() | 8990 | w32_abort() |
| 8958 | { | 8991 | { |
| 8959 | int button; | 8992 | int button; |
| 8960 | button = MessageBox (NULL, | 8993 | button = MessageBox (NULL, |
| 8961 | "A fatal error has occurred!\n\n" | 8994 | "A fatal error has occurred!\n\n" |
| 8962 | "Select Abort to exit, Retry to debug, Ignore to continue", | 8995 | "Would you like to attach a debugger?\n\n" |
| 8996 | "Select YES to debug, NO to abort Emacs", | ||
| 8963 | "Emacs Abort Dialog", | 8997 | "Emacs Abort Dialog", |
| 8964 | MB_ICONEXCLAMATION | MB_TASKMODAL | 8998 | MB_ICONEXCLAMATION | MB_TASKMODAL |
| 8965 | | MB_SETFOREGROUND | MB_ABORTRETRYIGNORE); | 8999 | | MB_SETFOREGROUND | MB_YESNO); |
| 8966 | switch (button) | 9000 | switch (button) |
| 8967 | { | 9001 | { |
| 8968 | case IDRETRY: | 9002 | case IDYES: |
| 8969 | DebugBreak (); | 9003 | DebugBreak (); |
| 8970 | break; | 9004 | exit (2); /* tell the compiler we will never return */ |
| 8971 | case IDIGNORE: | 9005 | case IDNO: |
| 8972 | break; | ||
| 8973 | case IDABORT: | ||
| 8974 | default: | 9006 | default: |
| 8975 | abort (); | 9007 | abort (); |
| 8976 | break; | 9008 | break; |
diff --git a/src/w32term.c b/src/w32term.c index 51f001bfd45..0bb5607512c 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -89,6 +89,10 @@ static int any_help_event_p; | |||
| 89 | /* Last window where we saw the mouse. Used by mouse-autoselect-window. */ | 89 | /* Last window where we saw the mouse. Used by mouse-autoselect-window. */ |
| 90 | static Lisp_Object last_window; | 90 | static Lisp_Object last_window; |
| 91 | 91 | ||
| 92 | /* Non-zero means make use of UNDERLINE_POSITION font properties. | ||
| 93 | (Not yet supported, see TODO in x_draw_glyph_string.) */ | ||
| 94 | int x_use_underline_position_properties; | ||
| 95 | |||
| 92 | extern unsigned int msh_mousewheel; | 96 | extern unsigned int msh_mousewheel; |
| 93 | 97 | ||
| 94 | extern void free_frame_menubar (); | 98 | extern void free_frame_menubar (); |
| @@ -2639,7 +2643,9 @@ x_draw_glyph_string (s) | |||
| 2639 | unsigned long dy = s->height - h; | 2643 | unsigned long dy = s->height - h; |
| 2640 | 2644 | ||
| 2641 | /* TODO: Use font information for positioning and thickness | 2645 | /* TODO: Use font information for positioning and thickness |
| 2642 | of underline. See OUTLINETEXTMETRIC, and xterm.c. */ | 2646 | of underline. See OUTLINETEXTMETRIC, and xterm.c. |
| 2647 | Note: If you make this work, don't forget to change the | ||
| 2648 | doc string of x-use-underline-position-properties below. */ | ||
| 2643 | if (s->face->underline_defaulted_p) | 2649 | if (s->face->underline_defaulted_p) |
| 2644 | { | 2650 | { |
| 2645 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, | 2651 | w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, |
| @@ -6707,6 +6713,18 @@ the cursor have no effect. */); | |||
| 6707 | &w32_use_visible_system_caret, 0)) | 6713 | &w32_use_visible_system_caret, 0)) |
| 6708 | w32_use_visible_system_caret = 0; | 6714 | w32_use_visible_system_caret = 0; |
| 6709 | 6715 | ||
| 6716 | /* We don't yet support this, but defining this here avoids whining | ||
| 6717 | from cus-start.el and other places, like "M-x set-variable". */ | ||
| 6718 | DEFVAR_BOOL ("x-use-underline-position-properties", | ||
| 6719 | &x_use_underline_position_properties, | ||
| 6720 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | ||
| 6721 | nil means ignore them. If you encounter fonts with bogus | ||
| 6722 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | ||
| 6723 | to 4.1, set this to nil. | ||
| 6724 | |||
| 6725 | NOTE: Not supported on MS-Windows yet. */); | ||
| 6726 | x_use_underline_position_properties = 0; | ||
| 6727 | |||
| 6710 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, | 6728 | DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, |
| 6711 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); | 6729 | doc: /* If not nil, Emacs uses toolkit scroll bars. */); |
| 6712 | Vx_toolkit_scroll_bars = Qt; | 6730 | Vx_toolkit_scroll_bars = Qt; |
diff --git a/src/window.c b/src/window.c index 4d7c71f82c6..8e1a97ee1aa 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3234,7 +3234,7 @@ selects the buffer of the selected window before each command. */) | |||
| 3234 | so that FRAME_FOCUS_FRAME is moved appropriately as we | 3234 | so that FRAME_FOCUS_FRAME is moved appropriately as we |
| 3235 | move around in the state where a minibuffer in a separate | 3235 | move around in the state where a minibuffer in a separate |
| 3236 | frame is active. */ | 3236 | frame is active. */ |
| 3237 | Fselect_frame (WINDOW_FRAME (w), Qnil); | 3237 | Fselect_frame (WINDOW_FRAME (w)); |
| 3238 | } | 3238 | } |
| 3239 | else | 3239 | else |
| 3240 | sf->selected_window = window; | 3240 | sf->selected_window = window; |
diff --git a/src/xdisp.c b/src/xdisp.c index 8d146ebcb23..71fa930a4c6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1901,7 +1901,7 @@ get_phys_cursor_geometry (w, row, glyph, heightp) | |||
| 1901 | int *heightp; | 1901 | int *heightp; |
| 1902 | { | 1902 | { |
| 1903 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 1903 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 1904 | int x, y, wd, h, h0, y0; | 1904 | int y, wd, h, h0, y0; |
| 1905 | 1905 | ||
| 1906 | /* Compute the width of the rectangle to draw. If on a stretch | 1906 | /* Compute the width of the rectangle to draw. If on a stretch |
| 1907 | glyph, and `x-stretch-block-cursor' is nil, don't draw a | 1907 | glyph, and `x-stretch-block-cursor' is nil, don't draw a |
| @@ -8358,7 +8358,6 @@ static Lisp_Object | |||
| 8358 | format_mode_line_unwind_data (obuf) | 8358 | format_mode_line_unwind_data (obuf) |
| 8359 | struct buffer *obuf; | 8359 | struct buffer *obuf; |
| 8360 | { | 8360 | { |
| 8361 | int i = 0; | ||
| 8362 | Lisp_Object vector; | 8361 | Lisp_Object vector; |
| 8363 | 8362 | ||
| 8364 | /* Reduce consing by keeping one vector in | 8363 | /* Reduce consing by keeping one vector in |
| @@ -19302,7 +19301,7 @@ get_line_height_property (it, prop) | |||
| 19302 | struct it *it; | 19301 | struct it *it; |
| 19303 | Lisp_Object prop; | 19302 | Lisp_Object prop; |
| 19304 | { | 19303 | { |
| 19305 | Lisp_Object position, val; | 19304 | Lisp_Object position; |
| 19306 | 19305 | ||
| 19307 | if (STRINGP (it->object)) | 19306 | if (STRINGP (it->object)) |
| 19308 | position = make_number (IT_STRING_CHARPOS (*it)); | 19307 | position = make_number (IT_STRING_CHARPOS (*it)); |
| @@ -19647,7 +19646,6 @@ x_produce_glyphs (it) | |||
| 19647 | else | 19646 | else |
| 19648 | { | 19647 | { |
| 19649 | Lisp_Object spacing; | 19648 | Lisp_Object spacing; |
| 19650 | int total = 0; | ||
| 19651 | 19649 | ||
| 19652 | it->phys_ascent = it->ascent; | 19650 | it->phys_ascent = it->ascent; |
| 19653 | it->phys_descent = it->descent; | 19651 | it->phys_descent = it->descent; |
| @@ -21664,7 +21662,7 @@ note_mode_line_or_margin_highlight (window, x, y, area) | |||
| 21664 | int ignore; | 21662 | int ignore; |
| 21665 | 21663 | ||
| 21666 | int vpos, hpos; | 21664 | int vpos, hpos; |
| 21667 | 21665 | ||
| 21668 | b = Fprevious_single_property_change (make_number (charpos + 1), | 21666 | b = Fprevious_single_property_change (make_number (charpos + 1), |
| 21669 | Qmouse_face, string, Qnil); | 21667 | Qmouse_face, string, Qnil); |
| 21670 | if (NILP (b)) | 21668 | if (NILP (b)) |
| @@ -21712,18 +21710,18 @@ note_mode_line_or_margin_highlight (window, x, y, area) | |||
| 21712 | hpos = (area == ON_MODE_LINE | 21710 | hpos = (area == ON_MODE_LINE |
| 21713 | ? (w->current_matrix)->nrows - 1 | 21711 | ? (w->current_matrix)->nrows - 1 |
| 21714 | : 0); | 21712 | : 0); |
| 21715 | 21713 | ||
| 21716 | /* If the re-rendering position is included in the last | 21714 | /* If the re-rendering position is included in the last |
| 21717 | re-rendering area, we should do nothing. */ | 21715 | re-rendering area, we should do nothing. */ |
| 21718 | if ( window == dpyinfo->mouse_face_window | 21716 | if ( EQ (window, dpyinfo->mouse_face_window) |
| 21719 | && dpyinfo->mouse_face_beg_col <= vpos | 21717 | && dpyinfo->mouse_face_beg_col <= vpos |
| 21720 | && vpos < dpyinfo->mouse_face_end_col | 21718 | && vpos < dpyinfo->mouse_face_end_col |
| 21721 | && dpyinfo->mouse_face_beg_row == hpos ) | 21719 | && dpyinfo->mouse_face_beg_row == hpos ) |
| 21722 | return; | 21720 | return; |
| 21723 | 21721 | ||
| 21724 | if (clear_mouse_face (dpyinfo)) | 21722 | if (clear_mouse_face (dpyinfo)) |
| 21725 | cursor = No_Cursor; | 21723 | cursor = No_Cursor; |
| 21726 | 21724 | ||
| 21727 | dpyinfo->mouse_face_beg_col = vpos; | 21725 | dpyinfo->mouse_face_beg_col = vpos; |
| 21728 | dpyinfo->mouse_face_beg_row = hpos; | 21726 | dpyinfo->mouse_face_beg_row = hpos; |
| 21729 | 21727 | ||
| @@ -21748,8 +21746,9 @@ note_mode_line_or_margin_highlight (window, x, y, area) | |||
| 21748 | if (NILP (pointer)) | 21746 | if (NILP (pointer)) |
| 21749 | pointer = Qhand; | 21747 | pointer = Qhand; |
| 21750 | } | 21748 | } |
| 21749 | else if ((area == ON_MODE_LINE) || (area == ON_HEADER_LINE)) | ||
| 21750 | clear_mouse_face (dpyinfo); | ||
| 21751 | } | 21751 | } |
| 21752 | |||
| 21753 | define_frame_cursor1 (f, cursor, pointer); | 21752 | define_frame_cursor1 (f, cursor, pointer); |
| 21754 | } | 21753 | } |
| 21755 | 21754 | ||
diff --git a/src/xfaces.c b/src/xfaces.c index fc8a0bc05af..25d11c066b0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6258,7 +6258,7 @@ DEFUN ("display-supports-face-attributes-p", | |||
| 6258 | 1, 2, 0, | 6258 | 1, 2, 0, |
| 6259 | doc: /* Return non-nil if all the face attributes in ATTRIBUTES are supported. | 6259 | doc: /* Return non-nil if all the face attributes in ATTRIBUTES are supported. |
| 6260 | The optional argument DISPLAY can be a display name, a frame, or | 6260 | The optional argument DISPLAY can be a display name, a frame, or |
| 6261 | nil (meaning the selected frame's display) | 6261 | nil (meaning the selected frame's display). |
| 6262 | 6262 | ||
| 6263 | The definition of `supported' is somewhat heuristic, but basically means | 6263 | The definition of `supported' is somewhat heuristic, but basically means |
| 6264 | that a face containing all the attributes in ATTRIBUTES, when merged | 6264 | that a face containing all the attributes in ATTRIBUTES, when merged |
| @@ -6271,7 +6271,7 @@ Point (2) implies that a `:weight black' attribute will be satisfied by | |||
| 6271 | any display that can display bold, and a `:foreground \"yellow\"' as long | 6271 | any display that can display bold, and a `:foreground \"yellow\"' as long |
| 6272 | as it can display a yellowish color, but `:slant italic' will _not_ be | 6272 | as it can display a yellowish color, but `:slant italic' will _not_ be |
| 6273 | satisfied by the tty display code's automatic substitution of a `dim' | 6273 | satisfied by the tty display code's automatic substitution of a `dim' |
| 6274 | face for italic. */) | 6274 | face for italic. */) |
| 6275 | (attributes, display) | 6275 | (attributes, display) |
| 6276 | Lisp_Object attributes, display; | 6276 | Lisp_Object attributes, display; |
| 6277 | { | 6277 | { |