From c4bbe02cc48f781a31d1709b61fcd218c5eb8b43 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 20 Feb 2021 15:25:32 +0100 Subject: [PATCH 1/3] * lisp/help.el (help-for-help-internal): Doc fix; use imperative. --- lisp/help.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help.el b/lisp/help.el index 48b9d79b185..88265680f90 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -216,7 +216,7 @@ I METHOD Describe a specific input method, or RET for current. k KEYS Display the full documentation for the key sequence. K KEYS Show the Emacs manual's section for the command bound to KEYS. l Show last 300 input keystrokes (lossage). -L LANG-ENV Describes a specific language environment, or RET for current. +L LANG-ENV Describe a specific language environment, or RET for current. m Display documentation of current minor modes and current major mode, including their special commands. n Display news of recent Emacs changes. From 7a23915618816ccdda03823412991e77003e3e1b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 26 Feb 2021 05:46:26 +0100 Subject: [PATCH 2/3] * lisp/tooltip.el (tooltip): Doc fix for GTK. --- lisp/tooltip.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 4a37e404b26..bb53a138d84 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -138,7 +138,10 @@ of the `tooltip' face are used instead." :inherit variable-pitch) (t :inherit variable-pitch)) - "Face for tooltips." + "Face for tooltips. + +When using the GTK toolkit, this face will only be used if +`x-gtk-use-system-tooltips' is non-nil." :group 'tooltip :group 'basic-faces) From 2c5f21541957e2420e54ab2a70883140811708f7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Feb 2021 09:26:55 +0200 Subject: [PATCH 3/3] Avoid crashes in Mew due to corrupted tool-bar label * src/gtkutil.c (update_frame_tool_bar): Don't keep around a 'char *' pointer to a Lisp string's contents when calling Lisp, because that could relocate string data; keep the Lisp string itself instead. This avoids crashes in Mew. (Bug#46791) --- src/gtkutil.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index d824601be55..825fbe1d450 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -5019,11 +5019,10 @@ update_frame_tool_bar (struct frame *f) GtkWidget *wbutton = NULL; Lisp_Object specified_file; bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY)); - const char *label - = (EQ (style, Qimage) || (vert_only && horiz)) ? NULL - : STRINGP (PROP (TOOL_BAR_ITEM_LABEL)) - ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) - : ""; + Lisp_Object label + = (EQ (style, Qimage) || (vert_only && horiz)) + ? Qnil + : PROP (TOOL_BAR_ITEM_LABEL); ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j); @@ -5136,8 +5135,11 @@ update_frame_tool_bar (struct frame *f) /* If there is an existing widget, check if it's stale; if so, remove it and make a new tool item from scratch. */ - if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, - img, label, horiz)) + if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, img, + NILP (label) + ? NULL + : STRINGP (label) ? SSDATA (label) : "", + horiz)) { gtk_container_remove (GTK_CONTAINER (wtoolbar), GTK_WIDGET (ti)); @@ -5194,7 +5196,11 @@ update_frame_tool_bar (struct frame *f) #else if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); #endif - ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image); + ti = xg_make_tool_item (f, w, &wbutton, + NILP (label) + ? NULL + : STRINGP (label) ? SSDATA (label) : "", + i, horiz, text_image); gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j); }