diff options
| author | Stefan Monnier | 2013-11-24 21:41:02 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-11-24 21:41:02 -0500 |
| commit | 511fa0d3963313274ae2b74fc26fde52ddbddb42 (patch) | |
| tree | c423a0c4ec9e29b2a3dd344f008e4a10832f9f72 /src | |
| parent | 310294a38369db86610e5f5ab82860ce6451eada (diff) | |
| download | emacs-511fa0d3963313274ae2b74fc26fde52ddbddb42.tar.gz emacs-511fa0d3963313274ae2b74fc26fde52ddbddb42.zip | |
* lisp/frame.el (handle-focus-in, handle-focus-out): Move from frame.c.
Remove blink-cursor code.
(blink-cursor-timer-function, blink-cursor-suspend): Don't special-case GUIs.
(blink-cursor-mode): Use focus-in/out-hook.
* src/frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
(syms_of_frame): Don't defsubr them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 30 |
2 files changed, 7 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7f417ccca8a..9947ba4b070 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el. | ||
| 4 | (syms_of_frame): Don't defsubr them. | ||
| 5 | |||
| 1 | 2013-11-25 Glenn Morris <rgm@gnu.org> | 6 | 2013-11-25 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * lread.c (load_path_default): Change the sense of the argument. | 8 | * lread.c (load_path_default): Change the sense of the argument. |
diff --git a/src/frame.c b/src/frame.c index fbfc7722681..84293e27d0d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -887,31 +887,6 @@ This function returns FRAME, or nil if FRAME has been deleted. */) | |||
| 887 | return do_switch_frame (frame, 1, 0, norecord); | 887 | return do_switch_frame (frame, 1, 0, norecord); |
| 888 | } | 888 | } |
| 889 | 889 | ||
| 890 | DEFUN ("handle-focus-in", Fhandle_focus_in, Shandle_focus_in, 1, 1, "e", | ||
| 891 | doc: /* Handle a focus-in event. | ||
| 892 | Focus in events are usually bound to this function. | ||
| 893 | Focus in events occur when a frame has focus, but a switch-frame event | ||
| 894 | is not generated. | ||
| 895 | This function runs the hook `focus-in-hook'. | ||
| 896 | It also checks if blink-cursor timers should be turned on again. */) | ||
| 897 | (Lisp_Object event) | ||
| 898 | { | ||
| 899 | Frun_hooks (1, &Qfocus_in_hook); | ||
| 900 | return call0 (intern ("blink-cursor-check")); | ||
| 901 | } | ||
| 902 | |||
| 903 | DEFUN ("handle-focus-out", Fhandle_focus_out, Shandle_focus_out, 1, 1, "e", | ||
| 904 | doc: /* Handle a focus-out event. | ||
| 905 | Focus out events are usually bound to this function. | ||
| 906 | Focus out events occur when no frame has focus. | ||
| 907 | This function runs the hook `focus-out-hook'. | ||
| 908 | It also checks if blink-cursor timers should be turned off. */) | ||
| 909 | (Lisp_Object event) | ||
| 910 | { | ||
| 911 | Frun_hooks (1, &Qfocus_out_hook); | ||
| 912 | return call0 (intern ("blink-cursor-suspend")); | ||
| 913 | } | ||
| 914 | |||
| 915 | DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "e", | 890 | DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "e", |
| 916 | doc: /* Handle a switch-frame event EVENT. | 891 | doc: /* Handle a switch-frame event EVENT. |
| 917 | Switch-frame events are usually bound to this function. | 892 | Switch-frame events are usually bound to this function. |
| @@ -926,7 +901,8 @@ to that frame. */) | |||
| 926 | /* Preserve prefix arg that the command loop just cleared. */ | 901 | /* Preserve prefix arg that the command loop just cleared. */ |
| 927 | kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); | 902 | kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); |
| 928 | Frun_hooks (1, &Qmouse_leave_buffer_hook); | 903 | Frun_hooks (1, &Qmouse_leave_buffer_hook); |
| 929 | Fhandle_focus_in (event); // switch-frame implies a focus in. | 904 | /* `switch-frame' implies a focus in. */ |
| 905 | call1 (intern ("handle-focus-in"), event); | ||
| 930 | return do_switch_frame (event, 0, 0, Qnil); | 906 | return do_switch_frame (event, 0, 0, Qnil); |
| 931 | } | 907 | } |
| 932 | 908 | ||
| @@ -4542,8 +4518,6 @@ automatically. See also `mouse-autoselect-window'. */); | |||
| 4542 | defsubr (&Swindow_system); | 4518 | defsubr (&Swindow_system); |
| 4543 | defsubr (&Smake_terminal_frame); | 4519 | defsubr (&Smake_terminal_frame); |
| 4544 | defsubr (&Shandle_switch_frame); | 4520 | defsubr (&Shandle_switch_frame); |
| 4545 | defsubr (&Shandle_focus_in); | ||
| 4546 | defsubr (&Shandle_focus_out); | ||
| 4547 | defsubr (&Sselect_frame); | 4521 | defsubr (&Sselect_frame); |
| 4548 | defsubr (&Sselected_frame); | 4522 | defsubr (&Sselected_frame); |
| 4549 | defsubr (&Sframe_list); | 4523 | defsubr (&Sframe_list); |