diff options
| author | Andrea Corallo | 2020-09-21 21:45:02 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-09-21 21:45:02 +0200 |
| commit | 5a8be1719a80031ea3833749b1e82de8d5a39787 (patch) | |
| tree | 1f3cb774fd9e222b7d4f2f426695e7894ee7b297 /src | |
| parent | 5b41545f1be367837d9ac717ea67fba19a4c24d4 (diff) | |
| parent | fb68645b5a258c98acc11efdc3caae80683cc6b0 (diff) | |
| download | emacs-5a8be1719a80031ea3833749b1e82de8d5a39787.tar.gz emacs-5a8be1719a80031ea3833749b1e82de8d5a39787.zip | |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 9 | ||||
| -rw-r--r-- | src/dbusbind.c | 158 | ||||
| -rw-r--r-- | src/dispextern.h | 4 | ||||
| -rw-r--r-- | src/emacs-module.c | 23 | ||||
| -rw-r--r-- | src/eval.c | 9 | ||||
| -rw-r--r-- | src/font.c | 15 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 99 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/lread.c | 3 | ||||
| -rw-r--r-- | src/module-env-28.h | 4 | ||||
| -rw-r--r-- | src/nsterm.m | 8 | ||||
| -rw-r--r-- | src/nsxwidget.m | 6 | ||||
| -rw-r--r-- | src/pdumper.c | 4 | ||||
| -rw-r--r-- | src/print.c | 17 | ||||
| -rw-r--r-- | src/process.c | 4 | ||||
| -rw-r--r-- | src/syntax.c | 25 | ||||
| -rw-r--r-- | src/term.c | 45 | ||||
| -rw-r--r-- | src/termchar.h | 2 | ||||
| -rw-r--r-- | src/terminfo.c | 5 | ||||
| -rw-r--r-- | src/w32fns.c | 10 | ||||
| -rw-r--r-- | src/w32heap.c | 2 | ||||
| -rw-r--r-- | src/w32menu.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 2 | ||||
| -rw-r--r-- | src/w32term.h | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 21 | ||||
| -rw-r--r-- | src/xfaces.c | 12 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xterm.h | 2 |
29 files changed, 354 insertions, 145 deletions
diff --git a/src/data.c b/src/data.c index 85c73b406c4..3f035269de1 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -966,6 +966,15 @@ Value, if non-nil, is a list (interactive SPEC). */) | |||
| 966 | if (PVSIZE (fun) > COMPILED_INTERACTIVE) | 966 | if (PVSIZE (fun) > COMPILED_INTERACTIVE) |
| 967 | return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE)); | 967 | return list2 (Qinteractive, AREF (fun, COMPILED_INTERACTIVE)); |
| 968 | } | 968 | } |
| 969 | #ifdef HAVE_MODULES | ||
| 970 | else if (MODULE_FUNCTIONP (fun)) | ||
| 971 | { | ||
| 972 | Lisp_Object form | ||
| 973 | = module_function_interactive_form (XMODULE_FUNCTION (fun)); | ||
| 974 | if (! NILP (form)) | ||
| 975 | return form; | ||
| 976 | } | ||
| 977 | #endif | ||
| 969 | else if (AUTOLOADP (fun)) | 978 | else if (AUTOLOADP (fun)) |
| 970 | return Finteractive_form (Fautoload_do_load (fun, cmd, Qnil)); | 979 | return Finteractive_form (Fautoload_do_load (fun, cmd, Qnil)); |
| 971 | else if (CONSP (fun)) | 980 | else if (CONSP (fun)) |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 02af244ac38..4c5ab485803 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -129,36 +129,23 @@ static bool xd_in_read_queued_messages = 0; | |||
| 129 | #define XD_BASIC_DBUS_TYPE(type) \ | 129 | #define XD_BASIC_DBUS_TYPE(type) \ |
| 130 | (dbus_type_is_valid (type) && dbus_type_is_basic (type)) | 130 | (dbus_type_is_valid (type) && dbus_type_is_basic (type)) |
| 131 | #else | 131 | #else |
| 132 | #ifdef DBUS_TYPE_UNIX_FD | ||
| 133 | #define XD_BASIC_DBUS_TYPE(type) \ | ||
| 134 | ((type == DBUS_TYPE_BYTE) \ | ||
| 135 | || (type == DBUS_TYPE_BOOLEAN) \ | ||
| 136 | || (type == DBUS_TYPE_INT16) \ | ||
| 137 | || (type == DBUS_TYPE_UINT16) \ | ||
| 138 | || (type == DBUS_TYPE_INT32) \ | ||
| 139 | || (type == DBUS_TYPE_UINT32) \ | ||
| 140 | || (type == DBUS_TYPE_INT64) \ | ||
| 141 | || (type == DBUS_TYPE_UINT64) \ | ||
| 142 | || (type == DBUS_TYPE_DOUBLE) \ | ||
| 143 | || (type == DBUS_TYPE_STRING) \ | ||
| 144 | || (type == DBUS_TYPE_OBJECT_PATH) \ | ||
| 145 | || (type == DBUS_TYPE_SIGNATURE) \ | ||
| 146 | || (type == DBUS_TYPE_UNIX_FD)) | ||
| 147 | #else | ||
| 148 | #define XD_BASIC_DBUS_TYPE(type) \ | 132 | #define XD_BASIC_DBUS_TYPE(type) \ |
| 149 | ((type == DBUS_TYPE_BYTE) \ | 133 | ((type == DBUS_TYPE_BYTE) \ |
| 150 | || (type == DBUS_TYPE_BOOLEAN) \ | 134 | || (type == DBUS_TYPE_BOOLEAN) \ |
| 151 | || (type == DBUS_TYPE_INT16) \ | 135 | || (type == DBUS_TYPE_INT16) \ |
| 152 | || (type == DBUS_TYPE_UINT16) \ | 136 | || (type == DBUS_TYPE_UINT16) \ |
| 153 | || (type == DBUS_TYPE_INT32) \ | 137 | || (type == DBUS_TYPE_INT32) \ |
| 154 | || (type == DBUS_TYPE_UINT32) \ | 138 | || (type == DBUS_TYPE_UINT32) \ |
| 155 | || (type == DBUS_TYPE_INT64) \ | 139 | || (type == DBUS_TYPE_INT64) \ |
| 156 | || (type == DBUS_TYPE_UINT64) \ | 140 | || (type == DBUS_TYPE_UINT64) \ |
| 157 | || (type == DBUS_TYPE_DOUBLE) \ | 141 | || (type == DBUS_TYPE_DOUBLE) \ |
| 158 | || (type == DBUS_TYPE_STRING) \ | 142 | || (type == DBUS_TYPE_STRING) \ |
| 159 | || (type == DBUS_TYPE_OBJECT_PATH) \ | 143 | || (type == DBUS_TYPE_OBJECT_PATH) \ |
| 160 | || (type == DBUS_TYPE_SIGNATURE)) | 144 | || (type == DBUS_TYPE_SIGNATURE) \ |
| 145 | #ifdef DBUS_TYPE_UNIX_FD | ||
| 146 | || (type == DBUS_TYPE_UNIX_FD) \ | ||
| 161 | #endif | 147 | #endif |
| 148 | ) | ||
| 162 | #endif | 149 | #endif |
| 163 | 150 | ||
| 164 | /* This was a macro. On Solaris 2.11 it was said to compile for | 151 | /* This was a macro. On Solaris 2.11 it was said to compile for |
| @@ -192,6 +179,33 @@ xd_symbol_to_dbus_type (Lisp_Object object) | |||
| 192 | : DBUS_TYPE_INVALID); | 179 | : DBUS_TYPE_INVALID); |
| 193 | } | 180 | } |
| 194 | 181 | ||
| 182 | /* Determine the Lisp symbol of DBusType. */ | ||
| 183 | static Lisp_Object | ||
| 184 | xd_dbus_type_to_symbol (int type) | ||
| 185 | { | ||
| 186 | return | ||
| 187 | (type == DBUS_TYPE_BYTE) ? QCbyte | ||
| 188 | : (type == DBUS_TYPE_BOOLEAN) ? QCboolean | ||
| 189 | : (type == DBUS_TYPE_INT16) ? QCint16 | ||
| 190 | : (type == DBUS_TYPE_UINT16) ? QCuint16 | ||
| 191 | : (type == DBUS_TYPE_INT32) ? QCint32 | ||
| 192 | : (type == DBUS_TYPE_UINT32) ? QCuint32 | ||
| 193 | : (type == DBUS_TYPE_INT64) ? QCint64 | ||
| 194 | : (type == DBUS_TYPE_UINT64) ? QCuint64 | ||
| 195 | : (type == DBUS_TYPE_DOUBLE) ? QCdouble | ||
| 196 | : (type == DBUS_TYPE_STRING) ? QCstring | ||
| 197 | : (type == DBUS_TYPE_OBJECT_PATH) ? QCobject_path | ||
| 198 | : (type == DBUS_TYPE_SIGNATURE) ? QCsignature | ||
| 199 | #ifdef DBUS_TYPE_UNIX_FD | ||
| 200 | : (type == DBUS_TYPE_UNIX_FD) ? QCunix_fd | ||
| 201 | #endif | ||
| 202 | : (type == DBUS_TYPE_ARRAY) ? QCarray | ||
| 203 | : (type == DBUS_TYPE_VARIANT) ? QCvariant | ||
| 204 | : (type == DBUS_TYPE_STRUCT) ? QCstruct | ||
| 205 | : (type == DBUS_TYPE_DICT_ENTRY) ? QCdict_entry | ||
| 206 | : Qnil; | ||
| 207 | } | ||
| 208 | |||
| 195 | /* Check whether a Lisp symbol is a predefined D-Bus type symbol. */ | 209 | /* Check whether a Lisp symbol is a predefined D-Bus type symbol. */ |
| 196 | #define XD_DBUS_TYPE_P(object) \ | 210 | #define XD_DBUS_TYPE_P(object) \ |
| 197 | (SYMBOLP (object) && ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID))) | 211 | (SYMBOLP (object) && ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID))) |
| @@ -360,8 +374,8 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) | |||
| 360 | break; | 374 | break; |
| 361 | 375 | ||
| 362 | case DBUS_TYPE_BOOLEAN: | 376 | case DBUS_TYPE_BOOLEAN: |
| 363 | if (!EQ (object, Qt) && !NILP (object)) | 377 | /* Any non-nil object will be regarded as `t', so we don't apply |
| 364 | wrong_type_argument (intern ("booleanp"), object); | 378 | further type check. */ |
| 365 | sprintf (signature, "%c", dtype); | 379 | sprintf (signature, "%c", dtype); |
| 366 | break; | 380 | break; |
| 367 | 381 | ||
| @@ -816,7 +830,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 816 | dbus_message_iter_get_basic (iter, &val); | 830 | dbus_message_iter_get_basic (iter, &val); |
| 817 | val = val & 0xFF; | 831 | val = val & 0xFF; |
| 818 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); | 832 | XD_DEBUG_MESSAGE ("%c %u", dtype, val); |
| 819 | return make_fixnum (val); | 833 | return list2 (xd_dbus_type_to_symbol (dtype), make_fixnum (val)); |
| 820 | } | 834 | } |
| 821 | 835 | ||
| 822 | case DBUS_TYPE_BOOLEAN: | 836 | case DBUS_TYPE_BOOLEAN: |
| @@ -824,7 +838,8 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 824 | dbus_bool_t val; | 838 | dbus_bool_t val; |
| 825 | dbus_message_iter_get_basic (iter, &val); | 839 | dbus_message_iter_get_basic (iter, &val); |
| 826 | XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true"); | 840 | XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true"); |
| 827 | return (val == FALSE) ? Qnil : Qt; | 841 | return list2 (xd_dbus_type_to_symbol (dtype), |
| 842 | (val == FALSE) ? Qnil : Qt); | ||
| 828 | } | 843 | } |
| 829 | 844 | ||
| 830 | case DBUS_TYPE_INT16: | 845 | case DBUS_TYPE_INT16: |
| @@ -834,7 +849,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 834 | dbus_message_iter_get_basic (iter, &val); | 849 | dbus_message_iter_get_basic (iter, &val); |
| 835 | pval = val; | 850 | pval = val; |
| 836 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); | 851 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); |
| 837 | return make_fixnum (val); | 852 | return list2 (xd_dbus_type_to_symbol (dtype), make_fixnum (val)); |
| 838 | } | 853 | } |
| 839 | 854 | ||
| 840 | case DBUS_TYPE_UINT16: | 855 | case DBUS_TYPE_UINT16: |
| @@ -844,7 +859,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 844 | dbus_message_iter_get_basic (iter, &val); | 859 | dbus_message_iter_get_basic (iter, &val); |
| 845 | pval = val; | 860 | pval = val; |
| 846 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); | 861 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); |
| 847 | return make_fixnum (val); | 862 | return list2 (xd_dbus_type_to_symbol (dtype), make_fixnum (val)); |
| 848 | } | 863 | } |
| 849 | 864 | ||
| 850 | case DBUS_TYPE_INT32: | 865 | case DBUS_TYPE_INT32: |
| @@ -854,7 +869,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 854 | dbus_message_iter_get_basic (iter, &val); | 869 | dbus_message_iter_get_basic (iter, &val); |
| 855 | pval = val; | 870 | pval = val; |
| 856 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); | 871 | XD_DEBUG_MESSAGE ("%c %d", dtype, pval); |
| 857 | return INT_TO_INTEGER (val); | 872 | return list2 (xd_dbus_type_to_symbol (dtype), INT_TO_INTEGER (val)); |
| 858 | } | 873 | } |
| 859 | 874 | ||
| 860 | case DBUS_TYPE_UINT32: | 875 | case DBUS_TYPE_UINT32: |
| @@ -867,7 +882,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 867 | dbus_message_iter_get_basic (iter, &val); | 882 | dbus_message_iter_get_basic (iter, &val); |
| 868 | pval = val; | 883 | pval = val; |
| 869 | XD_DEBUG_MESSAGE ("%c %u", dtype, pval); | 884 | XD_DEBUG_MESSAGE ("%c %u", dtype, pval); |
| 870 | return INT_TO_INTEGER (val); | 885 | return list2 (xd_dbus_type_to_symbol (dtype), INT_TO_INTEGER (val)); |
| 871 | } | 886 | } |
| 872 | 887 | ||
| 873 | case DBUS_TYPE_INT64: | 888 | case DBUS_TYPE_INT64: |
| @@ -876,7 +891,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 876 | dbus_message_iter_get_basic (iter, &val); | 891 | dbus_message_iter_get_basic (iter, &val); |
| 877 | intmax_t pval = val; | 892 | intmax_t pval = val; |
| 878 | XD_DEBUG_MESSAGE ("%c %"PRIdMAX, dtype, pval); | 893 | XD_DEBUG_MESSAGE ("%c %"PRIdMAX, dtype, pval); |
| 879 | return INT_TO_INTEGER (val); | 894 | return list2 (xd_dbus_type_to_symbol (dtype), INT_TO_INTEGER (val)); |
| 880 | } | 895 | } |
| 881 | 896 | ||
| 882 | case DBUS_TYPE_UINT64: | 897 | case DBUS_TYPE_UINT64: |
| @@ -885,7 +900,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 885 | dbus_message_iter_get_basic (iter, &val); | 900 | dbus_message_iter_get_basic (iter, &val); |
| 886 | uintmax_t pval = val; | 901 | uintmax_t pval = val; |
| 887 | XD_DEBUG_MESSAGE ("%c %"PRIuMAX, dtype, pval); | 902 | XD_DEBUG_MESSAGE ("%c %"PRIuMAX, dtype, pval); |
| 888 | return INT_TO_INTEGER (val); | 903 | return list2 (xd_dbus_type_to_symbol (dtype), INT_TO_INTEGER (val)); |
| 889 | } | 904 | } |
| 890 | 905 | ||
| 891 | case DBUS_TYPE_DOUBLE: | 906 | case DBUS_TYPE_DOUBLE: |
| @@ -893,7 +908,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 893 | double val; | 908 | double val; |
| 894 | dbus_message_iter_get_basic (iter, &val); | 909 | dbus_message_iter_get_basic (iter, &val); |
| 895 | XD_DEBUG_MESSAGE ("%c %f", dtype, val); | 910 | XD_DEBUG_MESSAGE ("%c %f", dtype, val); |
| 896 | return make_float (val); | 911 | return list2 (xd_dbus_type_to_symbol (dtype), make_float (val)); |
| 897 | } | 912 | } |
| 898 | 913 | ||
| 899 | case DBUS_TYPE_STRING: | 914 | case DBUS_TYPE_STRING: |
| @@ -903,7 +918,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 903 | char *val; | 918 | char *val; |
| 904 | dbus_message_iter_get_basic (iter, &val); | 919 | dbus_message_iter_get_basic (iter, &val); |
| 905 | XD_DEBUG_MESSAGE ("%c %s", dtype, val); | 920 | XD_DEBUG_MESSAGE ("%c %s", dtype, val); |
| 906 | return build_string (val); | 921 | return list2 (xd_dbus_type_to_symbol (dtype), build_string (val)); |
| 907 | } | 922 | } |
| 908 | 923 | ||
| 909 | case DBUS_TYPE_ARRAY: | 924 | case DBUS_TYPE_ARRAY: |
| @@ -923,7 +938,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter) | |||
| 923 | dbus_message_iter_next (&subiter); | 938 | dbus_message_iter_next (&subiter); |
| 924 | } | 939 | } |
| 925 | XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (result)); | 940 | XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (result)); |
| 926 | return Fnreverse (result); | 941 | return Fcons (xd_dbus_type_to_symbol (dtype), Fnreverse (result)); |
| 927 | } | 942 | } |
| 928 | 943 | ||
| 929 | default: | 944 | default: |
| @@ -1254,6 +1269,10 @@ The following usages are expected: | |||
| 1254 | (dbus-message-internal | 1269 | (dbus-message-internal |
| 1255 | dbus-message-type-error BUS SERVICE SERIAL ERROR-NAME &rest ARGS) | 1270 | dbus-message-type-error BUS SERVICE SERIAL ERROR-NAME &rest ARGS) |
| 1256 | 1271 | ||
| 1272 | `dbus-check-arguments': (does not send a message) | ||
| 1273 | (dbus-message-internal | ||
| 1274 | dbus-message-type-invalid BUS SERVICE &rest ARGS) | ||
| 1275 | |||
| 1257 | usage: (dbus-message-internal &rest REST) */) | 1276 | usage: (dbus-message-internal &rest REST) */) |
| 1258 | (ptrdiff_t nargs, Lisp_Object *args) | 1277 | (ptrdiff_t nargs, Lisp_Object *args) |
| 1259 | { | 1278 | { |
| @@ -1271,7 +1290,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1271 | dbus_uint32_t serial = 0; | 1290 | dbus_uint32_t serial = 0; |
| 1272 | unsigned int ui_serial; | 1291 | unsigned int ui_serial; |
| 1273 | int timeout = -1; | 1292 | int timeout = -1; |
| 1274 | ptrdiff_t count; | 1293 | ptrdiff_t count, count0; |
| 1275 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; | 1294 | char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH]; |
| 1276 | 1295 | ||
| 1277 | /* Initialize parameters. */ | 1296 | /* Initialize parameters. */ |
| @@ -1281,7 +1300,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1281 | handler = Qnil; | 1300 | handler = Qnil; |
| 1282 | 1301 | ||
| 1283 | CHECK_FIXNAT (message_type); | 1302 | CHECK_FIXNAT (message_type); |
| 1284 | if (! (DBUS_MESSAGE_TYPE_INVALID < XFIXNAT (message_type) | 1303 | if (! (DBUS_MESSAGE_TYPE_INVALID <= XFIXNAT (message_type) |
| 1285 | && XFIXNAT (message_type) < DBUS_NUM_MESSAGE_TYPES)) | 1304 | && XFIXNAT (message_type) < DBUS_NUM_MESSAGE_TYPES)) |
| 1286 | XD_SIGNAL2 (build_string ("Invalid message type"), message_type); | 1305 | XD_SIGNAL2 (build_string ("Invalid message type"), message_type); |
| 1287 | mtype = XFIXNAT (message_type); | 1306 | mtype = XFIXNAT (message_type); |
| @@ -1296,13 +1315,16 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1296 | handler = args[6]; | 1315 | handler = args[6]; |
| 1297 | count = (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) ? 7 : 6; | 1316 | count = (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) ? 7 : 6; |
| 1298 | } | 1317 | } |
| 1299 | else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */ | 1318 | else if ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN) |
| 1319 | || (mtype == DBUS_MESSAGE_TYPE_ERROR)) | ||
| 1300 | { | 1320 | { |
| 1301 | serial = xd_extract_unsigned (args[3], TYPE_MAXIMUM (dbus_uint32_t)); | 1321 | serial = xd_extract_unsigned (args[3], TYPE_MAXIMUM (dbus_uint32_t)); |
| 1302 | if (mtype == DBUS_MESSAGE_TYPE_ERROR) | 1322 | if (mtype == DBUS_MESSAGE_TYPE_ERROR) |
| 1303 | error_name = args[4]; | 1323 | error_name = args[4]; |
| 1304 | count = (mtype == DBUS_MESSAGE_TYPE_ERROR) ? 5 : 4; | 1324 | count = (mtype == DBUS_MESSAGE_TYPE_ERROR) ? 5 : 4; |
| 1305 | } | 1325 | } |
| 1326 | else /* DBUS_MESSAGE_TYPE_INVALID */ | ||
| 1327 | count = 3; | ||
| 1306 | 1328 | ||
| 1307 | /* Check parameters. */ | 1329 | /* Check parameters. */ |
| 1308 | XD_DBUS_VALIDATE_BUS_ADDRESS (bus); | 1330 | XD_DBUS_VALIDATE_BUS_ADDRESS (bus); |
| @@ -1352,7 +1374,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1352 | XD_OBJECT_TO_STRING (service), | 1374 | XD_OBJECT_TO_STRING (service), |
| 1353 | ui_serial); | 1375 | ui_serial); |
| 1354 | break; | 1376 | break; |
| 1355 | default: /* DBUS_MESSAGE_TYPE_ERROR */ | 1377 | case DBUS_MESSAGE_TYPE_ERROR: |
| 1356 | ui_serial = serial; | 1378 | ui_serial = serial; |
| 1357 | XD_DEBUG_MESSAGE ("%s %s %s %u %s", | 1379 | XD_DEBUG_MESSAGE ("%s %s %s %u %s", |
| 1358 | XD_MESSAGE_TYPE_TO_STRING (mtype), | 1380 | XD_MESSAGE_TYPE_TO_STRING (mtype), |
| @@ -1360,17 +1382,25 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1360 | XD_OBJECT_TO_STRING (service), | 1382 | XD_OBJECT_TO_STRING (service), |
| 1361 | ui_serial, | 1383 | ui_serial, |
| 1362 | XD_OBJECT_TO_STRING (error_name)); | 1384 | XD_OBJECT_TO_STRING (error_name)); |
| 1385 | break; | ||
| 1386 | default: /* DBUS_MESSAGE_TYPE_INVALID */ | ||
| 1387 | XD_DEBUG_MESSAGE ("%s %s %s", | ||
| 1388 | XD_MESSAGE_TYPE_TO_STRING (mtype), | ||
| 1389 | XD_OBJECT_TO_STRING (bus), | ||
| 1390 | XD_OBJECT_TO_STRING (service)); | ||
| 1363 | } | 1391 | } |
| 1364 | 1392 | ||
| 1365 | /* Retrieve bus address. */ | 1393 | /* Retrieve bus address. */ |
| 1366 | connection = xd_get_connection_address (bus); | 1394 | connection = xd_get_connection_address (bus); |
| 1367 | 1395 | ||
| 1368 | /* Create the D-Bus message. */ | 1396 | /* Create the D-Bus message. Since DBUS_MESSAGE_TYPE_INVALID is not |
| 1369 | dmessage = dbus_message_new (mtype); | 1397 | a valid message type, we mockup it with DBUS_MESSAGE_TYPE_SIGNAL. */ |
| 1398 | dmessage = dbus_message_new | ||
| 1399 | ((mtype == DBUS_MESSAGE_TYPE_INVALID) ? DBUS_MESSAGE_TYPE_SIGNAL : mtype); | ||
| 1370 | if (dmessage == NULL) | 1400 | if (dmessage == NULL) |
| 1371 | XD_SIGNAL1 (build_string ("Unable to create a new message")); | 1401 | XD_SIGNAL1 (build_string ("Unable to create a new message")); |
| 1372 | 1402 | ||
| 1373 | if (STRINGP (service)) | 1403 | if ((STRINGP (service)) && (mtype != DBUS_MESSAGE_TYPE_INVALID)) |
| 1374 | { | 1404 | { |
| 1375 | if (mtype != DBUS_MESSAGE_TYPE_SIGNAL) | 1405 | if (mtype != DBUS_MESSAGE_TYPE_SIGNAL) |
| 1376 | /* Set destination. */ | 1406 | /* Set destination. */ |
| @@ -1412,7 +1442,8 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1412 | XD_SIGNAL1 (build_string ("Unable to set the message parameter")); | 1442 | XD_SIGNAL1 (build_string ("Unable to set the message parameter")); |
| 1413 | } | 1443 | } |
| 1414 | 1444 | ||
| 1415 | else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */ | 1445 | else if ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN) |
| 1446 | || (mtype == DBUS_MESSAGE_TYPE_ERROR)) | ||
| 1416 | { | 1447 | { |
| 1417 | if (!dbus_message_set_reply_serial (dmessage, serial)) | 1448 | if (!dbus_message_set_reply_serial (dmessage, serial)) |
| 1418 | XD_SIGNAL1 (build_string ("Unable to create a return message")); | 1449 | XD_SIGNAL1 (build_string ("Unable to create a return message")); |
| @@ -1434,6 +1465,7 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1434 | dbus_message_iter_init_append (dmessage, &iter); | 1465 | dbus_message_iter_init_append (dmessage, &iter); |
| 1435 | 1466 | ||
| 1436 | /* Append parameters to the message. */ | 1467 | /* Append parameters to the message. */ |
| 1468 | count0 = count - 1; | ||
| 1437 | for (; count < nargs; ++count) | 1469 | for (; count < nargs; ++count) |
| 1438 | { | 1470 | { |
| 1439 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[count]); | 1471 | dtype = XD_OBJECT_TO_DBUS_TYPE (args[count]); |
| @@ -1441,15 +1473,17 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1441 | { | 1473 | { |
| 1442 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count]); | 1474 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count]); |
| 1443 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count+1]); | 1475 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count+1]); |
| 1444 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", count - 4, | 1476 | XD_DEBUG_MESSAGE ("Parameter%"pD"d: %s Parameter%"pD"d: %s", |
| 1477 | count - count0, | ||
| 1445 | XD_OBJECT_TO_STRING (args[count]), | 1478 | XD_OBJECT_TO_STRING (args[count]), |
| 1479 | count + 1 - count0, | ||
| 1446 | XD_OBJECT_TO_STRING (args[count+1])); | 1480 | XD_OBJECT_TO_STRING (args[count+1])); |
| 1447 | ++count; | 1481 | ++count; |
| 1448 | } | 1482 | } |
| 1449 | else | 1483 | else |
| 1450 | { | 1484 | { |
| 1451 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count]); | 1485 | XD_DEBUG_VALID_LISP_OBJECT_P (args[count]); |
| 1452 | XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", count - 4, | 1486 | XD_DEBUG_MESSAGE ("Parameter%"pD"d: %s", count - count0, |
| 1453 | XD_OBJECT_TO_STRING (args[count])); | 1487 | XD_OBJECT_TO_STRING (args[count])); |
| 1454 | } | 1488 | } |
| 1455 | 1489 | ||
| @@ -1460,7 +1494,10 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1460 | xd_append_arg (dtype, args[count], &iter); | 1494 | xd_append_arg (dtype, args[count], &iter); |
| 1461 | } | 1495 | } |
| 1462 | 1496 | ||
| 1463 | if (!NILP (handler)) | 1497 | if (mtype == DBUS_MESSAGE_TYPE_INVALID) |
| 1498 | result = Qt; | ||
| 1499 | |||
| 1500 | else if (!NILP (handler)) | ||
| 1464 | { | 1501 | { |
| 1465 | /* Send the message. The message is just added to the outgoing | 1502 | /* Send the message. The message is just added to the outgoing |
| 1466 | message queue. */ | 1503 | message queue. */ |
| @@ -1485,7 +1522,8 @@ usage: (dbus-message-internal &rest REST) */) | |||
| 1485 | result = Qnil; | 1522 | result = Qnil; |
| 1486 | } | 1523 | } |
| 1487 | 1524 | ||
| 1488 | XD_DEBUG_MESSAGE ("Message sent: %s", XD_OBJECT_TO_STRING (result)); | 1525 | if (mtype != DBUS_MESSAGE_TYPE_INVALID) |
| 1526 | XD_DEBUG_MESSAGE ("Message sent: %s", XD_OBJECT_TO_STRING (result)); | ||
| 1489 | 1527 | ||
| 1490 | /* Cleanup. */ | 1528 | /* Cleanup. */ |
| 1491 | dbus_message_unref (dmessage); | 1529 | dbus_message_unref (dmessage); |
| @@ -1533,7 +1571,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1533 | } | 1571 | } |
| 1534 | 1572 | ||
| 1535 | /* Read message type, message serial, unique name, object path, | 1573 | /* Read message type, message serial, unique name, object path, |
| 1536 | interface and member from the message. */ | 1574 | interface, member and error name from the message. */ |
| 1537 | mtype = dbus_message_get_type (dmessage); | 1575 | mtype = dbus_message_get_type (dmessage); |
| 1538 | ui_serial = serial = | 1576 | ui_serial = serial = |
| 1539 | ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN) | 1577 | ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN) |
| @@ -1544,7 +1582,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1544 | path = dbus_message_get_path (dmessage); | 1582 | path = dbus_message_get_path (dmessage); |
| 1545 | interface = dbus_message_get_interface (dmessage); | 1583 | interface = dbus_message_get_interface (dmessage); |
| 1546 | member = dbus_message_get_member (dmessage); | 1584 | member = dbus_message_get_member (dmessage); |
| 1547 | error_name =dbus_message_get_error_name (dmessage); | 1585 | error_name = dbus_message_get_error_name (dmessage); |
| 1548 | 1586 | ||
| 1549 | XD_DEBUG_MESSAGE ("Event received: %s %u %s %s %s %s %s %s", | 1587 | XD_DEBUG_MESSAGE ("Event received: %s %u %s %s %s %s %s %s", |
| 1550 | XD_MESSAGE_TYPE_TO_STRING (mtype), | 1588 | XD_MESSAGE_TYPE_TO_STRING (mtype), |
| @@ -1572,9 +1610,11 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1572 | EVENT_INIT (event); | 1610 | EVENT_INIT (event); |
| 1573 | event.kind = DBUS_EVENT; | 1611 | event.kind = DBUS_EVENT; |
| 1574 | event.frame_or_window = Qnil; | 1612 | event.frame_or_window = Qnil; |
| 1575 | event.arg = Fcons (value, | 1613 | event.arg = |
| 1576 | (mtype == DBUS_MESSAGE_TYPE_ERROR) | 1614 | Fcons (value, |
| 1577 | ? (Fcons (build_string (error_name), args)) : args); | 1615 | (mtype == DBUS_MESSAGE_TYPE_ERROR) |
| 1616 | ? Fcons (list2 (QCstring, build_string (error_name)), args) | ||
| 1617 | : args); | ||
| 1578 | } | 1618 | } |
| 1579 | 1619 | ||
| 1580 | else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ | 1620 | else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ |
| @@ -1828,7 +1868,7 @@ wildcard then. | |||
| 1828 | 1868 | ||
| 1829 | OBJECT is either the handler to be called when a D-Bus message, which | 1869 | OBJECT is either the handler to be called when a D-Bus message, which |
| 1830 | matches the key criteria, arrives (TYPE `:method' and `:signal'), or a | 1870 | matches the key criteria, arrives (TYPE `:method' and `:signal'), or a |
| 1831 | list (ACCESS EMITS-SIGNAL SIGNATURE VALUE) for TYPE `:property'. | 1871 | list (ACCESS EMITS-SIGNAL VALUE) for TYPE `:property'. |
| 1832 | 1872 | ||
| 1833 | For entries of type `:signal', there is also a fifth element RULE, | 1873 | For entries of type `:signal', there is also a fifth element RULE, |
| 1834 | which keeps the match string the signal is registered with. | 1874 | which keeps the match string the signal is registered with. |
diff --git a/src/dispextern.h b/src/dispextern.h index 956ca96eb61..0d982f79177 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -102,7 +102,7 @@ typedef XImage *Emacs_Pix_Context; | |||
| 102 | #endif | 102 | #endif |
| 103 | 103 | ||
| 104 | #ifdef USE_CAIRO | 104 | #ifdef USE_CAIRO |
| 105 | /* Mininal version of XImage. */ | 105 | /* Minimal version of XImage. */ |
| 106 | typedef struct | 106 | typedef struct |
| 107 | { | 107 | { |
| 108 | int width, height; /* size of image */ | 108 | int width, height; /* size of image */ |
| @@ -1744,6 +1744,7 @@ struct face | |||
| 1744 | bool_bf tty_italic_p : 1; | 1744 | bool_bf tty_italic_p : 1; |
| 1745 | bool_bf tty_underline_p : 1; | 1745 | bool_bf tty_underline_p : 1; |
| 1746 | bool_bf tty_reverse_p : 1; | 1746 | bool_bf tty_reverse_p : 1; |
| 1747 | bool_bf tty_strike_through_p : 1; | ||
| 1747 | 1748 | ||
| 1748 | /* True means that colors of this face may not be freed because they | 1749 | /* True means that colors of this face may not be freed because they |
| 1749 | have been copied bitwise from a base face (see | 1750 | have been copied bitwise from a base face (see |
| @@ -3290,6 +3291,7 @@ enum tool_bar_item_image | |||
| 3290 | #define TTY_CAP_BOLD 0x04 | 3291 | #define TTY_CAP_BOLD 0x04 |
| 3291 | #define TTY_CAP_DIM 0x08 | 3292 | #define TTY_CAP_DIM 0x08 |
| 3292 | #define TTY_CAP_ITALIC 0x10 | 3293 | #define TTY_CAP_ITALIC 0x10 |
| 3294 | #define TTY_CAP_STRIKE_THROUGH 0x20 | ||
| 3293 | 3295 | ||
| 3294 | 3296 | ||
| 3295 | /*********************************************************************** | 3297 | /*********************************************************************** |
diff --git a/src/emacs-module.c b/src/emacs-module.c index a0bab118019..3581daad112 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -551,7 +551,7 @@ struct Lisp_Module_Function | |||
| 551 | union vectorlike_header header; | 551 | union vectorlike_header header; |
| 552 | 552 | ||
| 553 | /* Fields traced by GC; these must come first. */ | 553 | /* Fields traced by GC; these must come first. */ |
| 554 | Lisp_Object documentation; | 554 | Lisp_Object documentation, interactive_form; |
| 555 | 555 | ||
| 556 | /* Fields ignored by GC. */ | 556 | /* Fields ignored by GC. */ |
| 557 | ptrdiff_t min_arity, max_arity; | 557 | ptrdiff_t min_arity, max_arity; |
| @@ -564,7 +564,7 @@ static struct Lisp_Module_Function * | |||
| 564 | allocate_module_function (void) | 564 | allocate_module_function (void) |
| 565 | { | 565 | { |
| 566 | return ALLOCATE_PSEUDOVECTOR (struct Lisp_Module_Function, | 566 | return ALLOCATE_PSEUDOVECTOR (struct Lisp_Module_Function, |
| 567 | documentation, PVEC_MODULE_FUNCTION); | 567 | interactive_form, PVEC_MODULE_FUNCTION); |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | #define XSET_MODULE_FUNCTION(var, ptr) \ | 570 | #define XSET_MODULE_FUNCTION(var, ptr) \ |
| @@ -630,6 +630,24 @@ module_finalize_function (const struct Lisp_Module_Function *func) | |||
| 630 | func->finalizer (func->data); | 630 | func->finalizer (func->data); |
| 631 | } | 631 | } |
| 632 | 632 | ||
| 633 | static void | ||
| 634 | module_make_interactive (emacs_env *env, emacs_value function, emacs_value spec) | ||
| 635 | { | ||
| 636 | MODULE_FUNCTION_BEGIN (); | ||
| 637 | Lisp_Object lisp_fun = value_to_lisp (function); | ||
| 638 | CHECK_MODULE_FUNCTION (lisp_fun); | ||
| 639 | Lisp_Object lisp_spec = value_to_lisp (spec); | ||
| 640 | /* Normalize (interactive nil) to (interactive). */ | ||
| 641 | XMODULE_FUNCTION (lisp_fun)->interactive_form | ||
| 642 | = NILP (lisp_spec) ? list1 (Qinteractive) : list2 (Qinteractive, lisp_spec); | ||
| 643 | } | ||
| 644 | |||
| 645 | Lisp_Object | ||
| 646 | module_function_interactive_form (const struct Lisp_Module_Function *fun) | ||
| 647 | { | ||
| 648 | return fun->interactive_form; | ||
| 649 | } | ||
| 650 | |||
| 633 | static emacs_value | 651 | static emacs_value |
| 634 | module_funcall (emacs_env *env, emacs_value func, ptrdiff_t nargs, | 652 | module_funcall (emacs_env *env, emacs_value func, ptrdiff_t nargs, |
| 635 | emacs_value *args) | 653 | emacs_value *args) |
| @@ -1463,6 +1481,7 @@ initialize_environment (emacs_env *env, struct emacs_env_private *priv) | |||
| 1463 | env->get_function_finalizer = module_get_function_finalizer; | 1481 | env->get_function_finalizer = module_get_function_finalizer; |
| 1464 | env->set_function_finalizer = module_set_function_finalizer; | 1482 | env->set_function_finalizer = module_set_function_finalizer; |
| 1465 | env->open_channel = module_open_channel; | 1483 | env->open_channel = module_open_channel; |
| 1484 | env->make_interactive = module_make_interactive; | ||
| 1466 | Vmodule_environments = Fcons (make_mint_ptr (env), Vmodule_environments); | 1485 | Vmodule_environments = Fcons (make_mint_ptr (env), Vmodule_environments); |
| 1467 | return env; | 1486 | return env; |
| 1468 | } | 1487 | } |
diff --git a/src/eval.c b/src/eval.c index 71b7ac8f84e..9e0cec6d9e5 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2012,6 +2012,15 @@ then strings and vectors are not accepted. */) | |||
| 2012 | else if (COMPILEDP (fun)) | 2012 | else if (COMPILEDP (fun)) |
| 2013 | return (PVSIZE (fun) > COMPILED_INTERACTIVE ? Qt : if_prop); | 2013 | return (PVSIZE (fun) > COMPILED_INTERACTIVE ? Qt : if_prop); |
| 2014 | 2014 | ||
| 2015 | #ifdef HAVE_MODULES | ||
| 2016 | /* Module functions are interactive if their `interactive_form' | ||
| 2017 | field is non-nil. */ | ||
| 2018 | else if (MODULE_FUNCTIONP (fun)) | ||
| 2019 | return NILP (module_function_interactive_form (XMODULE_FUNCTION (fun))) | ||
| 2020 | ? if_prop | ||
| 2021 | : Qt; | ||
| 2022 | #endif | ||
| 2023 | |||
| 2015 | /* Strings and vectors are keyboard macros. */ | 2024 | /* Strings and vectors are keyboard macros. */ |
| 2016 | if (STRINGP (fun) || VECTORP (fun)) | 2025 | if (STRINGP (fun) || VECTORP (fun)) |
| 2017 | return (NILP (for_call_interactively) ? Qt : Qnil); | 2026 | return (NILP (for_call_interactively) ? Qt : Qnil); |
diff --git a/src/font.c b/src/font.c index 2786a772dc3..beaa7be98de 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -2810,7 +2810,13 @@ font_list_entities (struct frame *f, Lisp_Object spec) | |||
| 2810 | || ! NILP (Vface_ignored_fonts))) | 2810 | || ! NILP (Vface_ignored_fonts))) |
| 2811 | val = font_delete_unmatched (val, need_filtering ? spec : Qnil, size); | 2811 | val = font_delete_unmatched (val, need_filtering ? spec : Qnil, size); |
| 2812 | if (ASIZE (val) > 0) | 2812 | if (ASIZE (val) > 0) |
| 2813 | list = Fcons (val, list); | 2813 | { |
| 2814 | list = Fcons (val, list); | ||
| 2815 | /* Querying further backends can be very slow, so we only do | ||
| 2816 | it if the user has explicitly requested it (Bug#43177). */ | ||
| 2817 | if (query_all_font_backends == false) | ||
| 2818 | break; | ||
| 2819 | } | ||
| 2814 | } | 2820 | } |
| 2815 | 2821 | ||
| 2816 | list = Fnreverse (list); | 2822 | list = Fnreverse (list); |
| @@ -5527,6 +5533,13 @@ Non-nil means don't query fontconfig for color fonts, since they often | |||
| 5527 | cause Xft crashes. Only has an effect in Xft builds. */); | 5533 | cause Xft crashes. Only has an effect in Xft builds. */); |
| 5528 | xft_ignore_color_fonts = true; | 5534 | xft_ignore_color_fonts = true; |
| 5529 | 5535 | ||
| 5536 | DEFVAR_BOOL ("query-all-font-backends", query_all_font_backends, | ||
| 5537 | doc: /* | ||
| 5538 | If non-nil, attempt to query all available font backends. | ||
| 5539 | By default Emacs will stop searching for a matching font at the first | ||
| 5540 | match. */); | ||
| 5541 | query_all_font_backends = false; | ||
| 5542 | |||
| 5530 | #ifdef HAVE_WINDOW_SYSTEM | 5543 | #ifdef HAVE_WINDOW_SYSTEM |
| 5531 | #ifdef HAVE_FREETYPE | 5544 | #ifdef HAVE_FREETYPE |
| 5532 | syms_of_ftfont (); | 5545 | syms_of_ftfont (); |
diff --git a/src/frame.c b/src/frame.c index c4dfc35a0c5..3f934504372 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -6106,7 +6106,7 @@ when the mouse is over clickable text. */); | |||
| 6106 | Vmouse_highlight = Qt; | 6106 | Vmouse_highlight = Qt; |
| 6107 | 6107 | ||
| 6108 | DEFVAR_LISP ("make-pointer-invisible", Vmake_pointer_invisible, | 6108 | DEFVAR_LISP ("make-pointer-invisible", Vmake_pointer_invisible, |
| 6109 | doc: /* If non-nil, make pointer invisible while typing. | 6109 | doc: /* If non-nil, make mouse pointer invisible while typing. |
| 6110 | The pointer becomes visible again when the mouse is moved. */); | 6110 | The pointer becomes visible again when the mouse is moved. */); |
| 6111 | Vmake_pointer_invisible = Qt; | 6111 | Vmake_pointer_invisible = Qt; |
| 6112 | 6112 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 590d183c4c6..af075a42c76 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -103,7 +103,8 @@ static KBOARD *all_kboards; | |||
| 103 | /* True in the single-kboard state, false in the any-kboard state. */ | 103 | /* True in the single-kboard state, false in the any-kboard state. */ |
| 104 | static bool single_kboard; | 104 | static bool single_kboard; |
| 105 | 105 | ||
| 106 | #define NUM_RECENT_KEYS (300) | 106 | /* Minimum allowed size of the recent_keys vector. */ |
| 107 | #define MIN_NUM_RECENT_KEYS (100) | ||
| 107 | 108 | ||
| 108 | /* Index for storing next element into recent_keys. */ | 109 | /* Index for storing next element into recent_keys. */ |
| 109 | static int recent_keys_index; | 110 | static int recent_keys_index; |
| @@ -111,7 +112,10 @@ static int recent_keys_index; | |||
| 111 | /* Total number of elements stored into recent_keys. */ | 112 | /* Total number of elements stored into recent_keys. */ |
| 112 | static int total_keys; | 113 | static int total_keys; |
| 113 | 114 | ||
| 114 | /* This vector holds the last NUM_RECENT_KEYS keystrokes. */ | 115 | /* Size of the recent_keys vector. */ |
| 116 | static int lossage_limit = 3 * MIN_NUM_RECENT_KEYS; | ||
| 117 | |||
| 118 | /* This vector holds the last lossage_limit keystrokes. */ | ||
| 115 | static Lisp_Object recent_keys; | 119 | static Lisp_Object recent_keys; |
| 116 | 120 | ||
| 117 | /* Vector holding the key sequence that invoked the current command. | 121 | /* Vector holding the key sequence that invoked the current command. |
| @@ -1421,10 +1425,10 @@ command_loop_1 (void) | |||
| 1421 | /* Execute the command. */ | 1425 | /* Execute the command. */ |
| 1422 | 1426 | ||
| 1423 | { | 1427 | { |
| 1424 | total_keys += total_keys < NUM_RECENT_KEYS; | 1428 | total_keys += total_keys < lossage_limit; |
| 1425 | ASET (recent_keys, recent_keys_index, | 1429 | ASET (recent_keys, recent_keys_index, |
| 1426 | Fcons (Qnil, cmd)); | 1430 | Fcons (Qnil, cmd)); |
| 1427 | if (++recent_keys_index >= NUM_RECENT_KEYS) | 1431 | if (++recent_keys_index >= lossage_limit) |
| 1428 | recent_keys_index = 0; | 1432 | recent_keys_index = 0; |
| 1429 | } | 1433 | } |
| 1430 | Vthis_command = cmd; | 1434 | Vthis_command = cmd; |
| @@ -3248,15 +3252,15 @@ record_char (Lisp_Object c) | |||
| 3248 | int ix1, ix2, ix3; | 3252 | int ix1, ix2, ix3; |
| 3249 | 3253 | ||
| 3250 | if ((ix1 = recent_keys_index - 1) < 0) | 3254 | if ((ix1 = recent_keys_index - 1) < 0) |
| 3251 | ix1 = NUM_RECENT_KEYS - 1; | 3255 | ix1 = lossage_limit - 1; |
| 3252 | ev1 = AREF (recent_keys, ix1); | 3256 | ev1 = AREF (recent_keys, ix1); |
| 3253 | 3257 | ||
| 3254 | if ((ix2 = ix1 - 1) < 0) | 3258 | if ((ix2 = ix1 - 1) < 0) |
| 3255 | ix2 = NUM_RECENT_KEYS - 1; | 3259 | ix2 = lossage_limit - 1; |
| 3256 | ev2 = AREF (recent_keys, ix2); | 3260 | ev2 = AREF (recent_keys, ix2); |
| 3257 | 3261 | ||
| 3258 | if ((ix3 = ix2 - 1) < 0) | 3262 | if ((ix3 = ix2 - 1) < 0) |
| 3259 | ix3 = NUM_RECENT_KEYS - 1; | 3263 | ix3 = lossage_limit - 1; |
| 3260 | ev3 = AREF (recent_keys, ix3); | 3264 | ev3 = AREF (recent_keys, ix3); |
| 3261 | 3265 | ||
| 3262 | if (EQ (XCAR (c), Qhelp_echo)) | 3266 | if (EQ (XCAR (c), Qhelp_echo)) |
| @@ -3307,12 +3311,12 @@ record_char (Lisp_Object c) | |||
| 3307 | { | 3311 | { |
| 3308 | if (!recorded) | 3312 | if (!recorded) |
| 3309 | { | 3313 | { |
| 3310 | total_keys += total_keys < NUM_RECENT_KEYS; | 3314 | total_keys += total_keys < lossage_limit; |
| 3311 | ASET (recent_keys, recent_keys_index, | 3315 | ASET (recent_keys, recent_keys_index, |
| 3312 | /* Copy the event, in case it gets modified by side-effect | 3316 | /* Copy the event, in case it gets modified by side-effect |
| 3313 | by some remapping function (bug#30955). */ | 3317 | by some remapping function (bug#30955). */ |
| 3314 | CONSP (c) ? Fcopy_sequence (c) : c); | 3318 | CONSP (c) ? Fcopy_sequence (c) : c); |
| 3315 | if (++recent_keys_index >= NUM_RECENT_KEYS) | 3319 | if (++recent_keys_index >= lossage_limit) |
| 3316 | recent_keys_index = 0; | 3320 | recent_keys_index = 0; |
| 3317 | } | 3321 | } |
| 3318 | else if (recorded < 0) | 3322 | else if (recorded < 0) |
| @@ -3326,10 +3330,10 @@ record_char (Lisp_Object c) | |||
| 3326 | 3330 | ||
| 3327 | while (recorded++ < 0 && total_keys > 0) | 3331 | while (recorded++ < 0 && total_keys > 0) |
| 3328 | { | 3332 | { |
| 3329 | if (total_keys < NUM_RECENT_KEYS) | 3333 | if (total_keys < lossage_limit) |
| 3330 | total_keys--; | 3334 | total_keys--; |
| 3331 | if (--recent_keys_index < 0) | 3335 | if (--recent_keys_index < 0) |
| 3332 | recent_keys_index = NUM_RECENT_KEYS - 1; | 3336 | recent_keys_index = lossage_limit - 1; |
| 3333 | ASET (recent_keys, recent_keys_index, Qnil); | 3337 | ASET (recent_keys, recent_keys_index, Qnil); |
| 3334 | } | 3338 | } |
| 3335 | } | 3339 | } |
| @@ -5692,7 +5696,7 @@ make_lispy_event (struct input_event *event) | |||
| 5692 | ignore_mouse_drag_p = false; | 5696 | ignore_mouse_drag_p = false; |
| 5693 | } | 5697 | } |
| 5694 | 5698 | ||
| 5695 | /* Now we're releasing a button - check the co-ordinates to | 5699 | /* Now we're releasing a button - check the coordinates to |
| 5696 | see if this was a click or a drag. */ | 5700 | see if this was a click or a drag. */ |
| 5697 | else if (event->modifiers & up_modifier) | 5701 | else if (event->modifiers & up_modifier) |
| 5698 | { | 5702 | { |
| @@ -6640,7 +6644,7 @@ has the same base event type and all the specified modifiers. */) | |||
| 6640 | DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in, | 6644 | DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in, |
| 6641 | Sinternal_handle_focus_in, 1, 1, 0, | 6645 | Sinternal_handle_focus_in, 1, 1, 0, |
| 6642 | doc: /* Internally handle focus-in events. | 6646 | doc: /* Internally handle focus-in events. |
| 6643 | This function potentially generates an artifical switch-frame event. */) | 6647 | This function potentially generates an artificial switch-frame event. */) |
| 6644 | (Lisp_Object event) | 6648 | (Lisp_Object event) |
| 6645 | { | 6649 | { |
| 6646 | Lisp_Object frame; | 6650 | Lisp_Object frame; |
| @@ -10410,6 +10414,64 @@ If CHECK-TIMERS is non-nil, timers that are ready to run will do so. */) | |||
| 10410 | ? Qt : Qnil); | 10414 | ? Qt : Qnil); |
| 10411 | } | 10415 | } |
| 10412 | 10416 | ||
| 10417 | /* Reallocate recent_keys copying the recorded keystrokes | ||
| 10418 | in the right order. */ | ||
| 10419 | static void | ||
| 10420 | update_recent_keys (int new_size, int kept_keys) | ||
| 10421 | { | ||
| 10422 | int osize = ASIZE (recent_keys); | ||
| 10423 | eassert (recent_keys_index < osize); | ||
| 10424 | eassert (kept_keys <= min (osize, new_size)); | ||
| 10425 | Lisp_Object v = make_nil_vector (new_size); | ||
| 10426 | int i, idx; | ||
| 10427 | for (i = 0; i < kept_keys; ++i) | ||
| 10428 | { | ||
| 10429 | idx = recent_keys_index - kept_keys + i; | ||
| 10430 | while (idx < 0) | ||
| 10431 | idx += osize; | ||
| 10432 | ASET (v, i, AREF (recent_keys, idx)); | ||
| 10433 | } | ||
| 10434 | recent_keys = v; | ||
| 10435 | total_keys = kept_keys; | ||
| 10436 | recent_keys_index = total_keys % new_size; | ||
| 10437 | lossage_limit = new_size; | ||
| 10438 | |||
| 10439 | } | ||
| 10440 | |||
| 10441 | DEFUN ("lossage-size", Flossage_size, Slossage_size, 0, 1, | ||
| 10442 | "(list (read-number \"new-size: \" (lossage-size)))", | ||
| 10443 | doc: /* Return or set the maximum number of keystrokes to save. | ||
| 10444 | If called with a non-nil ARG, set the limit to ARG and return it. | ||
| 10445 | Otherwise, return the current limit. | ||
| 10446 | |||
| 10447 | The saved keystrokes are shown by `view-lossage'. */) | ||
| 10448 | (Lisp_Object arg) | ||
| 10449 | { | ||
| 10450 | if (NILP(arg)) | ||
| 10451 | return make_fixnum (lossage_limit); | ||
| 10452 | |||
| 10453 | if (!FIXNATP (arg)) | ||
| 10454 | user_error ("Value must be a positive integer"); | ||
| 10455 | int osize = ASIZE (recent_keys); | ||
| 10456 | eassert (lossage_limit == osize); | ||
| 10457 | int min_size = MIN_NUM_RECENT_KEYS; | ||
| 10458 | int new_size = XFIXNAT (arg); | ||
| 10459 | |||
| 10460 | if (new_size == osize) | ||
| 10461 | return make_fixnum (lossage_limit); | ||
| 10462 | |||
| 10463 | if (new_size < min_size) | ||
| 10464 | { | ||
| 10465 | AUTO_STRING (fmt, "Value must be >= %d"); | ||
| 10466 | Fsignal (Quser_error, list1 (CALLN (Fformat, fmt, make_fixnum (min_size)))); | ||
| 10467 | } | ||
| 10468 | |||
| 10469 | int kept_keys = new_size > osize ? total_keys : min (new_size, total_keys); | ||
| 10470 | update_recent_keys (new_size, kept_keys); | ||
| 10471 | |||
| 10472 | return make_fixnum (lossage_limit); | ||
| 10473 | } | ||
| 10474 | |||
| 10413 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 1, 0, | 10475 | DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 1, 0, |
| 10414 | doc: /* Return vector of last few events, not counting those from keyboard macros. | 10476 | doc: /* Return vector of last few events, not counting those from keyboard macros. |
| 10415 | If INCLUDE-CMDS is non-nil, include the commands that were run, | 10477 | If INCLUDE-CMDS is non-nil, include the commands that were run, |
| @@ -10419,21 +10481,21 @@ represented as pseudo-events of the form (nil . COMMAND). */) | |||
| 10419 | bool cmds = !NILP (include_cmds); | 10481 | bool cmds = !NILP (include_cmds); |
| 10420 | 10482 | ||
| 10421 | if (!total_keys | 10483 | if (!total_keys |
| 10422 | || (cmds && total_keys < NUM_RECENT_KEYS)) | 10484 | || (cmds && total_keys < lossage_limit)) |
| 10423 | return Fvector (total_keys, | 10485 | return Fvector (total_keys, |
| 10424 | XVECTOR (recent_keys)->contents); | 10486 | XVECTOR (recent_keys)->contents); |
| 10425 | else | 10487 | else |
| 10426 | { | 10488 | { |
| 10427 | Lisp_Object es = Qnil; | 10489 | Lisp_Object es = Qnil; |
| 10428 | int i = (total_keys < NUM_RECENT_KEYS | 10490 | int i = (total_keys < lossage_limit |
| 10429 | ? 0 : recent_keys_index); | 10491 | ? 0 : recent_keys_index); |
| 10430 | eassert (recent_keys_index < NUM_RECENT_KEYS); | 10492 | eassert (recent_keys_index < lossage_limit); |
| 10431 | do | 10493 | do |
| 10432 | { | 10494 | { |
| 10433 | Lisp_Object e = AREF (recent_keys, i); | 10495 | Lisp_Object e = AREF (recent_keys, i); |
| 10434 | if (cmds || !CONSP (e) || !NILP (XCAR (e))) | 10496 | if (cmds || !CONSP (e) || !NILP (XCAR (e))) |
| 10435 | es = Fcons (e, es); | 10497 | es = Fcons (e, es); |
| 10436 | if (++i >= NUM_RECENT_KEYS) | 10498 | if (++i >= lossage_limit) |
| 10437 | i = 0; | 10499 | i = 0; |
| 10438 | } while (i != recent_keys_index); | 10500 | } while (i != recent_keys_index); |
| 10439 | es = Fnreverse (es); | 10501 | es = Fnreverse (es); |
| @@ -11686,7 +11748,7 @@ syms_of_keyboard (void) | |||
| 11686 | staticpro (&modifier_symbols); | 11748 | staticpro (&modifier_symbols); |
| 11687 | } | 11749 | } |
| 11688 | 11750 | ||
| 11689 | recent_keys = make_nil_vector (NUM_RECENT_KEYS); | 11751 | recent_keys = make_nil_vector (lossage_limit); |
| 11690 | staticpro (&recent_keys); | 11752 | staticpro (&recent_keys); |
| 11691 | 11753 | ||
| 11692 | this_command_keys = make_nil_vector (40); | 11754 | this_command_keys = make_nil_vector (40); |
| @@ -11736,6 +11798,7 @@ syms_of_keyboard (void) | |||
| 11736 | defsubr (&Srecursive_edit); | 11798 | defsubr (&Srecursive_edit); |
| 11737 | defsubr (&Sinternal_track_mouse); | 11799 | defsubr (&Sinternal_track_mouse); |
| 11738 | defsubr (&Sinput_pending_p); | 11800 | defsubr (&Sinput_pending_p); |
| 11801 | defsubr (&Slossage_size); | ||
| 11739 | defsubr (&Srecent_keys); | 11802 | defsubr (&Srecent_keys); |
| 11740 | defsubr (&Sthis_command_keys); | 11803 | defsubr (&Sthis_command_keys); |
| 11741 | defsubr (&Sthis_command_keys_vector); | 11804 | defsubr (&Sthis_command_keys_vector); |
diff --git a/src/lisp.h b/src/lisp.h index bb686845f05..cbc6a666471 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -4224,6 +4224,8 @@ extern Lisp_Object funcall_module (Lisp_Object, ptrdiff_t, Lisp_Object *); | |||
| 4224 | extern Lisp_Object module_function_arity (const struct Lisp_Module_Function *); | 4224 | extern Lisp_Object module_function_arity (const struct Lisp_Module_Function *); |
| 4225 | extern Lisp_Object module_function_documentation | 4225 | extern Lisp_Object module_function_documentation |
| 4226 | (struct Lisp_Module_Function const *); | 4226 | (struct Lisp_Module_Function const *); |
| 4227 | extern Lisp_Object module_function_interactive_form | ||
| 4228 | (const struct Lisp_Module_Function *); | ||
| 4227 | extern module_funcptr module_function_address | 4229 | extern module_funcptr module_function_address |
| 4228 | (struct Lisp_Module_Function const *); | 4230 | (struct Lisp_Module_Function const *); |
| 4229 | extern void *module_function_data (const struct Lisp_Module_Function *); | 4231 | extern void *module_function_data (const struct Lisp_Module_Function *); |
diff --git a/src/lread.c b/src/lread.c index 3c226e0b50c..d32f5755e98 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4221,6 +4221,9 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index) | |||
| 4221 | { | 4221 | { |
| 4222 | make_symbol_constant (sym); | 4222 | make_symbol_constant (sym); |
| 4223 | XSYMBOL (sym)->u.s.redirect = SYMBOL_PLAINVAL; | 4223 | XSYMBOL (sym)->u.s.redirect = SYMBOL_PLAINVAL; |
| 4224 | /* Mark keywords as special. This makes (let ((:key 'foo)) ...) | ||
| 4225 | in lexically bound elisp signal an error, as documented. */ | ||
| 4226 | XSYMBOL (sym)->u.s.declared_special = true; | ||
| 4224 | SET_SYMBOL_VAL (XSYMBOL (sym), sym); | 4227 | SET_SYMBOL_VAL (XSYMBOL (sym), sym); |
| 4225 | } | 4228 | } |
| 4226 | 4229 | ||
diff --git a/src/module-env-28.h b/src/module-env-28.h index 5d884c148c4..40b03b92b52 100644 --- a/src/module-env-28.h +++ b/src/module-env-28.h | |||
| @@ -12,3 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | int (*open_channel) (emacs_env *env, emacs_value pipe_process) | 13 | int (*open_channel) (emacs_env *env, emacs_value pipe_process) |
| 14 | EMACS_ATTRIBUTE_NONNULL (1); | 14 | EMACS_ATTRIBUTE_NONNULL (1); |
| 15 | |||
| 16 | void (*make_interactive) (emacs_env *env, emacs_value function, | ||
| 17 | emacs_value spec) | ||
| 18 | EMACS_ATTRIBUTE_NONNULL (1); | ||
diff --git a/src/nsterm.m b/src/nsterm.m index 26059ab67cd..5e5d09f058b 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -6449,7 +6449,7 @@ not_in_argv (NSString *arg) | |||
| 6449 | if (nsEvArray == nil) | 6449 | if (nsEvArray == nil) |
| 6450 | nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1]; | 6450 | nsEvArray = [[NSMutableArray alloc] initWithCapacity: 1]; |
| 6451 | 6451 | ||
| 6452 | [NSCursor setHiddenUntilMouseMoves: YES]; | 6452 | [NSCursor setHiddenUntilMouseMoves:! NILP (Vmake_pointer_invisible)]; |
| 6453 | 6453 | ||
| 6454 | if (hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)) | 6454 | if (hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)) |
| 6455 | { | 6455 | { |
| @@ -8610,7 +8610,7 @@ not_in_argv (NSString *arg) | |||
| 8610 | while ( (file = [fenum nextObject]) ) | 8610 | while ( (file = [fenum nextObject]) ) |
| 8611 | strings = Fcons ([file lispString], strings); | 8611 | strings = Fcons ([file lispString], strings); |
| 8612 | } | 8612 | } |
| 8613 | else if ([type isEqualToString: NSURLPboardType]) | 8613 | else if ([type isEqualToString: NSPasteboardTypeURL]) |
| 8614 | { | 8614 | { |
| 8615 | NSURL *url = [NSURL URLFromPasteboard: pb]; | 8615 | NSURL *url = [NSURL URLFromPasteboard: pb]; |
| 8616 | if (url == nil) return NO; | 8616 | if (url == nil) return NO; |
| @@ -8619,8 +8619,8 @@ not_in_argv (NSString *arg) | |||
| 8619 | 8619 | ||
| 8620 | strings = list1 ([[url absoluteString] lispString]); | 8620 | strings = list1 ([[url absoluteString] lispString]); |
| 8621 | } | 8621 | } |
| 8622 | else if ([type isEqualToString: NSStringPboardType] | 8622 | else if ([type isEqualToString: NSPasteboardTypeString] |
| 8623 | || [type isEqualToString: NSTabularTextPboardType]) | 8623 | || [type isEqualToString: NSPasteboardTypeTabularText]) |
| 8624 | { | 8624 | { |
| 8625 | NSString *data; | 8625 | NSString *data; |
| 8626 | 8626 | ||
diff --git a/src/nsxwidget.m b/src/nsxwidget.m index e81ca7fc0cb..3c6402c03ff 100644 --- a/src/nsxwidget.m +++ b/src/nsxwidget.m | |||
| @@ -33,14 +33,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 33 | /* Thoughts on NS Cocoa xwidget and webkit2: | 33 | /* Thoughts on NS Cocoa xwidget and webkit2: |
| 34 | 34 | ||
| 35 | Webkit2 process architecture seems to be very hostile for offscreen | 35 | Webkit2 process architecture seems to be very hostile for offscreen |
| 36 | rendering techniques, which is used by GTK xwiget implementation; | 36 | rendering techniques, which is used by GTK xwidget implementation; |
| 37 | Specifically NSView level view sharing / copying is not working. | 37 | Specifically NSView level view sharing / copying is not working. |
| 38 | 38 | ||
| 39 | *** So only one view can be associcated with a model. *** | 39 | *** So only one view can be associated with a model. *** |
| 40 | 40 | ||
| 41 | With this decision, implementation is plain and can expect best out | 41 | With this decision, implementation is plain and can expect best out |
| 42 | of webkit2's rationale. But process and session structures will | 42 | of webkit2's rationale. But process and session structures will |
| 43 | diverge from GTK xwiget. Though, cosmetically similar usages can | 43 | diverge from GTK xwidget. Though, cosmetically similar usages can |
| 44 | be presented and will be preferred, if agreeable. | 44 | be presented and will be preferred, if agreeable. |
| 45 | 45 | ||
| 46 | For other widget types, OSR seems possible, but will not care for a | 46 | For other widget types, OSR seems possible, but will not care for a |
diff --git a/src/pdumper.c b/src/pdumper.c index da5e7a17363..0a7e0388f1d 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -1834,7 +1834,7 @@ dump_field_lv_or_rawptr (struct dump_context *ctx, | |||
| 1834 | 1834 | ||
| 1835 | /* Now value is the Lisp_Object to which we want to point whether or | 1835 | /* Now value is the Lisp_Object to which we want to point whether or |
| 1836 | not the field is a raw pointer (in which case we just synthesized | 1836 | not the field is a raw pointer (in which case we just synthesized |
| 1837 | the Lisp_Object outselves) or a Lisp_Object (in which case we | 1837 | the Lisp_Object ourselves) or a Lisp_Object (in which case we |
| 1838 | just copied the thing). Add a fixup or relocation. */ | 1838 | just copied the thing). Add a fixup or relocation. */ |
| 1839 | 1839 | ||
| 1840 | intptr_t out_value; | 1840 | intptr_t out_value; |
| @@ -1925,7 +1925,7 @@ dump_field_fixup_later (struct dump_context *ctx, | |||
| 1925 | (void) field_relpos (in_start, in_field); | 1925 | (void) field_relpos (in_start, in_field); |
| 1926 | } | 1926 | } |
| 1927 | 1927 | ||
| 1928 | /* Mark an output object field, which is as wide as a poiner, as being | 1928 | /* Mark an output object field, which is as wide as a pointer, as being |
| 1929 | fixed up to point to a specific offset in the dump. */ | 1929 | fixed up to point to a specific offset in the dump. */ |
| 1930 | static void | 1930 | static void |
| 1931 | dump_field_ptr_to_dump_offset (struct dump_context *ctx, | 1931 | dump_field_ptr_to_dump_offset (struct dump_context *ctx, |
diff --git a/src/print.c b/src/print.c index c5f4bbeef80..1b083f71e08 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1590,27 +1590,34 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, | |||
| 1590 | 1590 | ||
| 1591 | /* Print the data here as a plist. */ | 1591 | /* Print the data here as a plist. */ |
| 1592 | ptrdiff_t real_size = HASH_TABLE_SIZE (h); | 1592 | ptrdiff_t real_size = HASH_TABLE_SIZE (h); |
| 1593 | ptrdiff_t size = real_size; | 1593 | ptrdiff_t size = h->count; |
| 1594 | 1594 | ||
| 1595 | /* Don't print more elements than the specified maximum. */ | 1595 | /* Don't print more elements than the specified maximum. */ |
| 1596 | if (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size) | 1596 | if (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size) |
| 1597 | size = XFIXNAT (Vprint_length); | 1597 | size = XFIXNAT (Vprint_length); |
| 1598 | 1598 | ||
| 1599 | printchar ('(', printcharfun); | 1599 | printchar ('(', printcharfun); |
| 1600 | for (ptrdiff_t i = 0; i < size; i++) | 1600 | ptrdiff_t j = 0; |
| 1601 | for (ptrdiff_t i = 0; i < real_size; i++) | ||
| 1601 | { | 1602 | { |
| 1602 | Lisp_Object key = HASH_KEY (h, i); | 1603 | Lisp_Object key = HASH_KEY (h, i); |
| 1603 | if (!EQ (key, Qunbound)) | 1604 | if (!EQ (key, Qunbound)) |
| 1604 | { | 1605 | { |
| 1605 | if (i) printchar (' ', printcharfun); | 1606 | if (j++) printchar (' ', printcharfun); |
| 1606 | print_object (key, printcharfun, escapeflag); | 1607 | print_object (key, printcharfun, escapeflag); |
| 1607 | printchar (' ', printcharfun); | 1608 | printchar (' ', printcharfun); |
| 1608 | print_object (HASH_VALUE (h, i), printcharfun, escapeflag); | 1609 | print_object (HASH_VALUE (h, i), printcharfun, escapeflag); |
| 1610 | if (j == size) | ||
| 1611 | break; | ||
| 1609 | } | 1612 | } |
| 1610 | } | 1613 | } |
| 1611 | 1614 | ||
| 1612 | if (size < real_size) | 1615 | if (j < h->count) |
| 1613 | print_c_string (" ...", printcharfun); | 1616 | { |
| 1617 | if (j) | ||
| 1618 | printchar (' ', printcharfun); | ||
| 1619 | print_c_string ("...", printcharfun); | ||
| 1620 | } | ||
| 1614 | 1621 | ||
| 1615 | print_c_string ("))", printcharfun); | 1622 | print_c_string ("))", printcharfun); |
| 1616 | } | 1623 | } |
diff --git a/src/process.c b/src/process.c index 3aa105ae342..53f4a1d8530 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5413,14 +5413,16 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5413 | /* If data can be read from the process, do so until exhausted. */ | 5413 | /* If data can be read from the process, do so until exhausted. */ |
| 5414 | if (wait_proc->infd >= 0) | 5414 | if (wait_proc->infd >= 0) |
| 5415 | { | 5415 | { |
| 5416 | unsigned int count = 0; | ||
| 5416 | XSETPROCESS (proc, wait_proc); | 5417 | XSETPROCESS (proc, wait_proc); |
| 5417 | 5418 | ||
| 5418 | while (true) | 5419 | while (true) |
| 5419 | { | 5420 | { |
| 5420 | int nread = read_process_output (proc, wait_proc->infd); | 5421 | int nread = read_process_output (proc, wait_proc->infd); |
| 5422 | rarely_quit (++count); | ||
| 5421 | if (nread < 0) | 5423 | if (nread < 0) |
| 5422 | { | 5424 | { |
| 5423 | if (errno == EIO || would_block (errno)) | 5425 | if (errno != EINTR) |
| 5424 | break; | 5426 | break; |
| 5425 | } | 5427 | } |
| 5426 | else | 5428 | else |
diff --git a/src/syntax.c b/src/syntax.c index 7f0fc341f6e..e6af8a377bb 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -2542,20 +2542,23 @@ between them, return t; otherwise return nil. */) | |||
| 2542 | bool fence_found = 0; | 2542 | bool fence_found = 0; |
| 2543 | ptrdiff_t ini = from, ini_byte = from_byte; | 2543 | ptrdiff_t ini = from, ini_byte = from_byte; |
| 2544 | 2544 | ||
| 2545 | while (1) | 2545 | if (from > stop) |
| 2546 | { | 2546 | { |
| 2547 | dec_both (&from, &from_byte); | 2547 | while (1) |
| 2548 | UPDATE_SYNTAX_TABLE_BACKWARD (from); | ||
| 2549 | c = FETCH_CHAR_AS_MULTIBYTE (from_byte); | ||
| 2550 | if (SYNTAX (c) == Scomment_fence | ||
| 2551 | && !char_quoted (from, from_byte)) | ||
| 2552 | { | 2548 | { |
| 2553 | fence_found = 1; | 2549 | dec_both (&from, &from_byte); |
| 2554 | break; | 2550 | UPDATE_SYNTAX_TABLE_BACKWARD (from); |
| 2551 | c = FETCH_CHAR_AS_MULTIBYTE (from_byte); | ||
| 2552 | if (SYNTAX (c) == Scomment_fence | ||
| 2553 | && !char_quoted (from, from_byte)) | ||
| 2554 | { | ||
| 2555 | fence_found = 1; | ||
| 2556 | break; | ||
| 2557 | } | ||
| 2558 | else if (from == stop) | ||
| 2559 | break; | ||
| 2560 | rarely_quit (++quit_count); | ||
| 2555 | } | 2561 | } |
| 2556 | else if (from == stop) | ||
| 2557 | break; | ||
| 2558 | rarely_quit (++quit_count); | ||
| 2559 | } | 2562 | } |
| 2560 | if (fence_found == 0) | 2563 | if (fence_found == 0) |
| 2561 | { | 2564 | { |
diff --git a/src/term.c b/src/term.c index 5cbb092ad17..36776448451 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -105,14 +105,14 @@ struct tty_display_info *tty_list; | |||
| 105 | 105 | ||
| 106 | enum no_color_bit | 106 | enum no_color_bit |
| 107 | { | 107 | { |
| 108 | NC_STANDOUT = 1 << 0, | 108 | NC_STANDOUT = 1 << 0, |
| 109 | NC_UNDERLINE = 1 << 1, | 109 | NC_UNDERLINE = 1 << 1, |
| 110 | NC_REVERSE = 1 << 2, | 110 | NC_REVERSE = 1 << 2, |
| 111 | NC_ITALIC = 1 << 3, | 111 | NC_ITALIC = 1 << 3, |
| 112 | NC_DIM = 1 << 4, | 112 | NC_DIM = 1 << 4, |
| 113 | NC_BOLD = 1 << 5, | 113 | NC_BOLD = 1 << 5, |
| 114 | NC_INVIS = 1 << 6, | 114 | NC_STRIKE_THROUGH = 1 << 6, |
| 115 | NC_PROTECT = 1 << 7 | 115 | NC_PROTECT = 1 << 7 |
| 116 | }; | 116 | }; |
| 117 | 117 | ||
| 118 | /* internal state */ | 118 | /* internal state */ |
| @@ -1931,6 +1931,10 @@ turn_on_face (struct frame *f, int face_id) | |||
| 1931 | if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE)) | 1931 | if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE)) |
| 1932 | OUTPUT1_IF (tty, tty->TS_enter_underline_mode); | 1932 | OUTPUT1_IF (tty, tty->TS_enter_underline_mode); |
| 1933 | 1933 | ||
| 1934 | if (face->tty_strike_through_p | ||
| 1935 | && MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH)) | ||
| 1936 | OUTPUT1_IF (tty, tty->TS_enter_strike_through_mode); | ||
| 1937 | |||
| 1934 | if (tty->TN_max_colors > 0) | 1938 | if (tty->TN_max_colors > 0) |
| 1935 | { | 1939 | { |
| 1936 | const char *ts; | 1940 | const char *ts; |
| @@ -1971,7 +1975,8 @@ turn_off_face (struct frame *f, int face_id) | |||
| 1971 | if (face->tty_bold_p | 1975 | if (face->tty_bold_p |
| 1972 | || face->tty_italic_p | 1976 | || face->tty_italic_p |
| 1973 | || face->tty_reverse_p | 1977 | || face->tty_reverse_p |
| 1974 | || face->tty_underline_p) | 1978 | || face->tty_underline_p |
| 1979 | || face->tty_strike_through_p) | ||
| 1975 | { | 1980 | { |
| 1976 | OUTPUT1_IF (tty, tty->TS_exit_attribute_mode); | 1981 | OUTPUT1_IF (tty, tty->TS_exit_attribute_mode); |
| 1977 | if (strcmp (tty->TS_exit_attribute_mode, tty->TS_end_standout_mode) == 0) | 1982 | if (strcmp (tty->TS_exit_attribute_mode, tty->TS_end_standout_mode) == 0) |
| @@ -2006,11 +2011,20 @@ tty_capable_p (struct tty_display_info *tty, unsigned int caps) | |||
| 2006 | if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ | 2011 | if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ |
| 2007 | return 0; | 2012 | return 0; |
| 2008 | 2013 | ||
| 2009 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE); | 2014 | TTY_CAPABLE_P_TRY (tty, |
| 2010 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, NC_UNDERLINE); | 2015 | TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE); |
| 2011 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD); | 2016 | TTY_CAPABLE_P_TRY (tty, |
| 2012 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM); | 2017 | TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, |
| 2013 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC); | 2018 | NC_UNDERLINE); |
| 2019 | TTY_CAPABLE_P_TRY (tty, | ||
| 2020 | TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD); | ||
| 2021 | TTY_CAPABLE_P_TRY (tty, | ||
| 2022 | TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM); | ||
| 2023 | TTY_CAPABLE_P_TRY (tty, | ||
| 2024 | TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC); | ||
| 2025 | TTY_CAPABLE_P_TRY (tty, | ||
| 2026 | TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode, | ||
| 2027 | NC_STRIKE_THROUGH); | ||
| 2014 | 2028 | ||
| 2015 | /* We can do it! */ | 2029 | /* We can do it! */ |
| 2016 | return 1; | 2030 | return 1; |
| @@ -2402,7 +2416,7 @@ tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row, | |||
| 2402 | pos_y = row->y + WINDOW_TOP_EDGE_Y (w); | 2416 | pos_y = row->y + WINDOW_TOP_EDGE_Y (w); |
| 2403 | pos_x = row->used[LEFT_MARGIN_AREA] + start_hpos + WINDOW_LEFT_EDGE_X (w); | 2417 | pos_x = row->used[LEFT_MARGIN_AREA] + start_hpos + WINDOW_LEFT_EDGE_X (w); |
| 2404 | 2418 | ||
| 2405 | /* Save current cursor co-ordinates. */ | 2419 | /* Save current cursor coordinates. */ |
| 2406 | save_y = curY (tty); | 2420 | save_y = curY (tty); |
| 2407 | save_x = curX (tty); | 2421 | save_x = curX (tty); |
| 2408 | cursor_to (f, pos_y, pos_x); | 2422 | cursor_to (f, pos_y, pos_x); |
| @@ -4124,6 +4138,7 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ | |||
| 4124 | tty->TS_enter_alt_charset_mode = tgetstr ("as", address); | 4138 | tty->TS_enter_alt_charset_mode = tgetstr ("as", address); |
| 4125 | tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); | 4139 | tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); |
| 4126 | tty->TS_exit_attribute_mode = tgetstr ("me", address); | 4140 | tty->TS_exit_attribute_mode = tgetstr ("me", address); |
| 4141 | tty->TS_enter_strike_through_mode = tgetstr ("smxx", address); | ||
| 4127 | 4142 | ||
| 4128 | MultiUp (tty) = tgetstr ("UP", address); | 4143 | MultiUp (tty) = tgetstr ("UP", address); |
| 4129 | MultiDown (tty) = tgetstr ("DO", address); | 4144 | MultiDown (tty) = tgetstr ("DO", address); |
diff --git a/src/termchar.h b/src/termchar.h index c96b81913b0..c967e7d04f4 100644 --- a/src/termchar.h +++ b/src/termchar.h | |||
| @@ -136,6 +136,8 @@ struct tty_display_info | |||
| 136 | const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ | 136 | const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ |
| 137 | const char *TS_exit_underline_mode; /* "us" -- start underlining. */ | 137 | const char *TS_exit_underline_mode; /* "us" -- start underlining. */ |
| 138 | const char *TS_enter_underline_mode; /* "ue" -- end underlining. */ | 138 | const char *TS_enter_underline_mode; /* "ue" -- end underlining. */ |
| 139 | const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through | ||
| 140 | mode. */ | ||
| 139 | 141 | ||
| 140 | /* "as"/"ae" -- start/end alternate character set. Not really | 142 | /* "as"/"ae" -- start/end alternate character set. Not really |
| 141 | supported, yet. */ | 143 | supported, yet. */ |
diff --git a/src/terminfo.c b/src/terminfo.c index 51fd32e9e01..0765996401f 100644 --- a/src/terminfo.c +++ b/src/terminfo.c | |||
| @@ -23,9 +23,12 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 23 | 23 | ||
| 24 | /* Define these variables that serve as global parameters to termcap, | 24 | /* Define these variables that serve as global parameters to termcap, |
| 25 | so that we do not need to conditionalize the places in Emacs | 25 | so that we do not need to conditionalize the places in Emacs |
| 26 | that set them. */ | 26 | that set them. But don't do that for terminfo, as that could |
| 27 | cause link errors when using -fno-common. */ | ||
| 27 | 28 | ||
| 29 | #if !TERMINFO | ||
| 28 | char *UP, *BC, PC; | 30 | char *UP, *BC, PC; |
| 31 | #endif | ||
| 29 | 32 | ||
| 30 | /* Interface to curses/terminfo library. | 33 | /* Interface to curses/terminfo library. |
| 31 | Turns out that all of the terminfo-level routines look | 34 | Turns out that all of the terminfo-level routines look |
diff --git a/src/w32fns.c b/src/w32fns.c index ab864332e78..3134f678f39 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -3640,7 +3640,7 @@ get_wm_chars (HWND aWnd, int *buf, int buflen, int ignore_ctrl, int ctrl, | |||
| 3640 | non-Emacs window with the same language environment, and using (dead)keys | 3640 | non-Emacs window with the same language environment, and using (dead)keys |
| 3641 | there would change the value stored in the kernel, but not this value. */ | 3641 | there would change the value stored in the kernel, but not this value. */ |
| 3642 | /* A layout may emit deadkey=0. It looks like this would reset the state | 3642 | /* A layout may emit deadkey=0. It looks like this would reset the state |
| 3643 | of the kernel's finite automaton (equivalent to emiting 0-length string, | 3643 | of the kernel's finite automaton (equivalent to emitting 0-length string, |
| 3644 | which is otherwise impossible in the dead-key map of a layout). | 3644 | which is otherwise impossible in the dead-key map of a layout). |
| 3645 | Be ready to treat the case when this delivers WM_(SYS)DEADCHAR. */ | 3645 | Be ready to treat the case when this delivers WM_(SYS)DEADCHAR. */ |
| 3646 | static int after_deadkey = -1; | 3646 | static int after_deadkey = -1; |
| @@ -3701,7 +3701,7 @@ deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam, | |||
| 3701 | of w32_get_key_modifiers (). */ | 3701 | of w32_get_key_modifiers (). */ |
| 3702 | wmsg.dwModifiers = w32_kbd_mods_to_emacs (console_modifiers, wParam); | 3702 | wmsg.dwModifiers = w32_kbd_mods_to_emacs (console_modifiers, wParam); |
| 3703 | 3703 | ||
| 3704 | /* What follows is just heuristics; the correct treatement requires | 3704 | /* What follows is just heuristics; the correct treatment requires |
| 3705 | non-destructive ToUnicode(): | 3705 | non-destructive ToUnicode(): |
| 3706 | http://search.cpan.org/~ilyaz/UI-KeyboardLayout/lib/UI/KeyboardLayout.pm#Can_an_application_on_Windows_accept_keyboard_events?_Part_IV:_application-specific_modifiers | 3706 | http://search.cpan.org/~ilyaz/UI-KeyboardLayout/lib/UI/KeyboardLayout.pm#Can_an_application_on_Windows_accept_keyboard_events?_Part_IV:_application-specific_modifiers |
| 3707 | 3707 | ||
| @@ -7001,7 +7001,7 @@ w32_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms) | |||
| 7001 | Frame parameters may be changed if .Xdefaults contains | 7001 | Frame parameters may be changed if .Xdefaults contains |
| 7002 | specifications for the default font. For example, if there is an | 7002 | specifications for the default font. For example, if there is an |
| 7003 | `Emacs.default.attributeBackground: pink', the `background-color' | 7003 | `Emacs.default.attributeBackground: pink', the `background-color' |
| 7004 | attribute of the frame get's set, which let's the internal border | 7004 | attribute of the frame gets set, which let's the internal border |
| 7005 | of the tooltip frame appear in pink. Prevent this. */ | 7005 | of the tooltip frame appear in pink. Prevent this. */ |
| 7006 | { | 7006 | { |
| 7007 | Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); | 7007 | Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); |
| @@ -7085,7 +7085,7 @@ compute_tip_xy (struct frame *f, | |||
| 7085 | 7085 | ||
| 7086 | /* If multiple monitor support is available, constrain the tip onto | 7086 | /* If multiple monitor support is available, constrain the tip onto |
| 7087 | the current monitor. This improves the above by allowing negative | 7087 | the current monitor. This improves the above by allowing negative |
| 7088 | co-ordinates if monitor positions are such that they are valid, and | 7088 | coordinates if monitor positions are such that they are valid, and |
| 7089 | snaps a tooltip onto a single monitor if we are close to the edge | 7089 | snaps a tooltip onto a single monitor if we are close to the edge |
| 7090 | where it would otherwise flow onto the other monitor (or into | 7090 | where it would otherwise flow onto the other monitor (or into |
| 7091 | nothingness if there is a gap in the overlap). */ | 7091 | nothingness if there is a gap in the overlap). */ |
| @@ -8079,7 +8079,7 @@ operations: | |||
| 8079 | \"pastelink\" | 8079 | \"pastelink\" |
| 8080 | - create a shortcut in DOCUMENT (which must be a directory) | 8080 | - create a shortcut in DOCUMENT (which must be a directory) |
| 8081 | the file or directory whose name is in the clipboard. | 8081 | the file or directory whose name is in the clipboard. |
| 8082 | \"runas\" - run DOCUMENT, which must be an excutable file, with | 8082 | \"runas\" - run DOCUMENT, which must be an executable file, with |
| 8083 | elevated privileges (a.k.a. \"as Administrator\"). | 8083 | elevated privileges (a.k.a. \"as Administrator\"). |
| 8084 | \"properties\" | 8084 | \"properties\" |
| 8085 | - open the property sheet dialog for DOCUMENT. | 8085 | - open the property sheet dialog for DOCUMENT. |
diff --git a/src/w32heap.c b/src/w32heap.c index ececc73c026..ba3550b6e9b 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -884,7 +884,7 @@ setrlimit (rlimit_resource_t rltype, const struct rlimit *rlp) | |||
| 884 | { | 884 | { |
| 885 | case RLIMIT_STACK: | 885 | case RLIMIT_STACK: |
| 886 | case RLIMIT_NOFILE: | 886 | case RLIMIT_NOFILE: |
| 887 | /* We cannot modfy these limits, so we always fail. */ | 887 | /* We cannot modify these limits, so we always fail. */ |
| 888 | errno = EPERM; | 888 | errno = EPERM; |
| 889 | break; | 889 | break; |
| 890 | default: | 890 | default: |
diff --git a/src/w32menu.c b/src/w32menu.c index e076043f7b7..da2db78a940 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1485,7 +1485,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) | |||
| 1485 | crash Emacs when we try to display those "strings". It | 1485 | crash Emacs when we try to display those "strings". It |
| 1486 | is unclear why we get these dwItemData, or what they are: | 1486 | is unclear why we get these dwItemData, or what they are: |
| 1487 | sometimes they point to a wchar_t string that is the menu | 1487 | sometimes they point to a wchar_t string that is the menu |
| 1488 | title, sometimes to someting that doesn't look like text | 1488 | title, sometimes to something that doesn't look like text |
| 1489 | at all. (The problematic data also comes with the 0x0800 | 1489 | at all. (The problematic data also comes with the 0x0800 |
| 1490 | bit set, but this bit is not documented, so we don't want | 1490 | bit set, but this bit is not documented, so we don't want |
| 1491 | to depend on it.) */ | 1491 | to depend on it.) */ |
diff --git a/src/w32term.c b/src/w32term.c index 2669f29b560..e0618e4f52d 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6877,7 +6877,7 @@ w32_make_frame_visible (struct frame *f) | |||
| 6877 | /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL | 6877 | /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL |
| 6878 | causes unexpected behavior when unminimizing frames that were | 6878 | causes unexpected behavior when unminimizing frames that were |
| 6879 | previously maximized. But only SW_SHOWNORMAL works properly for | 6879 | previously maximized. But only SW_SHOWNORMAL works properly for |
| 6880 | frames that were truely hidden (using make-frame-invisible), so | 6880 | frames that were truly hidden (using make-frame-invisible), so |
| 6881 | we need it to avoid Bug#5482. It seems that iconified is only | 6881 | we need it to avoid Bug#5482. It seems that iconified is only |
| 6882 | set for minimized windows that are still visible, so use that to | 6882 | set for minimized windows that are still visible, so use that to |
| 6883 | determine the appropriate flag to pass ShowWindow. */ | 6883 | determine the appropriate flag to pass ShowWindow. */ |
diff --git a/src/w32term.h b/src/w32term.h index 8ba248013c7..694493c6c82 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -476,7 +476,7 @@ struct scroll_bar { | |||
| 476 | editing large files, we establish a minimum height by always | 476 | editing large files, we establish a minimum height by always |
| 477 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below | 477 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below |
| 478 | where they would be normally; the bottom and top are in a | 478 | where they would be normally; the bottom and top are in a |
| 479 | different co-ordinate system. */ | 479 | different coordinate system. */ |
| 480 | int start, end; | 480 | int start, end; |
| 481 | 481 | ||
| 482 | /* If the scroll bar handle is currently being dragged by the user, | 482 | /* If the scroll bar handle is currently being dragged by the user, |
diff --git a/src/xdisp.c b/src/xdisp.c index 69e5a9e1cf1..ac5307f4acc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -510,7 +510,7 @@ static Lisp_Object list_of_error; | |||
| 510 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) | 510 | || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) |
| 511 | 511 | ||
| 512 | /* These are the category sets we use. They are defined by | 512 | /* These are the category sets we use. They are defined by |
| 513 | kinsoku.el and chracters.el. */ | 513 | kinsoku.el and characters.el. */ |
| 514 | #define NOT_AT_EOL '<' | 514 | #define NOT_AT_EOL '<' |
| 515 | #define NOT_AT_BOL '>' | 515 | #define NOT_AT_BOL '>' |
| 516 | #define LINE_BREAKABLE '|' | 516 | #define LINE_BREAKABLE '|' |
| @@ -2230,7 +2230,7 @@ estimate_mode_line_height (struct frame *f, enum face_id face_id) | |||
| 2230 | } | 2230 | } |
| 2231 | 2231 | ||
| 2232 | /* Given a pixel position (PIX_X, PIX_Y) on frame F, return glyph | 2232 | /* Given a pixel position (PIX_X, PIX_Y) on frame F, return glyph |
| 2233 | co-ordinates in (*X, *Y). Set *BOUNDS to the rectangle that the | 2233 | coordinates in (*X, *Y). Set *BOUNDS to the rectangle that the |
| 2234 | glyph at X, Y occupies, if BOUNDS != 0. If NOCLIP, do | 2234 | glyph at X, Y occupies, if BOUNDS != 0. If NOCLIP, do |
| 2235 | not force the value into range. */ | 2235 | not force the value into range. */ |
| 2236 | 2236 | ||
| @@ -3744,7 +3744,7 @@ init_to_row_end (struct it *it, struct window *w, struct glyph_row *row) | |||
| 3744 | it->continuation_lines_width | 3744 | it->continuation_lines_width |
| 3745 | = row->continuation_lines_width + row->pixel_width; | 3745 | = row->continuation_lines_width + row->pixel_width; |
| 3746 | CHECK_IT (it); | 3746 | CHECK_IT (it); |
| 3747 | /* Initializing IT in the presense of compositions in reordered | 3747 | /* Initializing IT in the presence of compositions in reordered |
| 3748 | rows is tricky: row->end above will generally cause us to | 3748 | rows is tricky: row->end above will generally cause us to |
| 3749 | start at position that is not the first one in the logical | 3749 | start at position that is not the first one in the logical |
| 3750 | order, and we might therefore miss the composition earlier in | 3750 | order, and we might therefore miss the composition earlier in |
| @@ -25641,8 +25641,10 @@ display_mode_element (struct it *it, int depth, int field_width, int precision, | |||
| 25641 | /* Non-ASCII characters in SPEC should cause mode-line | 25641 | /* Non-ASCII characters in SPEC should cause mode-line |
| 25642 | element be displayed as a multibyte string. */ | 25642 | element be displayed as a multibyte string. */ |
| 25643 | ptrdiff_t nbytes = strlen (spec); | 25643 | ptrdiff_t nbytes = strlen (spec); |
| 25644 | if (multibyte_chars_in_text ((const unsigned char *)spec, | 25644 | ptrdiff_t nchars, mb_nbytes; |
| 25645 | nbytes) != nbytes) | 25645 | parse_str_as_multibyte ((const unsigned char *)spec, nbytes, |
| 25646 | &nchars, &mb_nbytes); | ||
| 25647 | if (!(nbytes == nchars || nbytes != mb_nbytes)) | ||
| 25646 | multibyte = true; | 25648 | multibyte = true; |
| 25647 | 25649 | ||
| 25648 | switch (mode_line_target) | 25650 | switch (mode_line_target) |
| @@ -34831,8 +34833,7 @@ and is used only on frames for which no explicit name has been set | |||
| 34831 | Oracle Developer Studio 12.6. */ | 34833 | Oracle Developer Studio 12.6. */ |
| 34832 | Lisp_Object icon_title_name_format | 34834 | Lisp_Object icon_title_name_format |
| 34833 | = pure_list (empty_unibyte_string, | 34835 | = pure_list (empty_unibyte_string, |
| 34834 | intern_c_string ("invocation-name"), | 34836 | build_pure_c_string ("%b - GNU Emacs at "), |
| 34835 | build_pure_c_string ("@"), | ||
| 34836 | intern_c_string ("system-name")); | 34837 | intern_c_string ("system-name")); |
| 34837 | Vicon_title_format | 34838 | Vicon_title_format |
| 34838 | = Vframe_title_format | 34839 | = Vframe_title_format |
| @@ -35008,8 +35009,10 @@ but does not change the fact they are interpreted as raw bytes. */); | |||
| 35008 | 35009 | ||
| 35009 | DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height, | 35010 | DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height, |
| 35010 | doc: /* Maximum height for resizing mini-windows (the minibuffer and the echo area). | 35011 | doc: /* Maximum height for resizing mini-windows (the minibuffer and the echo area). |
| 35011 | If a float, it specifies a fraction of the mini-window frame's height. | 35012 | If a float, it specifies the maximum height in units of the |
| 35012 | If an integer, it specifies a number of lines. */); | 35013 | mini-window frame's height. |
| 35014 | If an integer, it specifies the maximum height in units of the | ||
| 35015 | mini-window frame's default font's height. */); | ||
| 35013 | Vmax_mini_window_height = make_float (0.25); | 35016 | Vmax_mini_window_height = make_float (0.25); |
| 35014 | 35017 | ||
| 35015 | DEFVAR_LISP ("resize-mini-windows", Vresize_mini_windows, | 35018 | DEFVAR_LISP ("resize-mini-windows", Vresize_mini_windows, |
diff --git a/src/xfaces.c b/src/xfaces.c index 06d2f994de6..73a536b19c6 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -5217,7 +5217,6 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 5217 | || !UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) | 5217 | || !UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) |
| 5218 | || !UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) | 5218 | || !UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) |
| 5219 | || !UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) | 5219 | || !UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) |
| 5220 | || !UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | ||
| 5221 | || !UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])) | 5220 | || !UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])) |
| 5222 | return false; | 5221 | return false; |
| 5223 | 5222 | ||
| @@ -5282,6 +5281,15 @@ tty_supports_face_attributes_p (struct frame *f, | |||
| 5282 | test_caps |= TTY_CAP_INVERSE; | 5281 | test_caps |= TTY_CAP_INVERSE; |
| 5283 | } | 5282 | } |
| 5284 | 5283 | ||
| 5284 | /* strike through */ | ||
| 5285 | val = attrs[LFACE_STRIKE_THROUGH_INDEX]; | ||
| 5286 | if (!UNSPECIFIEDP (val)) | ||
| 5287 | { | ||
| 5288 | if (face_attr_equal_p (val, def_attrs[LFACE_STRIKE_THROUGH_INDEX])) | ||
| 5289 | return false; /* same as default */ | ||
| 5290 | else | ||
| 5291 | test_caps |= TTY_CAP_STRIKE_THROUGH; | ||
| 5292 | } | ||
| 5285 | 5293 | ||
| 5286 | /* Color testing. */ | 5294 | /* Color testing. */ |
| 5287 | 5295 | ||
| @@ -6244,6 +6252,8 @@ realize_tty_face (struct face_cache *cache, | |||
| 6244 | face->tty_underline_p = true; | 6252 | face->tty_underline_p = true; |
| 6245 | if (!NILP (attrs[LFACE_INVERSE_INDEX])) | 6253 | if (!NILP (attrs[LFACE_INVERSE_INDEX])) |
| 6246 | face->tty_reverse_p = true; | 6254 | face->tty_reverse_p = true; |
| 6255 | if (!NILP (attrs[LFACE_STRIKE_THROUGH_INDEX])) | ||
| 6256 | face->tty_strike_through_p = true; | ||
| 6247 | 6257 | ||
| 6248 | /* Map color names to color indices. */ | 6258 | /* Map color names to color indices. */ |
| 6249 | map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted); | 6259 | map_tty_color (f, face, LFACE_FOREGROUND_INDEX, &face_colors_defaulted); |
diff --git a/src/xfns.c b/src/xfns.c index 78f977bf0aa..46e4bd73a6b 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -6535,7 +6535,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object parms) | |||
| 6535 | Frame parameters may be changed if .Xdefaults contains | 6535 | Frame parameters may be changed if .Xdefaults contains |
| 6536 | specifications for the default font. For example, if there is an | 6536 | specifications for the default font. For example, if there is an |
| 6537 | `Emacs.default.attributeBackground: pink', the `background-color' | 6537 | `Emacs.default.attributeBackground: pink', the `background-color' |
| 6538 | attribute of the frame get's set, which let's the internal border | 6538 | attribute of the frame gets set, which let's the internal border |
| 6539 | of the tooltip frame appear in pink. Prevent this. */ | 6539 | of the tooltip frame appear in pink. Prevent this. */ |
| 6540 | { | 6540 | { |
| 6541 | Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); | 6541 | Lisp_Object bg = Fframe_parameter (frame, Qbackground_color); |
diff --git a/src/xterm.h b/src/xterm.h index db8d5847814..0f8ba5e82b4 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -890,7 +890,7 @@ struct scroll_bar | |||
| 890 | editing large files, we establish a minimum height by always | 890 | editing large files, we establish a minimum height by always |
| 891 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below | 891 | drawing handle bottoms VERTICAL_SCROLL_BAR_MIN_HANDLE pixels below |
| 892 | where they would be normally; the bottom and top are in a | 892 | where they would be normally; the bottom and top are in a |
| 893 | different co-ordinate system. */ | 893 | different coordinate system. */ |
| 894 | int start, end; | 894 | int start, end; |
| 895 | 895 | ||
| 896 | /* If the scroll bar handle is currently being dragged by the user, | 896 | /* If the scroll bar handle is currently being dragged by the user, |