diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 103 | ||||
| -rw-r--r-- | src/keyboard.c | 29 | ||||
| -rw-r--r-- | src/keymap.c | 2 | ||||
| -rw-r--r-- | src/macfns.c | 22 | ||||
| -rw-r--r-- | src/macterm.c | 41 | ||||
| -rw-r--r-- | src/macterm.h | 3 | ||||
| -rw-r--r-- | src/minibuf.c | 40 | ||||
| -rw-r--r-- | src/process.c | 16 | ||||
| -rw-r--r-- | src/sound.c | 22 | ||||
| -rw-r--r-- | src/window.c | 11 | ||||
| -rw-r--r-- | src/xdisp.c | 9 | ||||
| -rw-r--r-- | src/xselect.c | 13 | ||||
| -rw-r--r-- | src/xterm.c | 17 |
13 files changed, 234 insertions, 94 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index af6d98afb2a..2c241cd2a51 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,12 +1,90 @@ | |||
| 1 | 2007-03-11 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * process.c (sigchld_handler): Sleep before wait3 to avoid a busyloop. | ||
| 4 | |||
| 5 | 2007-03-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 6 | |||
| 7 | * macfns.c (Fx_server_vendor): Change vendor string to "Apple Inc.". | ||
| 8 | |||
| 9 | 2007-03-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 10 | |||
| 11 | * macterm.c [USE_CARBON_EVENTS] (mac_handle_mouse_event): Ignore | ||
| 12 | mouse wheel movement on title bar or tool bar. | ||
| 13 | |||
| 14 | 2007-03-10 Chong Yidong <cyd@stupidchicken.com> | ||
| 15 | |||
| 16 | * keyboard.c (help_form_saved_window_configs): New var. | ||
| 17 | (read_char_help_form_unwind): New function. | ||
| 18 | (read_char): Don't restore window configuration if a mouse click | ||
| 19 | arrives while the help form is being displayed. | ||
| 20 | |||
| 21 | 2007-03-10 Kim F. Storm <storm@cua.dk> | ||
| 22 | |||
| 23 | * xdisp.c (redisplay_window): Don't automatically select a new window | ||
| 24 | start for a contination line during mouse-click. | ||
| 25 | |||
| 26 | 2007-03-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 27 | |||
| 28 | * xterm.c (handle_one_xevent): Ignore buttons > 3 for the tool bar. | ||
| 29 | |||
| 30 | 2007-03-09 Juanma Barranquero <lekktu@gmail.com> | ||
| 31 | |||
| 32 | * keymap.c (Fdescribe_buffer_bindings): Check that BUFFER is valid. | ||
| 33 | |||
| 34 | 2007-03-08 Richard Stallman <rms@gnu.org> | ||
| 35 | |||
| 36 | * keyboard.c (syms_of_keyboard): Doc fix. | ||
| 37 | |||
| 38 | 2007-03-08 Chong Yidong <cyd@stupidchicken.com> | ||
| 39 | |||
| 40 | * minibuf.c (Ftry_completion): Don't short circuit if | ||
| 41 | completion-ignore-case is non-nil. | ||
| 42 | |||
| 43 | 2007-03-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 44 | |||
| 45 | * macfns.c (mac_set_scroll_bar_width, mac_frame_parm_handlers): | ||
| 46 | Undo 2006-03-06 changes. | ||
| 47 | |||
| 48 | * macterm.c (XTset_vertical_scroll_bar) [MAC_OSX]: Don't show scroll | ||
| 49 | bar if its width is smaller than that of Aqua small scroll bar. | ||
| 50 | |||
| 51 | 2007-03-07 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 52 | |||
| 53 | * minibuf.c (read_minibuf): Bind inhibit-read-only a bit longer so as | ||
| 54 | to handle correctly prompts with read-only property. | ||
| 55 | |||
| 56 | 2007-03-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 57 | |||
| 58 | * sound.c (wav_play): Check header->data_length to see how much we | ||
| 59 | shall read. | ||
| 60 | (alsa_period_size): Convert ALSA period size in frames to bytes. | ||
| 61 | (alsa_write): Return if frames is zero. | ||
| 62 | |||
| 63 | 2007-03-06 Kenichi Handa <handa@m17n.org> | ||
| 64 | |||
| 65 | * xselect.c (Vselection_coding_system): Documentation improved. | ||
| 66 | |||
| 67 | 2007-03-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 68 | |||
| 69 | * macterm.c (x_scroll_bar_create, XTread_socket): Replace #if | ||
| 70 | USE_TOOLKIT_SCROLL_BARS with #ifdef USE_TOOLKIT_SCROLL_BARS. | ||
| 71 | (x_set_window_size): Call SET_FRAME_GARBAGED. Clear window if | ||
| 72 | internal border width has changed. | ||
| 73 | |||
| 74 | * macterm.h (struct mac_output): New member `internal_border_width'. | ||
| 75 | |||
| 76 | 2007-03-04 Richard Stallman <rms@gnu.org> | ||
| 77 | |||
| 78 | * window.c (Fdisplay_buffer): Doc fix. | ||
| 79 | |||
| 1 | 2007-03-03 Glenn Morris <rgm@gnu.org> | 80 | 2007-03-03 Glenn Morris <rgm@gnu.org> |
| 2 | 81 | ||
| 3 | * Makefile.in: Don't clear out LIB_X11_LIB, since XFT_LIBS does | 82 | * Makefile.in: Don't clear out LIB_X11_LIB, since XFT_LIBS does |
| 4 | not include -lX11 on Solaris. | 83 | not include -lX11 on Solaris. |
| 5 | 84 | ||
| 6 | 2007-03-02 Stuart D. Herring <herring@lanl.gov> | 85 | 2007-03-02 Stuart D. Herring <herring@lanl.gov> |
| 7 | 86 | ||
| 8 | * keymap.c (Fkey_binding): Don't consider two-element lists as | 87 | * keymap.c (Fkey_binding): Don't consider one-element lists as events. |
| 9 | events. | ||
| 10 | 88 | ||
| 11 | 2007-03-01 Kenichi Handa <handa@m17n.org> | 89 | 2007-03-01 Kenichi Handa <handa@m17n.org> |
| 12 | 90 | ||
| @@ -35,8 +113,8 @@ | |||
| 35 | (x_scroll_bar_create, XTset_vertical_scroll_bar) | 113 | (x_scroll_bar_create, XTset_vertical_scroll_bar) |
| 36 | [USE_TOOLKIT_SCROLL_BARS]: Initialize bar->min_handle. | 114 | [USE_TOOLKIT_SCROLL_BARS]: Initialize bar->min_handle. |
| 37 | 115 | ||
| 38 | * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: New | 116 | * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]: |
| 39 | member `min_handle'. | 117 | New member `min_handle'. |
| 40 | 118 | ||
| 41 | 2007-02-23 Kim F. Storm <storm@cua.dk> | 119 | 2007-02-23 Kim F. Storm <storm@cua.dk> |
| 42 | 120 | ||
| @@ -59,11 +137,11 @@ | |||
| 59 | (mac_flush_display_optional) [USE_CG_DRAWING]: New function. | 137 | (mac_flush_display_optional) [USE_CG_DRAWING]: New function. |
| 60 | (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for | 138 | (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for |
| 61 | flush_display_optional. | 139 | flush_display_optional. |
| 62 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press): New | 140 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press): |
| 63 | argument MOUSE_POS. All uses changed. Set bar->dragging to | 141 | New argument MOUSE_POS. All uses changed. Set bar->dragging to |
| 64 | negative integer if scroll bar handle is pressed. | 142 | negative integer if scroll bar handle is pressed. |
| 65 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release): Negative | 143 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release): |
| 66 | bar->dragging means scroll bar handle is not dragged. | 144 | Negative bar->dragging means scroll bar handle is not dragged. |
| 67 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial | 145 | [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial |
| 68 | offset of scroll bar handle from negative bar->dragging. | 146 | offset of scroll bar handle from negative bar->dragging. |
| 69 | (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll | 147 | (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll |
| @@ -98,8 +176,7 @@ | |||
| 98 | 176 | ||
| 99 | * w32menu.c (current_popup_menu): Make available globally. | 177 | * w32menu.c (current_popup_menu): Make available globally. |
| 100 | (menubar_selection_callback): Free menu strings before pushing the | 178 | (menubar_selection_callback): Free menu strings before pushing the |
| 101 | menu event into the keyboard buffer. Remove | 179 | menu event into the keyboard buffer. Remove menu_command_in_progress. |
| 102 | menu_command_in_progress. | ||
| 103 | 180 | ||
| 104 | * w32fns.c (current_popup_menu): Use from w32menu.c. | 181 | * w32fns.c (current_popup_menu): Use from w32menu.c. |
| 105 | (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active | 182 | (w32_wnd_proc) [WM_EXITMENULOOP, WM_TIMER]: Use menubar_active |
| @@ -369,8 +446,8 @@ | |||
| 369 | 446 | ||
| 370 | 2007-01-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 447 | 2007-01-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 371 | 448 | ||
| 372 | * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]: Use | 449 | * macmenu.c (create_and_show_dialog) [TARGET_API_MAC_CARBON]: |
| 373 | DisableControl for disabled items. Set default button to first | 450 | Use DisableControl for disabled items. Set default button to first |
| 374 | enabled one. Use icon of application in execution. | 451 | enabled one. Use icon of application in execution. |
| 375 | 452 | ||
| 376 | 2007-01-13 Eli Zaretskii <eliz@gnu.org> | 453 | 2007-01-13 Eli Zaretskii <eliz@gnu.org> |
diff --git a/src/keyboard.c b/src/keyboard.c index c7d25088313..e1e53010931 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2450,6 +2450,17 @@ Lisp_Object print_help (); | |||
| 2450 | static Lisp_Object kbd_buffer_get_event (); | 2450 | static Lisp_Object kbd_buffer_get_event (); |
| 2451 | static void record_char (); | 2451 | static void record_char (); |
| 2452 | 2452 | ||
| 2453 | static Lisp_Object help_form_saved_window_configs; | ||
| 2454 | static Lisp_Object | ||
| 2455 | read_char_help_form_unwind (arg) | ||
| 2456 | { | ||
| 2457 | Lisp_Object window_config = XCAR (help_form_saved_window_configs); | ||
| 2458 | help_form_saved_window_configs = XCDR (help_form_saved_window_configs); | ||
| 2459 | if (!NILP (window_config)) | ||
| 2460 | Fset_window_configuration (window_config); | ||
| 2461 | return Qnil; | ||
| 2462 | } | ||
| 2463 | |||
| 2453 | #ifdef MULTI_KBOARD | 2464 | #ifdef MULTI_KBOARD |
| 2454 | static jmp_buf wrong_kboard_jmpbuf; | 2465 | static jmp_buf wrong_kboard_jmpbuf; |
| 2455 | #endif | 2466 | #endif |
| @@ -3319,8 +3330,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 3319 | Lisp_Object tem0; | 3330 | Lisp_Object tem0; |
| 3320 | count = SPECPDL_INDEX (); | 3331 | count = SPECPDL_INDEX (); |
| 3321 | 3332 | ||
| 3322 | record_unwind_protect (Fset_window_configuration, | 3333 | help_form_saved_window_configs |
| 3323 | Fcurrent_window_configuration (Qnil)); | 3334 | = Fcons (Fcurrent_window_configuration (Qnil), |
| 3335 | help_form_saved_window_configs); | ||
| 3336 | record_unwind_protect (read_char_help_form_unwind, Qnil); | ||
| 3324 | 3337 | ||
| 3325 | tem0 = Feval (Vhelp_form); | 3338 | tem0 = Feval (Vhelp_form); |
| 3326 | if (STRINGP (tem0)) | 3339 | if (STRINGP (tem0)) |
| @@ -3328,7 +3341,12 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) | |||
| 3328 | 3341 | ||
| 3329 | cancel_echoing (); | 3342 | cancel_echoing (); |
| 3330 | do | 3343 | do |
| 3331 | c = read_char (0, 0, 0, Qnil, 0, NULL); | 3344 | { |
| 3345 | c = read_char (0, 0, 0, Qnil, 0, NULL); | ||
| 3346 | if (EVENT_HAS_PARAMETERS (c) | ||
| 3347 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_click)) | ||
| 3348 | XSETCAR (help_form_saved_window_configs, Qnil); | ||
| 3349 | } | ||
| 3332 | while (BUFFERP (c)); | 3350 | while (BUFFERP (c)); |
| 3333 | /* Remove the help from the frame */ | 3351 | /* Remove the help from the frame */ |
| 3334 | unbind_to (count, Qnil); | 3352 | unbind_to (count, Qnil); |
| @@ -11334,6 +11352,9 @@ syms_of_keyboard () | |||
| 11334 | menu_bar_items_vector = Qnil; | 11352 | menu_bar_items_vector = Qnil; |
| 11335 | staticpro (&menu_bar_items_vector); | 11353 | staticpro (&menu_bar_items_vector); |
| 11336 | 11354 | ||
| 11355 | help_form_saved_window_configs = Qnil; | ||
| 11356 | staticpro (&help_form_saved_window_configs); | ||
| 11357 | |||
| 11337 | defsubr (&Scurrent_idle_time); | 11358 | defsubr (&Scurrent_idle_time); |
| 11338 | defsubr (&Sevent_convert_list); | 11359 | defsubr (&Sevent_convert_list); |
| 11339 | defsubr (&Sread_key_sequence); | 11360 | defsubr (&Sread_key_sequence); |
| @@ -11396,7 +11417,7 @@ An element of the form (t . EVENT) forces EVENT to be added to that list. */); | |||
| 11396 | DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events, | 11417 | DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events, |
| 11397 | doc: /* List of events to be processed as input by input methods. | 11418 | doc: /* List of events to be processed as input by input methods. |
| 11398 | These events are processed before `unread-command-events' | 11419 | These events are processed before `unread-command-events' |
| 11399 | and actual keyboard input without given to `input-method-function'. */); | 11420 | and actual keyboard input, but are not given to `input-method-function'. */); |
| 11400 | Vunread_post_input_method_events = Qnil; | 11421 | Vunread_post_input_method_events = Qnil; |
| 11401 | 11422 | ||
| 11402 | DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events, | 11423 | DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events, |
diff --git a/src/keymap.c b/src/keymap.c index abf934908cc..a612b0d5c6c 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2989,6 +2989,8 @@ Keyboard translations:\n\n\ | |||
| 2989 | You type Translation\n\ | 2989 | You type Translation\n\ |
| 2990 | -------- -----------\n"; | 2990 | -------- -----------\n"; |
| 2991 | 2991 | ||
| 2992 | CHECK_BUFFER (buffer); | ||
| 2993 | |||
| 2992 | shadow = Qnil; | 2994 | shadow = Qnil; |
| 2993 | GCPRO1 (shadow); | 2995 | GCPRO1 (shadow); |
| 2994 | 2996 | ||
diff --git a/src/macfns.c b/src/macfns.c index 072bc6f50b5..888c3bdf8e8 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -1909,24 +1909,6 @@ x_set_scroll_bar_default_width (f) | |||
| 1909 | #endif /* not MAC_OSX */ | 1909 | #endif /* not MAC_OSX */ |
| 1910 | } | 1910 | } |
| 1911 | 1911 | ||
| 1912 | void | ||
| 1913 | mac_set_scroll_bar_width (f, arg, oldval) | ||
| 1914 | struct frame *f; | ||
| 1915 | Lisp_Object arg, oldval; | ||
| 1916 | { | ||
| 1917 | #ifdef MAC_OSX | ||
| 1918 | if (INTEGERP (arg) && XINT (arg) > 0) | ||
| 1919 | { | ||
| 1920 | if (XINT (arg) < (MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH | ||
| 1921 | + MAC_AQUA_VERTICAL_SCROLL_BAR_WIDTH) / 2) | ||
| 1922 | XSETINT (arg, MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH); | ||
| 1923 | else | ||
| 1924 | XSETINT (arg, MAC_AQUA_VERTICAL_SCROLL_BAR_WIDTH); | ||
| 1925 | } | ||
| 1926 | #endif | ||
| 1927 | x_set_scroll_bar_width (f, arg, oldval); | ||
| 1928 | } | ||
| 1929 | |||
| 1930 | static void | 1912 | static void |
| 1931 | mac_set_font (f, arg, oldval) | 1913 | mac_set_font (f, arg, oldval) |
| 1932 | struct frame *f; | 1914 | struct frame *f; |
| @@ -3052,7 +3034,7 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 3052 | (display) | 3034 | (display) |
| 3053 | Lisp_Object display; | 3035 | Lisp_Object display; |
| 3054 | { | 3036 | { |
| 3055 | return build_string ("Apple Computers"); | 3037 | return build_string ("Apple Inc."); |
| 3056 | } | 3038 | } |
| 3057 | 3039 | ||
| 3058 | DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, | 3040 | DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0, |
| @@ -4677,7 +4659,7 @@ frame_parm_handler mac_frame_parm_handlers[] = | |||
| 4677 | x_set_menu_bar_lines, | 4659 | x_set_menu_bar_lines, |
| 4678 | x_set_mouse_color, | 4660 | x_set_mouse_color, |
| 4679 | x_explicitly_set_name, | 4661 | x_explicitly_set_name, |
| 4680 | mac_set_scroll_bar_width, | 4662 | x_set_scroll_bar_width, |
| 4681 | x_set_title, | 4663 | x_set_title, |
| 4682 | x_set_unsplittable, | 4664 | x_set_unsplittable, |
| 4683 | x_set_vertical_scroll_bars, | 4665 | x_set_vertical_scroll_bars, |
diff --git a/src/macterm.c b/src/macterm.c index 3a403c39c26..1fa3daace6f 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -4965,7 +4965,7 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height) | |||
| 4965 | #endif | 4965 | #endif |
| 4966 | #if TARGET_API_MAC_CARBON | 4966 | #if TARGET_API_MAC_CARBON |
| 4967 | ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", | 4967 | ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", |
| 4968 | #if USE_TOOLKIT_SCROLL_BARS | 4968 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 4969 | false, | 4969 | false, |
| 4970 | #else | 4970 | #else |
| 4971 | width < disp_height, | 4971 | width < disp_height, |
| @@ -5219,7 +5219,11 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5219 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5219 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5220 | if (NILP (bar->track_top)) | 5220 | if (NILP (bar->track_top)) |
| 5221 | { | 5221 | { |
| 5222 | if (sb_width >= disp_height) | 5222 | if (sb_width >= disp_height |
| 5223 | #ifdef MAC_OSX | ||
| 5224 | || sb_width < MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH | ||
| 5225 | #endif | ||
| 5226 | ) | ||
| 5223 | { | 5227 | { |
| 5224 | XSETINT (bar->track_top, 0); | 5228 | XSETINT (bar->track_top, 0); |
| 5225 | XSETINT (bar->track_height, 0); | 5229 | XSETINT (bar->track_height, 0); |
| @@ -6242,6 +6246,16 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 6242 | #endif | 6246 | #endif |
| 6243 | mac_handle_size_change (f, pixelwidth, pixelheight); | 6247 | mac_handle_size_change (f, pixelwidth, pixelheight); |
| 6244 | 6248 | ||
| 6249 | if (f->output_data.mac->internal_border_width | ||
| 6250 | != FRAME_INTERNAL_BORDER_WIDTH (f)) | ||
| 6251 | { | ||
| 6252 | mac_clear_window (f); | ||
| 6253 | f->output_data.mac->internal_border_width | ||
| 6254 | = FRAME_INTERNAL_BORDER_WIDTH (f); | ||
| 6255 | } | ||
| 6256 | |||
| 6257 | SET_FRAME_GARBAGED (f); | ||
| 6258 | |||
| 6245 | UNBLOCK_INPUT; | 6259 | UNBLOCK_INPUT; |
| 6246 | } | 6260 | } |
| 6247 | 6261 | ||
| @@ -9995,23 +10009,30 @@ mac_handle_mouse_event (next_handler, event, data) | |||
| 9995 | if (err != noErr || axis != kEventMouseWheelAxisY) | 10009 | if (err != noErr || axis != kEventMouseWheelAxisY) |
| 9996 | break; | 10010 | break; |
| 9997 | 10011 | ||
| 9998 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 9999 | typeSInt32, NULL, sizeof (SInt32), | ||
| 10000 | NULL, &delta); | ||
| 10001 | if (err != noErr) | ||
| 10002 | break; | ||
| 10003 | err = GetEventParameter (event, kEventParamMouseLocation, | 10012 | err = GetEventParameter (event, kEventParamMouseLocation, |
| 10004 | typeQDPoint, NULL, sizeof (Point), | 10013 | typeQDPoint, NULL, sizeof (Point), |
| 10005 | NULL, &point); | 10014 | NULL, &point); |
| 10006 | if (err != noErr) | 10015 | if (err != noErr) |
| 10007 | break; | 10016 | break; |
| 10017 | |||
| 10018 | SetPortWindowPort (wp); | ||
| 10019 | GlobalToLocal (&point); | ||
| 10020 | if (point.h < 0 || point.v < 0 | ||
| 10021 | || EQ (window_from_coordinates (f, point.h, point.v, 0, 0, 0, 1), | ||
| 10022 | f->tool_bar_window)) | ||
| 10023 | break; | ||
| 10024 | |||
| 10025 | err = GetEventParameter (event, kEventParamMouseWheelDelta, | ||
| 10026 | typeSInt32, NULL, sizeof (SInt32), | ||
| 10027 | NULL, &delta); | ||
| 10028 | if (err != noErr) | ||
| 10029 | break; | ||
| 10030 | |||
| 10008 | read_socket_inev->kind = WHEEL_EVENT; | 10031 | read_socket_inev->kind = WHEEL_EVENT; |
| 10009 | read_socket_inev->code = 0; | 10032 | read_socket_inev->code = 0; |
| 10010 | read_socket_inev->modifiers = | 10033 | read_socket_inev->modifiers = |
| 10011 | (mac_event_to_emacs_modifiers (event) | 10034 | (mac_event_to_emacs_modifiers (event) |
| 10012 | | ((delta < 0) ? down_modifier : up_modifier)); | 10035 | | ((delta < 0) ? down_modifier : up_modifier)); |
| 10013 | SetPortWindowPort (wp); | ||
| 10014 | GlobalToLocal (&point); | ||
| 10015 | XSETINT (read_socket_inev->x, point.h); | 10036 | XSETINT (read_socket_inev->x, point.h); |
| 10016 | XSETINT (read_socket_inev->y, point.v); | 10037 | XSETINT (read_socket_inev->y, point.v); |
| 10017 | XSETFRAME (read_socket_inev->frame_or_window, f); | 10038 | XSETFRAME (read_socket_inev->frame_or_window, f); |
| @@ -11042,7 +11063,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 11042 | else | 11063 | else |
| 11043 | { | 11064 | { |
| 11044 | /* A window has been deactivated */ | 11065 | /* A window has been deactivated */ |
| 11045 | #if USE_TOOLKIT_SCROLL_BARS | 11066 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 11046 | if (dpyinfo->grabbed && tracked_scroll_bar) | 11067 | if (dpyinfo->grabbed && tracked_scroll_bar) |
| 11047 | { | 11068 | { |
| 11048 | struct input_event event; | 11069 | struct input_event event; |
diff --git a/src/macterm.h b/src/macterm.h index 3d0b41f6efe..b3826c5e7f7 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -327,6 +327,9 @@ struct mac_output | |||
| 327 | They are changed only when a different background is involved. */ | 327 | They are changed only when a different background is involved. */ |
| 328 | unsigned long relief_background; | 328 | unsigned long relief_background; |
| 329 | 329 | ||
| 330 | /* Width of the internal border. */ | ||
| 331 | int internal_border_width; | ||
| 332 | |||
| 330 | /* Hints for the size and the position of a window. */ | 333 | /* Hints for the size and the position of a window. */ |
| 331 | XSizeHints *size_hints; | 334 | XSizeHints *size_hints; |
| 332 | 335 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 14f5eac846a..50f48c2344f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -700,27 +700,27 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 700 | specbind (Qinhibit_read_only, Qt); | 700 | specbind (Qinhibit_read_only, Qt); |
| 701 | specbind (Qinhibit_modification_hooks, Qt); | 701 | specbind (Qinhibit_modification_hooks, Qt); |
| 702 | Ferase_buffer (); | 702 | Ferase_buffer (); |
| 703 | |||
| 704 | if (!NILP (current_buffer->enable_multibyte_characters) | ||
| 705 | && ! STRING_MULTIBYTE (minibuf_prompt)) | ||
| 706 | minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); | ||
| 707 | |||
| 708 | /* Insert the prompt, record where it ends. */ | ||
| 709 | Finsert (1, &minibuf_prompt); | ||
| 710 | if (PT > BEG) | ||
| 711 | { | ||
| 712 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 713 | Qfront_sticky, Qt, Qnil); | ||
| 714 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 715 | Qrear_nonsticky, Qt, Qnil); | ||
| 716 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 717 | Qfield, Qt, Qnil); | ||
| 718 | Fadd_text_properties (make_number (BEG), make_number (PT), | ||
| 719 | Vminibuffer_prompt_properties, Qnil); | ||
| 720 | } | ||
| 703 | unbind_to (count1, Qnil); | 721 | unbind_to (count1, Qnil); |
| 704 | } | 722 | } |
| 705 | 723 | ||
| 706 | if (!NILP (current_buffer->enable_multibyte_characters) | ||
| 707 | && ! STRING_MULTIBYTE (minibuf_prompt)) | ||
| 708 | minibuf_prompt = Fstring_make_multibyte (minibuf_prompt); | ||
| 709 | |||
| 710 | /* Insert the prompt, record where it ends. */ | ||
| 711 | Finsert (1, &minibuf_prompt); | ||
| 712 | if (PT > BEG) | ||
| 713 | { | ||
| 714 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 715 | Qfront_sticky, Qt, Qnil); | ||
| 716 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 717 | Qrear_nonsticky, Qt, Qnil); | ||
| 718 | Fput_text_property (make_number (BEG), make_number (PT), | ||
| 719 | Qfield, Qt, Qnil); | ||
| 720 | Fadd_text_properties (make_number (BEG), make_number (PT), | ||
| 721 | Vminibuffer_prompt_properties, Qnil); | ||
| 722 | } | ||
| 723 | |||
| 724 | minibuf_prompt_width = (int) current_column (); /* iftc */ | 724 | minibuf_prompt_width = (int) current_column (); /* iftc */ |
| 725 | 725 | ||
| 726 | /* Put in the initial input. */ | 726 | /* Put in the initial input. */ |
| @@ -1483,6 +1483,10 @@ is used to further constrain the set of candidates. */) | |||
| 1483 | matchcount++; | 1483 | matchcount++; |
| 1484 | bestmatchsize = matchsize; | 1484 | bestmatchsize = matchsize; |
| 1485 | if (matchsize <= SCHARS (string) | 1485 | if (matchsize <= SCHARS (string) |
| 1486 | /* If completion-ignore-case is non-nil, don't | ||
| 1487 | short-circuit because we want to find the best | ||
| 1488 | possible match *including* case differences. */ | ||
| 1489 | && !completion_ignore_case | ||
| 1486 | && matchcount > 1) | 1490 | && matchcount > 1) |
| 1487 | /* No need to look any further. */ | 1491 | /* No need to look any further. */ |
| 1488 | break; | 1492 | break; |
diff --git a/src/process.c b/src/process.c index 4611ce2c05c..f3162c9d3e5 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6401,12 +6401,16 @@ sigchld_handler (signo) | |||
| 6401 | #define WUNTRACED 0 | 6401 | #define WUNTRACED 0 |
| 6402 | #endif /* no WUNTRACED */ | 6402 | #endif /* no WUNTRACED */ |
| 6403 | /* Keep trying to get a status until we get a definitive result. */ | 6403 | /* Keep trying to get a status until we get a definitive result. */ |
| 6404 | do | 6404 | while (1) { |
| 6405 | { | 6405 | errno = 0; |
| 6406 | errno = 0; | 6406 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); |
| 6407 | pid = wait3 (&w, WNOHANG | WUNTRACED, 0); | 6407 | if (! (pid < 0 && errno == EINTR)) |
| 6408 | } | 6408 | break; |
| 6409 | while (pid < 0 && errno == EINTR); | 6409 | /* avoid a busyloop: wait3 is a system call, so we do not want |
| 6410 | to prevent the kernel from actually sending SIGCHLD to emacs | ||
| 6411 | by asking for it all the time */ | ||
| 6412 | sleep (1); | ||
| 6413 | } | ||
| 6410 | 6414 | ||
| 6411 | if (pid <= 0) | 6415 | if (pid <= 0) |
| 6412 | { | 6416 | { |
diff --git a/src/sound.c b/src/sound.c index 7fb79e64048..5a27e7a6232 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -621,12 +621,18 @@ wav_play (s, sd) | |||
| 621 | char *buffer; | 621 | char *buffer; |
| 622 | int nbytes; | 622 | int nbytes; |
| 623 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; | 623 | int blksize = sd->period_size ? sd->period_size (sd) : 2048; |
| 624 | int data_left = header->data_length; | ||
| 624 | 625 | ||
| 625 | buffer = (char *) alloca (blksize); | 626 | buffer = (char *) alloca (blksize); |
| 626 | lseek (s->fd, sizeof *header, SEEK_SET); | 627 | lseek (s->fd, sizeof *header, SEEK_SET); |
| 627 | 628 | while (data_left > 0 | |
| 628 | while ((nbytes = emacs_read (s->fd, buffer, blksize)) > 0) | 629 | && (nbytes = emacs_read (s->fd, buffer, blksize)) > 0) |
| 629 | sd->write (sd, buffer, nbytes); | 630 | { |
| 631 | /* Don't play possible garbage at the end of file */ | ||
| 632 | if (data_left < nbytes) nbytes = data_left; | ||
| 633 | data_left -= nbytes; | ||
| 634 | sd->write (sd, buffer, nbytes); | ||
| 635 | } | ||
| 630 | 636 | ||
| 631 | if (nbytes < 0) | 637 | if (nbytes < 0) |
| 632 | sound_perror ("Error reading sound file"); | 638 | sound_perror ("Error reading sound file"); |
| @@ -986,7 +992,8 @@ alsa_period_size (sd) | |||
| 986 | struct sound_device *sd; | 992 | struct sound_device *sd; |
| 987 | { | 993 | { |
| 988 | struct alsa_params *p = (struct alsa_params *) sd->data; | 994 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 989 | return p->period_size; | 995 | int fact = snd_pcm_format_size (sd->format, 1) * sd->channels; |
| 996 | return p->period_size * (fact > 0 ? fact : 1); | ||
| 990 | } | 997 | } |
| 991 | 998 | ||
| 992 | static void | 999 | static void |
| @@ -1209,9 +1216,10 @@ alsa_write (sd, buffer, nbytes) | |||
| 1209 | 1216 | ||
| 1210 | while (nwritten < nbytes) | 1217 | while (nwritten < nbytes) |
| 1211 | { | 1218 | { |
| 1212 | err = snd_pcm_writei (p->handle, | 1219 | snd_pcm_uframes_t frames = (nbytes - nwritten)/fact; |
| 1213 | buffer + nwritten, | 1220 | if (frames == 0) break; |
| 1214 | (nbytes - nwritten)/fact); | 1221 | |
| 1222 | err = snd_pcm_writei (p->handle, buffer + nwritten, frames); | ||
| 1215 | if (err < 0) | 1223 | if (err < 0) |
| 1216 | { | 1224 | { |
| 1217 | if (err == -EPIPE) | 1225 | if (err == -EPIPE) |
diff --git a/src/window.c b/src/window.c index 8a25992d783..508ddadae9a 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -3612,11 +3612,12 @@ The variables `special-display-buffer-names', | |||
| 3612 | `same-window-regexps' customize how certain buffer names are handled. | 3612 | `same-window-regexps' customize how certain buffer names are handled. |
| 3613 | The latter two take effect only if NOT-THIS-WINDOW is nil. | 3613 | The latter two take effect only if NOT-THIS-WINDOW is nil. |
| 3614 | 3614 | ||
| 3615 | If optional argument FRAME is `visible', search all visible frames. | 3615 | If optional argument FRAME is `visible', check all visible frames |
| 3616 | If FRAME is 0, search all visible and iconified frames. | 3616 | for a window to use. |
| 3617 | If FRAME is t, search all frames. | 3617 | If FRAME is 0, check all visible and iconified frames. |
| 3618 | If FRAME is a frame, search only that frame. | 3618 | If FRAME is t, check all frames. |
| 3619 | If FRAME is nil, search only the selected frame | 3619 | If FRAME is a frame, check only that frame. |
| 3620 | If FRAME is nil, check only the selected frame | ||
| 3620 | (actually the last nonminibuffer frame), | 3621 | (actually the last nonminibuffer frame), |
| 3621 | unless `pop-up-frames' or `display-buffer-reuse-frames' is non-nil, | 3622 | unless `pop-up-frames' or `display-buffer-reuse-frames' is non-nil, |
| 3622 | which means search visible and iconified frames. | 3623 | which means search visible and iconified frames. |
diff --git a/src/xdisp.c b/src/xdisp.c index cd4683a71b9..ee17abb7794 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13283,8 +13283,15 @@ redisplay_window (window, just_this_one_p) | |||
| 13283 | 13283 | ||
| 13284 | /* If first window line is a continuation line, and window start | 13284 | /* If first window line is a continuation line, and window start |
| 13285 | is inside the modified region, but the first change is before | 13285 | is inside the modified region, but the first change is before |
| 13286 | current window start, we must select a new window start.*/ | 13286 | current window start, we must select a new window start. |
| 13287 | |||
| 13288 | However, if this is the result of a down-mouse event (e.g. by | ||
| 13289 | extending the mouse-drag-overlay), we don't want to select a | ||
| 13290 | new window start, since that would change the position under | ||
| 13291 | the mouse, resulting in an unwanted mouse-movement rather | ||
| 13292 | than a simple mouse-click. */ | ||
| 13287 | if (NILP (w->start_at_line_beg) | 13293 | if (NILP (w->start_at_line_beg) |
| 13294 | && NILP (do_mouse_tracking) | ||
| 13288 | && CHARPOS (startp) > BEGV) | 13295 | && CHARPOS (startp) > BEGV) |
| 13289 | { | 13296 | { |
| 13290 | /* Make sure beg_unchanged and end_unchanged are up to date. | 13297 | /* Make sure beg_unchanged and end_unchanged are up to date. |
diff --git a/src/xselect.c b/src/xselect.c index 4f6959587fd..3fe109a5b85 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2975,8 +2975,17 @@ it merely informs you that they have happened. */); | |||
| 2975 | 2975 | ||
| 2976 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, | 2976 | DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, |
| 2977 | doc: /* Coding system for communicating with other X clients. | 2977 | doc: /* Coding system for communicating with other X clients. |
| 2978 | When sending or receiving text via selection and clipboard, the text is | 2978 | |
| 2979 | encoded or decoded by this coding system. | 2979 | When sending text via selection and clipboard, if the requested |
| 2980 | data-type is not "UTF8_STRING", the text is encoded by this coding | ||
| 2981 | system. | ||
| 2982 | |||
| 2983 | When receiving text, if the data-type of the received text is not | ||
| 2984 | "UTF8_STRING", it is decoded by this coding system. | ||
| 2985 | |||
| 2986 | See also the documentation of the variable `x-select-request-type' how | ||
| 2987 | to control which data-type to request for receiving text. | ||
| 2988 | |||
| 2980 | The default value is `compound-text-with-extensions'. */); | 2989 | The default value is `compound-text-with-extensions'. */); |
| 2981 | Vselection_coding_system = intern ("compound-text-with-extensions"); | 2990 | Vselection_coding_system = intern ("compound-text-with-extensions"); |
| 2982 | 2991 | ||
diff --git a/src/xterm.c b/src/xterm.c index 925b4e3bd1f..8b33bf00e54 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -5525,7 +5525,7 @@ x_scroll_bar_expose (bar, event) | |||
| 5525 | 5525 | ||
| 5526 | x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1); | 5526 | x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1); |
| 5527 | 5527 | ||
| 5528 | /* Switch to scroll bar foreground color. */ | 5528 | /* Switch to scroll bar foreground color. */ |
| 5529 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) | 5529 | if (f->output_data.x->scroll_bar_foreground_pixel != -1) |
| 5530 | XSetForeground (FRAME_X_DISPLAY (f), gc, | 5530 | XSetForeground (FRAME_X_DISPLAY (f), gc, |
| 5531 | f->output_data.x->scroll_bar_foreground_pixel); | 5531 | f->output_data.x->scroll_bar_foreground_pixel); |
| @@ -6979,15 +6979,16 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6979 | int y = event.xbutton.y; | 6979 | int y = event.xbutton.y; |
| 6980 | 6980 | ||
| 6981 | window = window_from_coordinates (f, x, y, 0, 0, 0, 1); | 6981 | window = window_from_coordinates (f, x, y, 0, 0, 0, 1); |
| 6982 | if (EQ (window, f->tool_bar_window)) | 6982 | tool_bar_p = EQ (window, f->tool_bar_window); |
| 6983 | |||
| 6984 | if (tool_bar_p && event.xbutton.button < 4) | ||
| 6983 | { | 6985 | { |
| 6984 | if (event.xbutton.type == ButtonPress) | 6986 | if (event.xbutton.type == ButtonPress) |
| 6985 | handle_tool_bar_click (f, x, y, 1, 0); | 6987 | handle_tool_bar_click (f, x, y, 1, 0); |
| 6986 | else | 6988 | else |
| 6987 | handle_tool_bar_click (f, x, y, 0, | 6989 | handle_tool_bar_click (f, x, y, 0, |
| 6988 | x_x_to_emacs_modifiers (dpyinfo, | 6990 | x_x_to_emacs_modifiers (dpyinfo, |
| 6989 | event.xbutton.state)); | 6991 | event.xbutton.state)); |
| 6990 | tool_bar_p = 1; | ||
| 6991 | } | 6992 | } |
| 6992 | } | 6993 | } |
| 6993 | 6994 | ||