From c49d379f17bcb0ce82604def2eaa04bda00bd5ec Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Mon, 6 Apr 2020 09:22:36 +0200 Subject: [PATCH 01/10] Fix some problems with moving and resizing child frames (1) Provide new option 'x-gtk-resize-child-frames' which allows to either hide a child frame during resizing or asks GTK to resize it "immediately". This is needed because desktops like GNOME shell otherwise won't allow resizing child frames at all. (2) Do not try to synchronize the position of a child frame after moving it. Needed because the present implementation introduces a 0.5 secs delay which makes dragging child frames virtually impossible with Lucid and Motif toolkits on desktops like GNOME shell that use invisible outer frame borders. For further information see the thread starting with https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00343.html * src/frame.c (syms_of_frame): New symbol Qxg_frame_set_char_size_4. * src/gtkutil.c (xg_frame_set_char_size): Hide child frame during resizing when 'x-gtk-resize-child-frames' equals 'hide'. * src/xfns.c (x_set_parent_frame, Fx_create_frame): Set gtk_container_resize_mode to GTK_RESIZE_IMMEDIATE for child frames when'x-gtk-resize-child-frames' equals 'resize-mode'. (Fx_gtk_debug): New function to toggle interactive GTK debugging from within Emacs. (syms_of_xfns): New symbols Qhide and Qresize_mode. (x-gtk-resize-child-frames): New option that allows to resize child frames on desktops like GNOME shell (with the mutter WM) that otherwise refuse to resize them. * src/xterm.c (x_set_offset): Don't x_sync_with_move for child frames, it makes moving child frames virtually impossible with the Lucid and Motif toolkits. --- src/frame.c | 1 + src/gtkutil.c | 33 +++++++++++++++++++++++++----- src/xfns.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/xterm.c | 37 ++++++++++++++++++---------------- 4 files changed, 105 insertions(+), 22 deletions(-) diff --git a/src/frame.c b/src/frame.c index ecf175f4f99..4dd8bb18041 100644 --- a/src/frame.c +++ b/src/frame.c @@ -5943,6 +5943,7 @@ syms_of_frame (void) DEFSYM (Qxg_frame_set_char_size_1, "xg-frame-set-char-size-1"); DEFSYM (Qxg_frame_set_char_size_2, "xg-frame-set-char-size-2"); DEFSYM (Qxg_frame_set_char_size_3, "xg-frame-set-char-size-3"); + DEFSYM (Qxg_frame_set_char_size_4, "xg-frame-set-char-size-4"); DEFSYM (Qx_set_window_size_1, "x-set-window-size-1"); DEFSYM (Qx_set_window_size_2, "x-set-window-size-2"); DEFSYM (Qx_set_window_size_3, "x-set-window-size-3"); diff --git a/src/gtkutil.c b/src/gtkutil.c index 5e7cf3d2114..e374bdbe037 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -941,9 +941,8 @@ xg_frame_resized (struct frame *f, int pixelwidth, int pixelheight) } } -/* Resize the outer window of frame F after changing the height. - COLUMNS/ROWS is the size the edit area shall have after the resize. */ - +/** Resize the outer window of frame F. WIDTH and HEIGHT are the new + pixel sizes of F's text area. */ void xg_frame_set_char_size (struct frame *f, int width, int height) { @@ -954,6 +953,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) int totalheight = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); + bool was_visible = false; if (FRAME_PIXEL_HEIGHT (f) == 0) return; @@ -996,12 +996,35 @@ xg_frame_set_char_size (struct frame *f, int width, int height) gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, gheight); } + else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f) + && EQ (x_gtk_resize_child_frames, Qhide)) + { + was_visible = true; + + if (totalwidth != gwidth || totalheight != gheight) + { + frame_size_history_add + (f, Qxg_frame_set_char_size_4, width, height, + list2i (totalwidth, totalheight)); + block_input (); + gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + + gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), + totalwidth, totalheight); + + block_input (); + gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + + fullscreen = Qnil; + } + } else { frame_size_history_add (f, Qxg_frame_set_char_size_3, width, height, list2i (totalwidth, totalheight)); - gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, totalheight); fullscreen = Qnil; @@ -1017,7 +1040,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) size as fast as possible. For unmapped windows, we can set rows/cols. When the frame is mapped again we will (hopefully) get the correct size. */ - if (FRAME_VISIBLE_P (f)) + if (FRAME_VISIBLE_P (f) && !was_visible) { /* Must call this to flush out events */ (void)gtk_events_pending (); diff --git a/src/xfns.c b/src/xfns.c index afe1ceef81a..0fc553012bd 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -861,6 +861,12 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), p ? FRAME_X_WINDOW (p) : DefaultRootWindow (FRAME_X_DISPLAY (f)), f->left_pos, f->top_pos); +#ifdef USE_GTK + if (EQ (x_gtk_resize_child_frames, Qresize_mode)) + gtk_container_set_resize_mode + (GTK_CONTAINER (FRAME_GTK_OUTER_WIDGET (f)), + p ? GTK_RESIZE_IMMEDIATE : GTK_RESIZE_QUEUE); +#endif unblock_input (); fset_parent_frame (f, new_value); @@ -4084,6 +4090,11 @@ This function is an internal primitive--use `make-frame' instead. */) block_input (); XReparentWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), FRAME_X_WINDOW (p), f->left_pos, f->top_pos); +#ifdef USE_GTK + if (EQ (x_gtk_resize_child_frames, Qresize_mode)) + gtk_container_set_resize_mode + (GTK_CONTAINER (FRAME_GTK_OUTER_WIDGET (f)), GTK_RESIZE_IMMEDIATE); +#endif unblock_input (); } @@ -7742,6 +7753,22 @@ Note: Text drawn with the `x' font backend is shown with hollow boxes. */) #endif /* USE_GTK */ #endif /* USE_CAIRO */ +#ifdef USE_GTK +#ifdef HAVE_GTK3 +DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0, + doc: /* Toggle interactive GTK debugging. */) + (Lisp_Object enable) +{ + gboolean enable_debug = !NILP (enable); + + block_input (); + gtk_window_set_interactive_debugging (enable_debug); + unblock_input (); + + return NILP (enable) ? Qnil : Qt; +} +#endif /* HAVE_GTK3 */ +#endif /* USE_GTK */ /*********************************************************************** Initialization @@ -7810,6 +7837,8 @@ syms_of_xfns (void) DEFSYM (Qfont_parameter, "font-parameter"); DEFSYM (Qmono, "mono"); DEFSYM (Qassq_delete_all, "assq-delete-all"); + DEFSYM (Qhide, "hide"); + DEFSYM (Qresize_mode, "resize-mode"); #ifdef USE_CAIRO DEFSYM (Qpdf, "pdf"); @@ -7986,6 +8015,28 @@ Otherwise use Emacs own tooltip implementation. When using Gtk+ tooltips, the tooltip face is not used. */); x_gtk_use_system_tooltips = true; + DEFVAR_LISP ("x-gtk-resize-child-frames", x_gtk_resize_child_frames, + doc: /* If non-nil, resize child frames specially with GTK builds. +If this is nil, resize child frames like any other frames. This is the +default and usually works with most desktops. Some desktop environments +(GNOME shell in particular when using the mutter window manager), +however, may refuse to resize a child frame when Emacs is built with +GTK3. For those environments, the two settings below are provided. + +If this equals the symbol 'hide', Emacs temporarily hides the child +frame during resizing. This approach seems to work reliably, may +however induce some flicker when the frame is made visible again. + +If this equals the symbol 'resize-mode', Emacs uses GTK's resize mode to +always trigger an immediate resize of the child frame. This method is +deprecated by GTK and may not work in future versions of that toolkit. +It also may freeze Emacs when used with other desktop environments. It +avoids, however, the unpleasent flicker induced by the hiding approach. + +This variable is considered a temporary workaround and will be hopefully +eliminated in future versions of Emacs. */); + x_gtk_resize_child_frames = Qnil; + /* Tell Emacs about this window system. */ Fprovide (Qx, Qnil); @@ -8101,4 +8152,9 @@ When using Gtk+ tooltips, the tooltip face is not used. */); defsubr (&Sx_print_frames_dialog); #endif #endif +#ifdef USE_GTK +#ifdef HAVE_GTK3 + defsubr (&Sx_gtk_debug); +#endif +#endif } diff --git a/src/xterm.c b/src/xterm.c index bda976fcbbd..44396955ed0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10608,26 +10608,29 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, int change_ modified_left, modified_top); #endif - x_sync_with_move (f, f->left_pos, f->top_pos, - FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN); + /* 'x_sync_with_move' is too costly for dragging child frames. */ + if (!FRAME_PARENT_FRAME (f)) + { + x_sync_with_move (f, f->left_pos, f->top_pos, + FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN); - /* change_gravity is non-zero when this function is called from Lisp to - programmatically move a frame. In that case, we call - x_check_expected_move to discover if we have a "Type A" or "Type B" - window manager, and, for a "Type A" window manager, adjust the position - of the frame. + /* change_gravity is non-zero when this function is called from Lisp to + programmatically move a frame. In that case, we call + x_check_expected_move to discover if we have a "Type A" or "Type B" + window manager, and, for a "Type A" window manager, adjust the position + of the frame. - We call x_check_expected_move if a programmatic move occurred, and - either the window manager type (A/B) is unknown or it is Type A but we - need to compute the top/left offset adjustment for this frame. */ + We call x_check_expected_move if a programmatic move occurred, and + either the window manager type (A/B) is unknown or it is Type A but we + need to compute the top/left offset adjustment for this frame. */ - if (change_gravity != 0 - && !FRAME_PARENT_FRAME (f) - && (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN - || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A - && (FRAME_X_OUTPUT (f)->move_offset_left == 0 - && FRAME_X_OUTPUT (f)->move_offset_top == 0)))) - x_check_expected_move (f, modified_left, modified_top); + if (change_gravity != 0 + && (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN + || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A + && (FRAME_X_OUTPUT (f)->move_offset_left == 0 + && FRAME_X_OUTPUT (f)->move_offset_top == 0)))) + x_check_expected_move (f, modified_left, modified_top); + } unblock_input (); } From f451ef9308838ee2745b89c5c5739a32b2741128 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 6 Apr 2020 21:12:09 +0300 Subject: [PATCH 02/10] ; * etc/NEWS: Mention 'executing-macro' in removed vars. --- etc/NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index d3f27e328e7..44a92ecbdd6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2892,8 +2892,8 @@ fixnum for such arguments. 'desktop-buffer-misc-functions', 'desktop-buffer-modes-to-save', 'desktop-enable', 'desktop-load-default', 'dired-omit-files-p', 'disabled-command-hook', 'dungeon-mode-map', 'electric-nroff-mode', -'electric-nroff-newline', 'electric-perl-terminator', 'focus-frame', -'forward-text-line', 'generic-define-mswindows-modes', +'electric-nroff-newline', 'electric-perl-terminator', 'executing-macro', +'focus-frame', 'forward-text-line', 'generic-define-mswindows-modes', 'generic-define-unix-modes', 'generic-font-lock-defaults', 'goto-address-at-mouse', 'highlight-changes-colours', 'ibuffer-elide-long-columns', 'ibuffer-hooks', 'ibuffer-mode-hooks', From 08486f4cae8e209cd70bd13534beff336faffd9e Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 8 Apr 2020 13:52:40 +0300 Subject: [PATCH 03/10] Speed up 'resize-mode' child frames a little * src/gtkutil.c (xg_frame_set_char_size): Skip resizing if the target dimensions are unchanged for child frames with 'resize-mode' resize policy as well. --- src/gtkutil.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index e374bdbe037..466cb42c7ee 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -954,6 +954,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); bool was_visible = false; + bool hide_child_frame; if (FRAME_PIXEL_HEIGHT (f) == 0) return; @@ -996,26 +997,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height) gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, gheight); } - else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f) - && EQ (x_gtk_resize_child_frames, Qhide)) + else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f)) { was_visible = true; + hide_child_frame = EQ (x_gtk_resize_child_frames, Qhide); if (totalwidth != gwidth || totalheight != gheight) { frame_size_history_add (f, Qxg_frame_set_char_size_4, width, height, list2i (totalwidth, totalheight)); - block_input (); - gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); - unblock_input (); + + if (hide_child_frame) + { + block_input (); + gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + } gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, totalheight); - block_input (); - gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); - unblock_input (); + if (hide_child_frame) + { + block_input (); + gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + } fullscreen = Qnil; } From 18d1bc0a09db280cc1653706f7f8022786f77c94 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 8 Apr 2020 18:33:52 +0300 Subject: [PATCH 04/10] Improve documentation of 'jit-lock-contextually' * lisp/jit-lock.el (jit-lock-contextually): Clarify the jit-lock operation when 'jit-lock-contextually' is non-nil and non-t. * doc/lispref/modes.texi (Syntactic Font Lock) (Other Font Lock Variables): Document the relation between 'jit-lock-register', 'font-lock-keywords-only', and syntactic refontification. --- doc/lispref/modes.texi | 11 ++++++++++- lisp/jit-lock.el | 22 ++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a8ddd45f891..e685391c955 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3214,6 +3214,11 @@ The optional argument @var{contextual}, if non-@code{nil}, forces Font Lock mode to always refontify a syntactically relevant part of the buffer, and not just the modified lines. This argument can usually be omitted. + +When Font Lock is activated in a buffer, it calls this function with a +non-@code{nil} value of @var{contextual} if the value of +@code{font-lock-keywords-only} (@pxref{Syntactic Font Lock}) is +@code{nil}. @end defun @defun jit-lock-unregister function @@ -3380,7 +3385,11 @@ table in special cases. @xref{Syntax Properties}. If the value of this variable is non-@code{nil}, Font Lock does not do syntactic fontification, only search-based fontification based on @code{font-lock-keywords}. It is normally set by Font Lock mode based -on the @var{keywords-only} element in @code{font-lock-defaults}. +on the @var{keywords-only} element in @code{font-lock-defaults}. If +the value is @code{nil}, Font Lock will call @code{jit-lock-register} +(@pxref{Other Font Lock Variables}) to set up for automatic +refontification of buffer text following a modified line to reflect +the new syntactic context due to the change. @end defvar @defvar font-lock-syntax-table diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index d73cd74da0b..95cc02197c1 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -101,16 +101,22 @@ See also `jit-lock-stealth-nice'." (defvaralias 'jit-lock-defer-contextually 'jit-lock-contextually) (defcustom jit-lock-contextually 'syntax-driven - "If non-nil, means fontification should be syntactically true. -If nil, means fontification occurs only on those lines modified. This + "If non-nil, fontification should be syntactically true. +If nil, refontification occurs only on lines that were modified. This means where modification on a line causes syntactic change on subsequent lines, those subsequent lines are not refontified to reflect their new context. -If t, means fontification occurs on those lines modified and all -subsequent lines. This means those subsequent lines are refontified to reflect -their new syntactic context, after `jit-lock-context-time' seconds. -If any other value, e.g., `syntax-driven', means syntactically true -fontification occurs only if syntactic fontification is performed using the -buffer mode's syntax table, i.e., only if `font-lock-keywords-only' is nil. +If t, fontification occurs on those lines modified and all subsequent lines. +This means those subsequent lines are refontified to reflect their new +syntactic context, after `jit-lock-context-time' seconds. +If any other value, e.g., `syntax-driven', it means refontification of +subsequent lines to reflect their new syntactic context may or may not +occur after `jit-lock-context-time', depending on the the font-lock +definitions of the buffer. Specifically, if `font-lock-keywords-only' +is nil in a buffer, which generally means the syntactic fontification +is done using the buffer mode's syntax table, the syntactic +refontification will be triggered (because in that case font-lock +calls `jit-lock-register' to set up for syntactic refontification, +and sets the buffer-local value of `jit-lock-contextually' to t). The value of this variable is used when JIT Lock mode is turned on." :type '(choice (const :tag "never" nil) From d5750af151853f13bf3481876d487741eebe36b7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 9 Apr 2020 11:21:18 +0300 Subject: [PATCH 05/10] Avoid assertion violation in intervals.c * src/intervals.c (delete_interval): Allow negative values of LENGTH (i). This happens when delete_interval is called from set_intervals_multibyte_1, because the caller zeroes out the total_length field of the interval to be deleted. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00131.html for more details. See also a related old discussion at https://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00399.html. --- src/intervals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intervals.c b/src/intervals.c index a66594ceea2..585ef18bd2e 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1187,7 +1187,7 @@ delete_interval (register INTERVAL i) register INTERVAL parent; ptrdiff_t amt = LENGTH (i); - eassert (amt == 0); /* Only used on zero-length intervals now. */ + eassert (amt <= 0); /* Only used on zero total-length intervals now. */ if (ROOT_INTERVAL_P (i)) { From 36c42d2a30e7a02fc363b5ec3bd000530c705715 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 9 Apr 2020 15:55:32 +0200 Subject: [PATCH 06/10] * doc/misc/tramp.texi (Bug Reports): Avoid line breaks in traces. --- doc/misc/tramp.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e48a48b5d14..9f216d339f2 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3819,7 +3819,8 @@ the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the contents of the @file{*tramp/foo*} and @file{*debug tramp/foo*} buffers with the bug report. Both buffers could contain non-@acronym{ASCII} characters which are relevant for analysis, append -the buffers as attachments to the bug report. +the buffers as attachments to the bug report. This is also needed in +order to avoid line breaks during mail transfer. @strong{Note} that a verbosity level greater than 6 is not necessary at this stage. Also note that a verbosity level of 6 or greater, the From 90321f595c88324cccaa820add096e5d1c3deac5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 9 Apr 2020 19:44:55 +0300 Subject: [PATCH 07/10] Fix face extension in pulse.el * lisp/cedet/pulse.el (pulse-reset-face): Propagate the :extend attribute of FACE to the face used for displaying the pulse. Reported by Adam Porter . --- lisp/cedet/pulse.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index 16243e16b45..8649254aedd 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -161,6 +161,9 @@ Return t if there is more drift to do, nil if completed." (face-background face nil t) (face-background 'pulse-highlight-start-face) )) + (and face + (set-face-extend 'pulse-highlight-face + (face-extend-p face nil t))) (put 'pulse-highlight-face :startface (or face 'pulse-highlight-start-face)) (put 'pulse-highlight-face :iteration 0)) From 17a1bb5a032025d29413d5ad9316d3d001da3166 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 10 Apr 2020 18:30:21 +0300 Subject: [PATCH 08/10] Fix redisplay when scrolling under redisplay-dont-pause * src/dispnew.c (update_window): Reset the window's 'must_be_updated_p' flag if the window's update was completed without interruption. This fixes redisplay glitches when 'redisplay-dont-pause' is nil, at least on MS-Windows, because 'expose_window' doesn't redraw the exposed rectangle when the window's 'must_be_updated_p' flag is set. --- src/dispnew.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dispnew.c b/src/dispnew.c index d79ae836c56..5b6fa51a563 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3683,6 +3683,10 @@ update_window (struct window *w, bool force_p) W->output_cursor doesn't contain the cursor location. */ gui_update_window_end (w, !paused_p, mouse_face_overwritten_p); #endif + /* If the update wasn't interrupted, this window has been + completely updated. */ + if (!paused_p) + w->must_be_updated_p = false; } else paused_p = 1; From 6057d79a4eb4b95037068a1e9335a2418b2da5ec Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 10 Apr 2020 17:04:19 -0400 Subject: [PATCH 09/10] * doc/lispref/keymaps.texi (Extended Menu Items): Tweak :key-sequence Don't make it sound like `:key-sequence nil` is any different than the absence of `:key-sequence`. And the performance advantage of `:key-sequence` disappeared long ago. --- doc/lispref/keymaps.texi | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 259efea3248..f3c984848e7 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2224,23 +2224,13 @@ set the variable so that the button you clicked on becomes selected. @item :key-sequence @var{key-sequence} This property specifies which key sequence is likely to be bound to the -same command invoked by this menu item. If you specify the right key -sequence, that makes preparing the menu for display run much faster. +same command invoked by this menu item. If you specify a correct key +sequence, that sequence will be preferred over others. -If you specify the wrong key sequence, it has no effect; before Emacs +If you specify in incorrect key sequence, it has no effect; before Emacs displays @var{key-sequence} in the menu, it verifies that @var{key-sequence} is really equivalent to this menu item. -@item :key-sequence nil -This property indicates that there is normally no key binding which is -equivalent to this menu item. Using this property saves time in -preparing the menu for display, because Emacs does not need to search -the keymaps for a keyboard equivalent for this menu item. - -However, if the user has rebound this item's definition to a key -sequence, Emacs ignores the @code{:keys} property and finds the keyboard -equivalent anyway. - @item :keys @var{string} This property specifies that @var{string} is the string to display as the keyboard equivalent for this menu item. You can use From fd27685c1e68e742abf1698573dac53743f15e48 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 11 Apr 2020 09:40:37 +0300 Subject: [PATCH 10/10] ; * doc/lispref/keymaps.texi (Extended Menu Items): Fix last change. --- doc/lispref/keymaps.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index f3c984848e7..c6a02d721f0 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2227,9 +2227,11 @@ This property specifies which key sequence is likely to be bound to the same command invoked by this menu item. If you specify a correct key sequence, that sequence will be preferred over others. -If you specify in incorrect key sequence, it has no effect; before Emacs +If you specify an incorrect key sequence, it has no effect; before Emacs displays @var{key-sequence} in the menu, it verifies that -@var{key-sequence} is really equivalent to this menu item. +@var{key-sequence} is really equivalent to this menu item. Specifying +@code{nil} for @var{key-sequence} is equivalent to the +@code{:key-sequence} attribute being absent. @item :keys @var{string} This property specifies that @var{string} is the string to display