diff options
| author | Andrea Corallo | 2020-09-10 10:45:02 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-09-10 10:45:02 +0200 |
| commit | a26b14733bba6659548f00db634bc45ccd222447 (patch) | |
| tree | 4b0e1d39334c03a90ce718a3e051be60ca28822b /src | |
| parent | 107514a6e21f2c434cdae0eca76fe0a60e287ac8 (diff) | |
| parent | 931b9f5953013c1e8844d0c723411b87ccfedb1a (diff) | |
| download | emacs-a26b14733bba6659548f00db634bc45ccd222447.tar.gz emacs-a26b14733bba6659548f00db634bc45ccd222447.zip | |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src')
| -rw-r--r-- | src/dbusbind.c | 20 | ||||
| -rw-r--r-- | src/image.c | 24 | ||||
| -rw-r--r-- | src/nsmenu.m | 6 |
3 files changed, 26 insertions, 24 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 4fce92521a4..af294afe92c 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1252,7 +1252,7 @@ The following usages are expected: | |||
| 1252 | 1252 | ||
| 1253 | `dbus-method-error-internal': | 1253 | `dbus-method-error-internal': |
| 1254 | (dbus-message-internal | 1254 | (dbus-message-internal |
| 1255 | dbus-message-type-error BUS SERVICE SERIAL &rest ARGS) | 1255 | dbus-message-type-error BUS SERVICE SERIAL ERROR-NAME &rest ARGS) |
| 1256 | 1256 | ||
| 1257 | usage: (dbus-message-internal &rest REST) */) | 1257 | usage: (dbus-message-internal &rest REST) */) |
| 1258 | (ptrdiff_t nargs, Lisp_Object *args) | 1258 | (ptrdiff_t nargs, Lisp_Object *args) |
| @@ -1508,7 +1508,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1508 | int mtype; | 1508 | int mtype; |
| 1509 | dbus_uint32_t serial; | 1509 | dbus_uint32_t serial; |
| 1510 | unsigned int ui_serial; | 1510 | unsigned int ui_serial; |
| 1511 | const char *uname, *path, *interface, *member; | 1511 | const char *uname, *path, *interface, *member, *error_name; |
| 1512 | 1512 | ||
| 1513 | dmessage = dbus_connection_pop_message (connection); | 1513 | dmessage = dbus_connection_pop_message (connection); |
| 1514 | 1514 | ||
| @@ -1544,10 +1544,11 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1544 | path = dbus_message_get_path (dmessage); | 1544 | path = dbus_message_get_path (dmessage); |
| 1545 | interface = dbus_message_get_interface (dmessage); | 1545 | interface = dbus_message_get_interface (dmessage); |
| 1546 | member = dbus_message_get_member (dmessage); | 1546 | member = dbus_message_get_member (dmessage); |
| 1547 | error_name =dbus_message_get_error_name (dmessage); | ||
| 1547 | 1548 | ||
| 1548 | XD_DEBUG_MESSAGE ("Event received: %s %u %s %s %s %s %s", | 1549 | XD_DEBUG_MESSAGE ("Event received: %s %u %s %s %s %s %s %s", |
| 1549 | XD_MESSAGE_TYPE_TO_STRING (mtype), | 1550 | XD_MESSAGE_TYPE_TO_STRING (mtype), |
| 1550 | ui_serial, uname, path, interface, member, | 1551 | ui_serial, uname, path, interface, member, error_name, |
| 1551 | XD_OBJECT_TO_STRING (args)); | 1552 | XD_OBJECT_TO_STRING (args)); |
| 1552 | 1553 | ||
| 1553 | if (mtype == DBUS_MESSAGE_TYPE_INVALID) | 1554 | if (mtype == DBUS_MESSAGE_TYPE_INVALID) |
| @@ -1571,7 +1572,9 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) | |||
| 1571 | EVENT_INIT (event); | 1572 | EVENT_INIT (event); |
| 1572 | event.kind = DBUS_EVENT; | 1573 | event.kind = DBUS_EVENT; |
| 1573 | event.frame_or_window = Qnil; | 1574 | event.frame_or_window = Qnil; |
| 1574 | event.arg = Fcons (value, args); | 1575 | event.arg = Fcons (value, |
| 1576 | (mtype == DBUS_MESSAGE_TYPE_ERROR) | ||
| 1577 | ? (Fcons (build_string (error_name), args)) : args); | ||
| 1575 | } | 1578 | } |
| 1576 | 1579 | ||
| 1577 | else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ | 1580 | else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */ |
| @@ -1744,7 +1747,8 @@ syms_of_dbusbind (void) | |||
| 1744 | DEFSYM (QCstruct, ":struct"); | 1747 | DEFSYM (QCstruct, ":struct"); |
| 1745 | DEFSYM (QCdict_entry, ":dict-entry"); | 1748 | DEFSYM (QCdict_entry, ":dict-entry"); |
| 1746 | 1749 | ||
| 1747 | /* Lisp symbols of objects in `dbus-registered-objects-table'. */ | 1750 | /* Lisp symbols of objects in `dbus-registered-objects-table'. |
| 1751 | `:property', which does exist there as well, is not used here. */ | ||
| 1748 | DEFSYM (QCserial, ":serial"); | 1752 | DEFSYM (QCserial, ":serial"); |
| 1749 | DEFSYM (QCmethod, ":method"); | 1753 | DEFSYM (QCmethod, ":method"); |
| 1750 | DEFSYM (QCsignal, ":signal"); | 1754 | DEFSYM (QCsignal, ":signal"); |
| @@ -1822,8 +1826,8 @@ registered methods and properties, UNAME is nil. PATH is the object | |||
| 1822 | path of the sending object. All of them can be nil, which means a | 1826 | path of the sending object. All of them can be nil, which means a |
| 1823 | wildcard then. OBJECT is either the handler to be called when a D-Bus | 1827 | wildcard then. OBJECT is either the handler to be called when a D-Bus |
| 1824 | message, which matches the key criteria, arrives (TYPE `:method' and | 1828 | message, which matches the key criteria, arrives (TYPE `:method' and |
| 1825 | `:signal'), or a cons cell containing the value of the property (TYPE | 1829 | `:signal'), or a list containing the value of the property and its |
| 1826 | `:property'). | 1830 | attributes (TYPE `:property'). |
| 1827 | 1831 | ||
| 1828 | For entries of type `:signal', there is also a fifth element RULE, | 1832 | For entries of type `:signal', there is also a fifth element RULE, |
| 1829 | which keeps the match string the signal is registered with. | 1833 | which keeps the match string the signal is registered with. |
diff --git a/src/image.c b/src/image.c index d8c34669cc4..6ecf6a70fe2 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -8276,11 +8276,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8276 | if (gif == NULL) | 8276 | if (gif == NULL) |
| 8277 | { | 8277 | { |
| 8278 | #if HAVE_GIFERRORSTRING | 8278 | #if HAVE_GIFERRORSTRING |
| 8279 | image_error ("Cannot open `%s': %s", | 8279 | const char *errstr = GifErrorString (gif_err); |
| 8280 | file, build_string (GifErrorString (gif_err))); | 8280 | if (errstr) |
| 8281 | #else | 8281 | image_error ("Cannot open `%s': %s", file, build_string (errstr)); |
| 8282 | image_error ("Cannot open `%s'", file); | 8282 | else |
| 8283 | #endif | 8283 | #endif |
| 8284 | image_error ("Cannot open `%s'", file); | ||
| 8285 | |||
| 8284 | return 0; | 8286 | return 0; |
| 8285 | } | 8287 | } |
| 8286 | } | 8288 | } |
| @@ -8306,11 +8308,13 @@ gif_load (struct frame *f, struct image *img) | |||
| 8306 | if (!gif) | 8308 | if (!gif) |
| 8307 | { | 8309 | { |
| 8308 | #if HAVE_GIFERRORSTRING | 8310 | #if HAVE_GIFERRORSTRING |
| 8309 | image_error ("Cannot open memory source `%s': %s", | 8311 | const char *errstr = GifErrorString (gif_err); |
| 8310 | img->spec, build_string (GifErrorString (gif_err))); | 8312 | if (errstr) |
| 8311 | #else | 8313 | image_error ("Cannot open memory source `%s': %s", |
| 8312 | image_error ("Cannot open memory source `%s'", img->spec); | 8314 | img->spec, build_string (errstr)); |
| 8315 | else | ||
| 8313 | #endif | 8316 | #endif |
| 8317 | image_error ("Cannot open memory source `%s'", img->spec); | ||
| 8314 | return 0; | 8318 | return 0; |
| 8315 | } | 8319 | } |
| 8316 | } | 8320 | } |
| @@ -8593,9 +8597,9 @@ gif_load (struct frame *f, struct image *img) | |||
| 8593 | if (error_text) | 8597 | if (error_text) |
| 8594 | image_error ("Error closing `%s': %s", | 8598 | image_error ("Error closing `%s': %s", |
| 8595 | img->spec, build_string (error_text)); | 8599 | img->spec, build_string (error_text)); |
| 8596 | #else | 8600 | else |
| 8597 | image_error ("Error closing `%s'", img->spec); | ||
| 8598 | #endif | 8601 | #endif |
| 8602 | image_error ("Error closing `%s'", img->spec); | ||
| 8599 | } | 8603 | } |
| 8600 | 8604 | ||
| 8601 | /* Maybe fill in the background field while we have ximg handy. */ | 8605 | /* Maybe fill in the background field while we have ximg handy. */ |
diff --git a/src/nsmenu.m b/src/nsmenu.m index e313fc03f40..a286a80da17 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -122,7 +122,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 122 | /*fprintf (stderr, "ns_update_menubar: frame: %p\tdeep: %d\tsub: %p\n", f, deep_p, submenu); */ | 122 | /*fprintf (stderr, "ns_update_menubar: frame: %p\tdeep: %d\tsub: %p\n", f, deep_p, submenu); */ |
| 123 | 123 | ||
| 124 | block_input (); | 124 | block_input (); |
| 125 | pool = [[NSAutoreleasePool alloc] init]; | ||
| 126 | 125 | ||
| 127 | /* Menu may have been created automatically; if so, discard it. */ | 126 | /* Menu may have been created automatically; if so, discard it. */ |
| 128 | if ([menu isKindOfClass: [EmacsMenu class]] == NO) | 127 | if ([menu isKindOfClass: [EmacsMenu class]] == NO) |
| @@ -240,7 +239,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 240 | [[submenu title] UTF8String]); | 239 | [[submenu title] UTF8String]); |
| 241 | discard_menu_items (); | 240 | discard_menu_items (); |
| 242 | unbind_to (specpdl_count, Qnil); | 241 | unbind_to (specpdl_count, Qnil); |
| 243 | [pool release]; | ||
| 244 | unblock_input (); | 242 | unblock_input (); |
| 245 | return; | 243 | return; |
| 246 | } | 244 | } |
| @@ -298,7 +296,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 298 | free_menubar_widget_value_tree (first_wv); | 296 | free_menubar_widget_value_tree (first_wv); |
| 299 | discard_menu_items (); | 297 | discard_menu_items (); |
| 300 | unbind_to (specpdl_count, Qnil); | 298 | unbind_to (specpdl_count, Qnil); |
| 301 | [pool release]; | ||
| 302 | unblock_input (); | 299 | unblock_input (); |
| 303 | return; | 300 | return; |
| 304 | } | 301 | } |
| @@ -364,7 +361,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 364 | if (NILP (items)) | 361 | if (NILP (items)) |
| 365 | { | 362 | { |
| 366 | free_menubar_widget_value_tree (first_wv); | 363 | free_menubar_widget_value_tree (first_wv); |
| 367 | [pool release]; | ||
| 368 | unblock_input (); | 364 | unblock_input (); |
| 369 | return; | 365 | return; |
| 370 | } | 366 | } |
| @@ -395,7 +391,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 395 | if (i == n) | 391 | if (i == n) |
| 396 | { | 392 | { |
| 397 | free_menubar_widget_value_tree (first_wv); | 393 | free_menubar_widget_value_tree (first_wv); |
| 398 | [pool release]; | ||
| 399 | unblock_input (); | 394 | unblock_input (); |
| 400 | return; | 395 | return; |
| 401 | } | 396 | } |
| @@ -454,7 +449,6 @@ ns_update_menubar (struct frame *f, bool deep_p, EmacsMenu *submenu) | |||
| 454 | if (needsSet) | 449 | if (needsSet) |
| 455 | [NSApp setMainMenu: menu]; | 450 | [NSApp setMainMenu: menu]; |
| 456 | 451 | ||
| 457 | [pool release]; | ||
| 458 | unblock_input (); | 452 | unblock_input (); |
| 459 | 453 | ||
| 460 | } | 454 | } |