* src/frame.c (tty_child_pos_param): Handle additional position
values. New SIZE argument.
(tty_child_frame_rect): Process size before position.
(Fmake_terminal_frame): Do not store calculated size/position
values in parameters to avoid that a negative absolute position
is later interpreted as position relative to bottom/right edge
of parent.
(Fmodify_frame_parameters): For tty child frames process size
before position values so the latter can take a new size into
account.
* src/frame.h: Adjust declaration of tty_child_pos_param.
* src/gtkutil.c (xg_set_geometry): Handle negative frame
position specifications.
* src/msdos.c (IT_set_frame_parameters): For tty child frames
process size before position parameters.
* src/xfns.c (x_window): In the non-GTK toolkit variant leave
negative position values unchanged - the toolkit should know how
to handle them. Process child frame position parameters
separately. In the non-toolkit variant process child frame
parameters separately.
* lisp/frame.el (frame--special-parameters): New const.
(frame--complete-parameter-value): New function.
(initial-frame-alist, minibuffer-frame-alist): Use them in
:type. (Bug#39143)
* lisp/cus-start.el (default-frame-alist): Use them here as well.
* src/frame.c (frame_parms): Add comment to try to keep
frame--special-parameters updated.
* src/frame.c (frame_inhibit_resize): Handle new value 'force'
for 'frame-inhibit-implied-resize' (Bug#76275).
(frame_inhibit_implied_resize): New value 'force' to inhibit
implied resizing while a new frame is made.
* lisp/cus-start.el (frame-inhibit-implied-resize): Make new
value 'force' customizable.
* doc/lispref/frames.texi (Implied Frame Resizing): Describe new
value 'force' of 'frame-inhibit-implied-resize'.
* etc/NEWS: Announce new value 'force' of
'frame-inhibit-implied-resize'.
* src/frame.h (FRAME_REDISPLAY_P): Remove. Use the new function
frame_redisplay_p instead. Extern frame_redisplay_p.
* src/frame.c (frame_redisplay_p): New function to replace
FRAME_REDISPLAY_P macro.
(make_terminal_frame): Don't tinker with frame visibility and
don't make the new frame the terminal's top frame.
(do_switch_frame): Make sure frame switched to and any of its
ancestors are visible. Don't reset the visibility of other
frames.
(other_frames): Do not assume tty frames are by default visible.
(Fmake_frame_invisible): When making the selected tty frame
invisible, explicitly select the next visible frame.
* src/dispnew.c (Fredraw_display): Use frame_redisplay_p instead
of FRAME_REDISPLAY_P.
* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use frame_redisplay_p instead of
FRAME_REDISPLAY_P.
* src/keyboard.c (tty_read_avail_input): When storing an event
and the selected frame is a child frame whose root is its
terminal's top frame, set the frame_or_window slot to the child
frame since otherwise the next switch frame event will select
the top frame instead.
* src/frame.c (delete_frame): Remove a local with UNINIT that is
no longer needed now that GCC bug#85563 is fixed, as we don’t
need to worry about porting --enable-gcc-warnings to older GCC.
This change reverts this part of my commit
“Port --enable-gcc-warnings to GCC 8”
8c3215e7a4
dated Sat Apr 28 16:49:24 2018 -0700.
* src/frame.c (make_frame): Handle 'expose-hidden-buffer'.
(expose-hidden-buffer): New variable to handle hidden buffers.
* src/buffer.c (Fother_buffer): Mention that it does not return
a hidden buffer.
* lisp/frame.el (make-frame): In doc-string describe handling
of hidden buffers.
* doc/lispref/frames.texi (Creating Frames): Explain handling
of hidden buffers in description of 'make-frame'.
From a suggestion by Pip Cet.
* src/alloc.c (make_formatted_string): Omit first argument,
to simplify the calling convention. All callers changed.
* src/doprnt.c (doprnt): Also support %u. Update doc.
67903f5909 Restore the old behavior of `bookmark-write-file'
062da7003f ; Improve prompts and error messages in 'info-look'
52dc01f1c8 ; * admin/admin.el (set-version): Note about Android.
fb282da2a0 Avoid double spaces around abbrevations in Texinfo
bc1ab8ac3d ; * doc/emacs/custom.texi (Init Rebinding): Fix spacing.
b41ef43af1 ; Fix previous change
5638b1d6bd Ispell: Use "personal dictionary" terminology consistently
cc791e7499 ; Check man pages for mistakes less frequently
4ed4792e3b ; * admin/release-process: Minor copy-edits.
4a867c823b Add language server "ruff server" for Python
9e687c2871 Fix go-ts-mode type declaration indentation (Bug#75785)
f751b3afa4 ; Minor improvements for doc strings in map.el
cda78edc7d ; Fix typos
ce50a1d3c1 ; * src/w32.c (w32_memory_info): Fix coding style of last...
58d3d4820a Fix bug in w32_memory_info
7738641205 Avoid crashes in redisplay due to problematic font setups
0e3687e600 Improve 'key-valid-p' docstring
9878092d2b Minor copyedits in internals.texi
4726900fdc Better document side-effect free and pure C functions
04c475a39f ; Fix documentation about faces of tool-tip text
# Conflicts:
# admin/codespell/codespell.exclude
Since the introduction of the 'calln' macro, the 'call1', 'call2', ...,
'call8' macros are just aliases for the former. This is slightly
misleading and potentially unhelpful. The number of arguments N can
also easily go out-of-synch with the used alias callN. There is no
reason not to replace these aliases with using 'calln' directly.
To reduce the risk for mistakes, the tool Coccinelle was used to make
these changes. See <https://coccinelle.gitlabpages.inria.fr/website/>.
* src/alloc.c, src/androidvfs.c, src/androidfns.c, src/buffer.c:
* src/callint.c, src/callproc.c, src/casefiddle.c, src/charset.c:
* src/chartab.c, src/cmds.c, src/coding.c, src/composite.c:
* src/data.c, src/dbusbind.c, src/dired.c, src/doc.c:
* src/emacs.c, src/eval.c, src/fileio.c, src/filelock.c:
* src/fns.c, src/frame.c, src/gtkutil.c, src/haikufns.c:
* src/haikumenu.c, src/image.c, src/insdel.c, src/intervals.c:
* src/keyboard.c, src/keymap.c, src/lisp.h, src/lread.c:
* src/minibuf.c, src/nsfns.m, src/nsselect.m, src/pgtkfns.c:
* src/pgtkselect.c, src/print.c, src/process.c, src/sort.c:
* src/syntax.c, src/textconv.c, src/textprop.c, src/undo.c:
* src/w32fns.c, src/window.c, src/xfaces.c, src/xfns.c:
* src/xmenu.c, src/xselect.c, src/xterm.c:
Replace all uses of 'call1', 'call2', ..., 'call8' with 'calln'.
* src/dispextern.h (root_frame):
* src/frame.h (root_frame): Move declaration from dispextern.h
to frame.h.
(SET_FRAME_VISIBLE): Whend making the selected tty child frame
invisible, use mru_rooted_frame to find a frame to switch to.
* src/dispnew.c (root_frame): Move root_frame to frame.c.
* src/frame.c (do_switch_frame): On ttys don't change the
top frame when switching from a child frame to another frame
with the same root.
(root_frame): Move here from dispnew.c.
(Fframe_root_frame): New Lisp function.
(delete_frame): Whend deleting the selected tty child frame use,
mru_rooted_frame to find a frame to switch to.
* src/window.c (mru_rooted_frame): New function.
* src/window.h (mru_rooted_frame): Declare it.
* doc/lispref/frames.texi (Child Frames): Describe new function
'frame-root-frame'.
* src/frame.c (frame_inhibit_resize): Under GTK do not inhibit
implied resizing as long as the tool bar has not been drawn yet
so the frame gets its intended initial height (Bug#74750).
* src/gtkutil.c (update_frame_tool_bar): Set tool_bar_resized
slot of frame f to true regardless of whether a tool bar was
made or not. This will make inhibiting implied resizes work
again from now on.
This is basically a workaround for running a test in batch mode
which should have a tty frame available but doesn't.
* src/frame.c (check_tty): Relax check if noninteractive.
* lisp/xt-mouse.el (xterm-mouse-event): Don't use frame-at if
noninteractive.
* src/dispnew.c (change_frame_size): Do not propagate changes to
child frames to root frames and vice versa.
* src/frame.c (adjust_frame_size): Do not change video modes
in resizing a child frame.
* src/conf_post.h (ENOTSUP): Define to ENOSYS as msdos.h once
did.
(IFTODT): Copy definition from Gnulib.
* src/dispnew.c (is_tty_frame): Also test FRAME_MSDOS_P.
* src/frame.c (tty_child_pos_param, tty_child_size_param):
Export functions.
* src/msdos.c (mouse_get_xy, mouse_moveto, mouse_pressed):
Offset mouse positions by those of the selected frame.
(it_face_override): New function.
(IT_set_face): New argument F. Load FACE_ID from its face
cache.
(IT_write_glyphs): Track the frames on which glyphs were
generated and apply faces from their individual face caches.
(IT_write_glyphs_with_face): New function.
(tty_draw_row_with_mouse_face): Reimplement in line with tty.c
and eliminate an obsolete optimization.
(IT_clear_end_of_line, IT_clear_screen): Load faces from the
cache of the provided frame.
(IT_set_frame_parameters): Adjust frame geometry and garbage
frames after geometry parameters change as a child frame.
(BUILD_CHAR_GLYPH): Accept new parameter F.
(IT_menu_display): Offset cursor positions by those of the
selected frame.
* src/msdos.h (ENOTSUP): Move to conf_post.h for Gnulib.
* src/xdisp.c (redisplay_internal): Redisplay MSDOS frames
unconditionally as with terminal frames.
Add support for child frames on tty
The redisplay part is complete. The frame-handling part supports
use-cases like Posframe, Corfu, and child frames acting like tooltips.
Other use-cases of child frames are not currently supported. In
particular, trying to create minibuffer-only child frames on ttys will
signal an error.
* src/xfaces.c (free_frame_faces): Change formatting slightly.
* src/xdisp.c (redisplay_trace, move_tracxe): Print to stderr because
stdout screws up terminal display.
(init_iterator): Remove a #ifdef HAVE_WINDOW_SYSTEM.
(clear_garbaged_frames): Return a bool telling if we cleared matrix.
(echo_area_display): Use combine_updates on tty frames.
(redisplay_internal): Changes for redisplay of tty child windows.
(deep_copy_glyph_row): Take a frame parameter.
(display_tty_menu_item): Changes because of function signature changes.
* src/w32term.c (w32_read_socket): Don't use FRAME_OBSCRURED_P,
which has been removed.
* src/w32inevt.c (do_mouse_event): Workaround for mouse events on
child frafmes.
* src/w32console.c (w32con_write_glyphs, w32con_update_end):
Use glyphs' frame for faces.
* src/treesit.c (treesit_load_language): Pacify a warning.
* src/w32console.c (w32con_clear_end_of_line): Set glyph's frame.
* src/terminal.c (cursor_to, raw_cursor_to): Handle case that
frame is a child frame.
* src/termhooks.h: Declare formerly static functions.
* src/term.c (tty_hide_cursor, tty_show_cursor): Make externally
visible.
(tty_write_glyphs): Determine faces based on a glyph's frame.
(tty_write_glyphs_with_face): Take a struct face argument instead
of a face id. Callers changed.
(tty_insert_glyphs): Use faces, not face ids.
(append_glyph, append_composite_glyph, append_glyphless_glyph):
Set glyph's frame.
(turn_on_face, turn_off_face): Take face argument instead of face
id. Callers adapted.
(Fresume_tty): Act on root frame.
(tty_draw_row_with_mouse_face): Handle child frames.
(restore_desired_matrix): Make sure glyphs' is live.
(set_tty_hooks): Set terminal's frame_raise_lower_hook.
(tty_frame_geometry, Ftty_frame_geometry, Ftty_frame_edges)
(Ftty_frame_list_z_order, Ftty_frame_restack)
(tty_display_dimension, Ftty_display_pixel_width)
(Ftty_display_pixel_height): New functions.
(syms_of_term): Defsubr new Lisp functions.
* src/minibuf.c (read_minibuf): Use combine_updates for tty
frames.
* src/frame.h (struct frame): Always define parent_frame. Change
'visible' to be a boolean. Always define 'undecorated' and
'no_accept_focus'. Add 'z_order'.
(FRAME_OBSCURED_P): Removed.
(FRAME_PARENT_FRAME): Make it a function.
(SET_FRAME_VISIBLE): Take a bool parameter, not an int.
(FRAME_INTERNAL_BORDER_WIDTH): Don't special-base HAVE_WINDOW_SYSTEM.
* src/frame.c (decode_tty_frame): New function.
(set_menu_bar_lines): Set menu bar lines and height to 0 for tty
child frames. Compute min height differently.
(adjust_frame_size): Set FrameCols/Rows only for root tty frames.
Mark tty root frame garbaged if child frame is adjusted. Run some
code even if not HAVE_WINDOW_SYSTEM.
(make_frame): Run some code even if not HAVE_WINDOW_SYSTEM.
(make_terminal_frame): Implement child frame creation.
(tty_child_pos_param, tty_child_size_param)
(tty_child_frame_rect): New functions.
(Fmake_terminal_frame): Parts rewritten for child frames.
(do_switch_frame): Add child frame support.
(Fframe_ancestor_p): Define if not HAVE_WINDOW_SYSTEM.
(Fmake_frame_visible, Fmake_frame_invisible)
(Fframe_visible_p, Fraise_frame):
Handle tty frames differently.
(store_frame_param): Signal error if trying to re-parent a tty
child frame.
(Fframe_parameters): Report some additional tty frame parameters.
(Fmodify_frame_parameters): Handle tty child frames.
(Fset_frame_position): Ditto.
(frame_parms): Define index for additional frame parameters.
(handle_frame_param): New function.
(gui_set_frame_parameters_1): Use handle_frame_param.
* src/disptab.h (DISP_TABLE_EXTRA_SLOTS): Change to 12.
(enum box): New enumeration.
* src/dispnew.c (check_rows): New function, #if 0.
(frame_matrix_frame): Variable removed.
(line_hash_code): Take glyph's frame into account.
(build_frame_matrix_from_leaf_window): Do not copy glyphs from
rows that aren't enabled.
(fill_up_glyph_row_with_spaces): Add frame parameter, uses
changed.
(fill_up_glyph_row_area_with_spaces): Add frame parameter. Set
glyph's frame to it.
(fill_up_frame_row_with_spaces): Ditto.
(set_frame_matrix_frame): Function removed.
(make_current): Change signature. Callers changed.
(mirrored_line_dance): Take a frame argument, not a matrix.
(redraw_frame): Don't clear_frame a child frame.
(struct rect): New.
(rect_intersect, frame_pos_abs, frame_rect_abs, root_frame)
(max_child_z_order, is_frame_ancestor, frames_with_root)
(frames_with_parent, frame_z_order_cmp, Fframe__z_order_lessp)
(frames_in_reverse_z_order, tty_raise_lower_frame, is_tty_frame)
(is_tty_child_frame, is_tty_root_frame, first_enabled_row)
(make_matrix_current, prepare_desired_root_row)
(make_glyph_space, neutralize_wide_char, produce_box_glyphs)
(produce_box_sides, produce_box_line, copy_child_glyphs)
(update_window_frame, update_initial_frame, flush_terminal)
(abs_cursor_pos, is_in_matrix, is_cursor_obscured)
(terminal_cursor_magic, combine_updates_for_frame)
(combine_updates): New functions.
(update_frame): Rewritten.
(Fdisplay__update_for_mouse_movement): Take a MOUSE_FRAME param.
(syms_of_display): New symbol frame--z-order--lessp, tty-non-selected-cursor.
New subr Sframe__z_order_lessp. Provide tty-child-frames.
* src/dispextern.h (struct glyph): Add member 'frame'.
(CHAR_GLYPH_SPACE_P): Add FRAME parameter. All uses changed.
(GLYPH_EQUAL_P): Compare glyphs' frame.
(SET_CHAR_GLYPH): Add parameter FRAME.
(SET_CHAR_GLYPH_FROM_GLYPH): Ditto.
* src/chartab.c (Fmake_char_table): Allow more than 10 display
table slots.
* lisp/xt-mouse.el (xterm-mouse--handle-mouse-movement): Use new
terminal parameter xterm-mouse-frame.
(xterm-mouse-position-function): Ditto.
(xterm-mouse-event): Determine frame under mouse and compute
frame-relative coordinates. Set terminal parameter
xterm-mouse-frame.
* lisp/tty-tip.el: New file implementing tooltip for ttys.
* lisp/paren.el (show-paren-function): Don't check if
display-graphics-p when using child frames.
* lisp/frame.el (frame-at): New function.
(tty-frame-geometry, tty-frame-edges, tty-frame-restack)
(tty-display-pixel-height, tty-frame-list-z-order)
(tty-display-pixel-width): Declare C function.
(frame-geometry): Use tty-frame-geometry.
(frame-edges): Use tty-frame-edges.
(frame-list-z-order): Use tty-frame-list-z-order.
(frame-restack): Use tty-frame-restack.
(display-pixel-height): Use tty-display-pixel-height.
(display-pixel-width): Use tty-display-pixel-width.
* lisp/disp-table.el (display-table): Increase size to 12.
(box-horizontal, box-vertical, box-down-right, box-down-left)
(box-up-right, box-up-left): New display table slot names for
box-drawing characters.
(display-table-slot, set-display-table-slot): Extend doc string.
(describe-display-table): Display new display table slots.
(standard-display-unicode-special-glyphs): New function setting
up Unicode characters for display table entries.
* .gitignore: Don't ignore patch files, they are useful to see in
Magit status buffer when applying patches (git am).
* src/frame.c (gui_set_scroll_bar_width)
(gui_set_scroll_bar_height): When the new size equals the old one
do not reset size to default size (Bug#74435).
This is based on a diff from 2024-10-15 which still applied.
Since then, I've inadvertantly modified the igc branch so that
it is no longer possible to get a clean diff of what has changed
since I created the branch.