1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

1243 commits

Author SHA1 Message Date
Sean Whitton
2aef2951c0 ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/lispref/elisp.texi (Top):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/TODO:
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* src/frame.c (do_switch_frame):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test): Say "Lisp"
not "Elisp".
* lisp/progmodes/peg.el (peg-translate-exp): Say "Emacs Lisp"
not "Elisp".
2025-03-12 10:24:22 +08:00
Sean Whitton
60c0524ad2 Fix capitalization ELisp -> Elisp
* configure.ac (libgccjit_not_found_err)
(libgccjit_dev_not_found_err):
* doc/emacs/buffers.texi (List Buffers):
* doc/lispref/elisp.texi (Tree-sitter C API):
* doc/lispref/functions.texi (What Is a Function):
* doc/lispref/parsing.texi (Parsing Program Source)
(Tree-sitter C API):
* doc/misc/gnus.texi (The Gnus Registry):
* etc/DEBUG:
* etc/NEWS:
* etc/NEWS.25:
* etc/NEWS.26:
* etc/NEWS.28:
* etc/NEWS.30:
* etc/TODO:
* lib-src/emacsclient.c (print_help_and_exit):
* lisp/auth-source.el (auth-source-search):
* lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode):
* lisp/cedet/semantic/wisent/comp.el
(wisent-automaton-lisp-form):
* lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict):
* lisp/editorconfig.el
(editorconfig-get-local-variables-functions):
* lisp/emacs-lisp/bindat.el (bindat-type):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
* lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure):
* lisp/emacs-lisp/cl-macs.el (cl--labels-convert):
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs)
(lisp-fill-paragraphs-as-doc-string):
* lisp/emacs-lisp/macroexp.el (macroexp--fgrep):
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper):
* lisp/emacs-lisp/re-builder.el:
* lisp/erc/erc-button.el (erc-emacswiki-lisp-url):
* lisp/help-fns.el
(help-fns--describe-function-or-command-prompt):
* lisp/menu-bar.el (menu-bar-search-documentation-menu):
* lisp/net/tramp-message.el (tramp-debug-font-lock-keywords):
* lisp/org/org-capture.el (org-capture):
* lisp/org/org.el (org-category, org-todo):
* lisp/org/ox.el (org-export-async-start):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/peg.el (peg-translate-exp):
* lisp/progmodes/ruby-ts-mode.el:
* lisp/woman.el (woman-mode, woman-parse-numeric-arg):
* src/chartab.c (map_char_table_for_charset):
* src/fns.c (extract_data_from_object):
* src/frame.c (do_switch_frame):
* src/keyboard.c (make_lispy_event):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments):
* test/lisp/emacs-lisp/shortdoc-tests.el
(shortdoc-help-fns-examples-function-test):
* test/manual/etags/c-src/emacs/src/keyboard.c
(make_lispy_event): Fix capitalization ELisp -> Elisp.
2025-03-12 09:38:33 +08:00
Martin Rudalics
cbad6215cf Fix handling of frame position values
* 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.
2025-03-10 09:33:17 +01:00
Mauro Aranda
0861da138b Provide better completion for customizing frame parameters
* 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.
2025-03-09 19:07:40 -03:00
Eli Zaretskii
d2445c8c23 Fix crash in daemon when "C-x C-c" while a client frame shows tooltip
* src/frame.c (delete_frame): Ignore tooltip frames when looking
for other frames on the same terminal.  (Bug#76842)
2025-03-08 11:31:22 +02:00
Martin Rudalics
be60601ae8 Clarify semantics of 'frame-inhibit-implied-resize'
* src/frame.c (frame_inhibit_implied_resize):
* doc/lispref/frames.texi (Implied Frame Resizing): Clarify
semantics of 'frame-inhibit-implied-resize'.
2025-02-24 09:47:30 +01:00
Eli Zaretskii
70b15c5174 ; Fix last change
* src/frame.c (syms_of_frame) <frame-inhibit-implied-resize>:
* doc/lispref/frames.texi (Implied Frame Resizing): Don't use
passive voice.  (Bug#76275)
2025-02-23 12:25:14 +02:00
Martin Rudalics
499da9e1a9 Optionally inhibit implied resizing while frame is made (Bug#76275)
* 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'.
2025-02-23 11:01:20 +01:00
Stefan Kangas
702cb123fa ; Fix typos 2025-02-22 14:48:29 +01:00
Gerd Möllmann
1194ebe3a7 Handle nil top frame (bug#76410)
* src/frame.c (do_switch_frame): Don't assume that top_frame is always a
frame, it can be nil.
2025-02-19 08:05:56 +01:00
Martin Rudalics
4d1ceac9f9 Fix handling of visibility on tty frames (Bug#76031)
* 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.
2025-02-10 10:36:38 +01:00
Paul Eggert
4aab2f45b3 Remove no-longer-needed delete_frame UNINIT
* 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.
2025-02-04 16:57:42 -08:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Martin Rudalics
7f01dd8906 New variable 'expose-hidden-buffer' (Bug#75828)
* 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'.
2025-01-28 16:59:45 +01:00
Gerd Möllmann
d60198d7a4 Fix frame-visible-p for tty root frames
* src/frame.c (Fframe_visible_p): Don't unconditionally return t for tty
root frames.
2025-01-28 04:39:59 +01:00
Paul Eggert
f885806fdf Simplify make_formatted_string API
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.
2025-01-26 23:05:50 -08:00
Gerd Möllmann
35d3927859 Change doc string of frame-visible-p
* src/frame.c (Fframe_visible_p): Don't say it always returns t for tty
frames.
2025-01-25 21:20:55 +01:00
Eli Zaretskii
6016967e85 Merge from origin/emacs-30
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
2025-01-25 10:06:19 -05:00
Gerd Möllmann
076cd69fc2 Don't forget setting the top frame if not switching root frames
* src/frame.c (do_switch_frame): Make sure to set top frame in all
cases.
2025-01-23 11:09:19 +01:00
Gerd Möllmann
b1ec006e9f Fix setting a tty's top frame when switching frames
* src/frame.c (do_switch_frame): Compare root frames correctly.
2025-01-23 07:54:48 +01:00
Stefan Kangas
251e3d2654 Replace call[1-8] with calln
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'.
2025-01-19 14:29:41 +01:00
Eli Zaretskii
04c475a39f ; Fix documentation about faces of tool-tip text
* lisp/tooltip.el (tooltip):
* src/frame.c (syms_of_frame) <use-system-tooltips>: Doc fixes.
2025-01-18 15:07:52 +02:00
Martin Rudalics
d4aeb6bd23 Handle removal of selected tty child frame
* 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'.
2025-01-14 09:51:17 +01:00
Martin Rudalics
b7dc4ba213 Fix handling of 'minibuffer' frame parameter for tty frames
* src/frame.c (make_terminal_frame): Fix handling of
'minibuffer' frame parameter for tty child frames.  Support
'minibuffer-only' child frames.
2025-01-11 18:07:21 +01:00
Robert Pluim
8e9ad92a14 Protect Vframe_list updating from interruptions
* src/frame.c (delete_frame): When deleting the frame from
Vframe_list, block input, since input can arrive whilst we're
running lisp  (Bug#74902).
2025-01-10 16:09:34 +01:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Martin Rudalics
dbf22fd0d0 On GTK do not inhibit implied resizing until tool bar was drawn (Bug#74750)
* 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.
2024-12-20 16:25:44 +01:00
Gerd Möllmann
82c3fcd17e Allow xt-mouse-tests to run
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.
2024-12-20 07:03:59 +01:00
Po Lu
3cb86eb038 Enable adjusting frame sizes on MS-DOS
* 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.
2024-12-20 11:22:22 +08:00
Po Lu
cc5afea98e Enable TTY child frames on MS-DOS
* 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.
2024-12-20 11:12:22 +08:00
Po Lu
e166803f8c Fix the Android port
* src/dispnew.c (terminal_cursor_magic)
(combine_updates_for_frame): Disable unused code on Android.

* src/frame.c (tty_child_frame_rect): Define out on Android.
2024-12-20 08:39:29 +08:00
Gerd Möllmann
8aef5d224a Merge branch 'scratch/tty-child-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).
2024-12-19 10:14:16 +01:00
Martin Rudalics
b5ba5cbacf Don't inhibit resizing when making a new frame (Bug#74750)
* src/frame.h (struct frame): Remove inhibit_horizontal_resize
and inhibit_vertical_resize slots.
* src/frame.c (frame_inhibit_resize, make_frame)
(Fframe_after_make_frame, gui_figure_window_size): Remove all
operations on frame's inhibit_horizontal_resize and
inhibit_vertical_resize slots (Bug#74750).
2024-12-16 16:36:59 +01:00
Pip Cet
afd61deaae Pure storage removal: Remove purecopy hash table flag
* lisp/emacs-liqsp/comp.el (comp--jump-table-optimizable): Adjust
comment.
* src/category.c (hash_get_category_set):
* src/emacs-module.c (syms_of_module):
* src/fns.c (make_hash_table): Remove 'purecopy' flag and update
docstring.
(Fmake_hash_table): Ignore ':purecopy' argument.
* src/frame.c (make_frame):
* src/image.c (xpm_make_color_table_h):
* src/lisp.h (struct Lisp_Hash_Table): Drop 'purecopy' flag.
* src/pdumper.c (dump_hash_table): Don't dump 'purecopy' flag.
* src/print.c (print_object): Don't print 'purecopy' flag

* src/json.c (json_parse_object):
* src/lread.c (readevalloop, read_internal_start):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/profiler.c (export_log):
* src/xfaces.c (syms_of_xfaces):
* src/xterm.c (syms_of_xterm): Adjust calls to 'make_hash_table'.
2024-12-12 22:48:12 +01:00
Pip Cet
5ec8696663 Pure storage removal: Replace calls to removed functions
* src/alloc.c (string_bytes, pin_string, valid_lisp_object_p)
(process_mark_stack, survives_gc_p, syms_of_alloc):
* src/androidterm.c (android_term_init): Replace call to
'build_pure_c_string'.
* src/buffer.c (init_buffer_once, syms_of_buffer):
* src/bytecode.c (exec_byte_code):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/category.c (Fdefine_category):
* src/coding.c (syms_of_coding):
* src/comp.c (Fcomp__compile_ctxt_to_file0)
(maybe_defer_native_compilation, syms_of_comp):
* src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/doc.c (Fsnarf_documentation):
* src/emacs-module.c (syms_of_module):
* src/eval.c (Finternal__define_uninitialized_variable)
(Fdefconst_1, define_error, syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table):
* src/fontset.c (syms_of_fontset):
* src/frame.c (make_initial_frame):
* src/haikufns.c (syms_of_haikufns):
* src/intervals.c (create_root_interval):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent)
(store_in_keymap, syms_of_keymap):
* src/lisp.h:
* src/lread.c (Fload, read0, intern_c_string_1, define_symbol)
(Fintern, defsubr, syms_of_lread):
* src/pdumper.c (Fdump_emacs_portable):
* src/pgtkfns.c (syms_of_pgtkfns):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sqlite.c (syms_of_sqlite):
* src/syntax.c (syms_of_syntax):
* src/treesit.c (syms_of_treesit):
* src/w32fns.c (syms_of_w32fns):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xftfont.c (syms_of_xftfont):
* src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE',
'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list',
'pure_listn', etc., by impure equivalents.
2024-12-12 22:48:11 +01:00
Gerd Möllmann
6fa2050ee7 Signal errors for unimplemented features
* src/frame.c (make_terminal_frame): Error for minibuffer-only frames.
* src/term.c (Ftty_frame_restack): Signal error.
2024-12-12 08:02:33 +01:00
Martin Rudalics
bda0bce9e4 Don't inadvertently reset frame scroll bar sizes (Bug#74435)
* 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).
2024-11-28 18:53:45 +01:00
Gerd Möllmann
33f1ab5034 * src/frame.c (make_terminal_frame): Check parent is live. 2024-11-05 10:43:24 +01:00
Gerd Möllmann
5cc5fa79bf Some cleanup of frame_parm_table
* src/frame.c (frame_parms): Use built-in symbols for all entries.
(syms_of_frame): Check that entries are valid built-in symbols.
2024-10-23 05:06:15 +02:00
Eli Zaretskii
4ef5ade5da Fix commenting conventions. 2024-10-22 05:42:05 -04:00
Eli Zaretskii
9accfc24bc Fix compilation warnings
* src/frame.c (tty_child_size_param):
* src/frame.h (MOUSE_HL_INFO): Avoid NULL dereference warnings.
2024-10-22 04:56:19 -04:00
Gerd Möllmann
fbe63a33f1 Comment 2024-10-22 06:40:20 +02:00
Gerd Möllmann
4a3ba42e6f Comment 2024-10-22 06:40:20 +02:00
Gerd Möllmann
0012e555d9 Don't set internal_last_event_frame to nil
* src/frame.c (do_switch_frame): Do not set internal_last_event_frame to
nil on ttys.
2024-10-22 06:40:20 +02:00
Gerd Möllmann
6aa203bb04 Minor refactoring 2024-10-22 06:40:20 +02:00
Gerd Möllmann
23409041b1 Accept frame param width/height of 0
* src/frame.c (tty_child_size_param): Accept values of 0.
2024-10-22 06:40:20 +02:00
Gerd Möllmann
55b72ad875 Set top terminal frame also to children
* src/frame.c (make_terminal_frame): Don't check for being root when
setting top_frame.
2024-10-22 06:40:20 +02:00
Gerd Möllmann
414de92a56 Initial child frames based on master
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.
2024-10-22 06:40:19 +02:00
Po Lu
b8affdb7b5 * src/frame.c (gui_set_font): Reference image cache after reassignment. 2024-06-20 17:20:23 +08:00