Merge from origin/emacs-27
fd27685c1e
(origin/emacs-27) ; * doc/lispref/keymaps.texi (Extended M...6057d79a4e
* doc/lispref/keymaps.texi (Extended Menu Items): Tweak :k...17a1bb5a03
Fix redisplay when scrolling under redisplay-dont-pause90321f595c
Fix face extension in pulse.el36c42d2a30
* doc/misc/tramp.texi (Bug Reports): Avoid line breaks in ...d5750af151
Avoid assertion violation in intervals.c18d1bc0a09
Improve documentation of 'jit-lock-contextually'08486f4cae
Speed up 'resize-mode' child frames a littlef451ef9308
; * etc/NEWS: Mention 'executing-macro' in removed vars.c49d379f17
Fix some problems with moving and resizing child frames # Conflicts: # etc/NEWS
This commit is contained in:
commit
1988ffbaed
12 changed files with 155 additions and 49 deletions
|
@ -2227,22 +2227,14 @@ 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 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.
|
||||
|
||||
@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.
|
||||
@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
|
||||
|
|
|
@ -3215,6 +3215,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
|
||||
|
@ -3381,7 +3386,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
|
||||
|
|
|
@ -3842,7 +3842,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
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -96,16 +96,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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5930,6 +5930,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");
|
||||
|
|
|
@ -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,8 @@ 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;
|
||||
bool hide_child_frame;
|
||||
|
||||
if (FRAME_PIXEL_HEIGHT (f) == 0)
|
||||
return;
|
||||
|
@ -996,12 +997,42 @@ 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))
|
||||
{
|
||||
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));
|
||||
|
||||
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);
|
||||
|
||||
if (hide_child_frame)
|
||||
{
|
||||
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 +1048,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 ();
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
56
src/xfns.c
56
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);
|
||||
|
@ -4078,6 +4084,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 ();
|
||||
}
|
||||
|
||||
|
@ -7734,6 +7745,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
|
||||
|
@ -7802,6 +7829,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");
|
||||
|
@ -7978,6 +8007,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);
|
||||
|
||||
|
@ -8093,4 +8144,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
|
||||
}
|
||||
|
|
37
src/xterm.c
37
src/xterm.c
|
@ -10613,26 +10613,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 ();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue