diff options
| author | Joakim Verona | 2015-01-25 21:19:27 +0100 |
|---|---|---|
| committer | Joakim Verona | 2015-01-25 21:19:27 +0100 |
| commit | d522fd8ca73e668bfafd0419bc5f71f2751cca24 (patch) | |
| tree | 4b57a4d2d26e578035801f1c895dcfda5895e09d /src/keyboard.c | |
| parent | e5087278b9bcab5847ce63d80c0d74c27f50e719 (diff) | |
| parent | a3689d3c661fe36df971c875760f8d500b5ae994 (diff) | |
| download | emacs-d522fd8ca73e668bfafd0419bc5f71f2751cca24.tar.gz emacs-d522fd8ca73e668bfafd0419bc5f71f2751cca24.zip | |
Merge branch 'master' into xwidget
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index e9ecd8cbd3d..a5e1363326c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1844,7 +1844,7 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) | |||
| 1844 | AUTO_STRING (format, "Error in %s (%S): %S"); | 1844 | AUTO_STRING (format, "Error in %s (%S): %S"); |
| 1845 | Lisp_Object hook = args[0]; | 1845 | Lisp_Object hook = args[0]; |
| 1846 | Lisp_Object fun = args[1]; | 1846 | Lisp_Object fun = args[1]; |
| 1847 | Fmessage (4, (Lisp_Object []) {format, hook, fun, error}); | 1847 | CALLN (Fmessage, format, hook, fun, error); |
| 1848 | 1848 | ||
| 1849 | if (SYMBOLP (hook)) | 1849 | if (SYMBOLP (hook)) |
| 1850 | { | 1850 | { |
| @@ -1877,13 +1877,10 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) | |||
| 1877 | static Lisp_Object | 1877 | static Lisp_Object |
| 1878 | safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) | 1878 | safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) |
| 1879 | { | 1879 | { |
| 1880 | Lisp_Object iargs[2]; | ||
| 1881 | |||
| 1882 | eassert (nargs == 2); | 1880 | eassert (nargs == 2); |
| 1883 | /* Yes, run_hook_with_args works this way. */ | 1881 | /* Yes, run_hook_with_args works with args in the other order. */ |
| 1884 | iargs[0] = args[1]; | 1882 | internal_condition_case_n (safe_run_hooks_1, |
| 1885 | iargs[1] = args[0]; | 1883 | 2, ((Lisp_Object []) {args[1], args[0]}), |
| 1886 | internal_condition_case_n (safe_run_hooks_1, 2, iargs, | ||
| 1887 | Qt, safe_run_hooks_error); | 1884 | Qt, safe_run_hooks_error); |
| 1888 | return Qnil; | 1885 | return Qnil; |
| 1889 | } | 1886 | } |
| @@ -1895,16 +1892,12 @@ safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) | |||
| 1895 | void | 1892 | void |
| 1896 | safe_run_hooks (Lisp_Object hook) | 1893 | safe_run_hooks (Lisp_Object hook) |
| 1897 | { | 1894 | { |
| 1898 | Lisp_Object args[2]; | ||
| 1899 | struct gcpro gcpro1; | 1895 | struct gcpro gcpro1; |
| 1900 | ptrdiff_t count = SPECPDL_INDEX (); | 1896 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1901 | 1897 | ||
| 1902 | args[0] = hook; | ||
| 1903 | args[1] = hook; | ||
| 1904 | |||
| 1905 | GCPRO1 (hook); | 1898 | GCPRO1 (hook); |
| 1906 | specbind (Qinhibit_quit, Qt); | 1899 | specbind (Qinhibit_quit, Qt); |
| 1907 | run_hook_with_args (2, args, safe_run_hook_funcall); | 1900 | run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), safe_run_hook_funcall); |
| 1908 | unbind_to (count, Qnil); | 1901 | unbind_to (count, Qnil); |
| 1909 | UNGCPRO; | 1902 | UNGCPRO; |
| 1910 | } | 1903 | } |
| @@ -10756,25 +10749,25 @@ The elements of this list correspond to the arguments of | |||
| 10756 | `set-input-mode'. */) | 10749 | `set-input-mode'. */) |
| 10757 | (void) | 10750 | (void) |
| 10758 | { | 10751 | { |
| 10759 | Lisp_Object val[4]; | ||
| 10760 | struct frame *sf = XFRAME (selected_frame); | 10752 | struct frame *sf = XFRAME (selected_frame); |
| 10761 | 10753 | ||
| 10762 | val[0] = interrupt_input ? Qt : Qnil; | 10754 | Lisp_Object interrupt = interrupt_input ? Qt : Qnil; |
| 10755 | Lisp_Object flow, meta; | ||
| 10763 | if (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf)) | 10756 | if (FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf)) |
| 10764 | { | 10757 | { |
| 10765 | val[1] = FRAME_TTY (sf)->flow_control ? Qt : Qnil; | 10758 | flow = FRAME_TTY (sf)->flow_control ? Qt : Qnil; |
| 10766 | val[2] = (FRAME_TTY (sf)->meta_key == 2 | 10759 | meta = (FRAME_TTY (sf)->meta_key == 2 |
| 10767 | ? make_number (0) | 10760 | ? make_number (0) |
| 10768 | : (CURTTY ()->meta_key == 1 ? Qt : Qnil)); | 10761 | : (CURTTY ()->meta_key == 1 ? Qt : Qnil)); |
| 10769 | } | 10762 | } |
| 10770 | else | 10763 | else |
| 10771 | { | 10764 | { |
| 10772 | val[1] = Qnil; | 10765 | flow = Qnil; |
| 10773 | val[2] = Qt; | 10766 | meta = Qt; |
| 10774 | } | 10767 | } |
| 10775 | XSETFASTINT (val[3], quit_char); | 10768 | Lisp_Object quit = make_number (quit_char); |
| 10776 | 10769 | ||
| 10777 | return Flist (ARRAYELTS (val), val); | 10770 | return list4 (interrupt, flow, meta, quit); |
| 10778 | } | 10771 | } |
| 10779 | 10772 | ||
| 10780 | DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, | 10773 | DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, |