aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Additional fixes for 'get-mru-frame' (Bug#80397)Martin Rudalics4 days1-1/+2
| | | | | | * src/frame.c (delete_frame): Call 'get-mru-frame' safely and with EXCLUDE-FRAME argument set up correctly. * lisp/frame.el (get-mru-frames, get-mru-frame): Fix doc-strings.
* Fix segfault introduced by recent 'get-mru-frame' changeMartin Rudalics5 days1-1/+2
| | | | | * src/frame.c (delete_frame): Fix segfault when deleting a frame and 'get-mru-frame' returns that frame.
* New user option 'after-delete-frame-select-mru-frame' (bug#80397)Stéphane Marks2026-02-221-1/+10
| | | | | | | | | | | | Users can revert to the old 'delete-frame' behavior of selecting the oldest frame in 'frame-list' rather than the most-recently used frame. * src/frame.c (delete_frame): Consult 'after-delete-frame-select-mru-frame'. (syms_of_frame): New defvar 'after-delete-frame-select-mru-frame'. * etc/NEWS: Reflect the new user option.
* Add frame-use-time, get-mru-frame, use mru frame in delete-frame (bug#80397)Stéphane Marks2026-02-181-35/+56
| | | | | | | | | | * lisp/frame.el (get-mru-frame): New defun. * src/frame.c (delete_frame): Call 'get-mru-frame' (when force is not Qnoelisp) to select the most recently used frame that is not the deleted frame as the candidate to select. (syms_of_frame): Qget_mru_frame new DEFSYM. * doc/lispref/frames.texi: Document the new functions. * etc/NEWS: Announce the new functions.
* ; * src/dispnew.c (box_default): Shut up compilation warnings (bug#80386).Eli Zaretskii2026-02-121-1/+1
|
* Avoid interference between child frame deletion and recenteringEli Zaretskii2026-01-291-0/+27
| | | | | | | | | * src/frame.c (delete_frame) [HAVE_X_WINDOWS]: Block input while child frame is displayed, and process the X events triggered by that later. Patch by Byakuren (https://web.liminal.cafe/~byakuren/). (Bug#76186) Copyright-paperwork-exempt: yes
* Support cons cell for 'line-spacing'Daniel Mendler2026-01-241-4/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce the change. * src/dispextern.h (struct glyph_row): Add 'extra_line_spacing_above' member. (struct it): Add 'extra_line_spacing_above' member. * src/frame.h (struct frame): Add 'extra_line_spacing_above' member. Update comment for 'extra_line_spacing.' * src/buffer.c (syms_of_buffer): Update the docstring of 'line-spacing' to describe the cons cell usage. * src/buffer.h (struct buffer): Update comment for 'extra_line_spacing'. * src/frame.c (gui_set_line_spacing): Handle cons cell value for 'line-spacing'. Calculate and set 'extra_line_spacing_above' for both integer and float pairs. * src/xdisp.c (init_iterator): Initialize 'extra_line_spacing_above' from buffer or frame 'line-spacing', handling cons cells for both integer and float values. (gui_produce_glyphs): Use 'extra_line_spacing_above' to distribute spacing between ascent and descent. Update 'max_extra_line_spacing' calculation. (resize_mini_window): Take line spacing into account when resizing the mini window. Pass height of a single line to 'grow_mini_window' and 'shrink_mini_window'. * src/window.c (grow_mini_window, shrink_mini_window): Add unit argument which defines height of a single line. * src/window.h (grow_mini_window, shrink_mini_window): Adjust function prototypes accordingly with unit argument. * lisp/subr.el (total-line-spacing): New function to calculate total spacing from a number or cons cell. (posn-col-row): Use total-line-spacing. * lisp/simple.el (default-line-height): Use 'total-line-spacing'. * lisp/textmodes/picture.el (picture-mouse-set-point): Use 'total-line-spacing'. * lisp/window.el (window-default-line-height): Use 'total-line-spacing'. (window--resize-mini-window): Take 'line-spacing' into account. * test/lisp/subr-tests.el (total-line-spacing): New test. * test/src/buffer-tests.el (test-line-spacing): New test. * doc/emacs/display.texi (Display Custom): Document that 'line-spacing' can be a cons cell. (Line Height): Document the new cons cell format for 'line-spacing' to allow vertical centering. Co-authored-by: Przemysław Alexander Kamiński <alexander@kaminski.se> Co-authored-by: Daniel Mendler <mail@daniel-mendler.de>
* Add frame identifiers (bug#80138)Stéphane Marks2026-01-131-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A unique frame id is assigned to a new or cloned frame, and reused on an undeleted frame. The id facilitates unambiguous identification among frames that share identical names or titles, deleted frames where a live frame object no longer exists that we can resurrect by id, for example via 'tab-bar-undo-close-tab'. It also aids debugging at the C level using the frame struct member id. Rewrite 'clone-frame' and 'undelete-frame' to not let bind variables that 'make-frame' uses to avoid conflicts with nested 'make-frame' calls, for example via 'after-make-frame-functions'. * lisp/frame.el (clone-frame, undelete-frame): Use 'frame--purify-parameters' to supply parameters explicitly. (undelete-frame--save-deleted-frame): Save frame id for restoration. (undelete-frame): Restore frame id. (frame--purify-parameters): New defun. (make-frame): Assign a new id for a new or cloned frame, reuse for undeleted frame. * src/frame.h (struct frame): Add id member. (frame_next_id): New extern. * src/frame.c (frame_next_id): New global counter. (frame_set_id, frame_set_id_from_params): New function. (Fframe_id): New DEFUN. (syms_of_frame <Sframe_id>): New defsubr. (syms_of_frame <Qinternal_id>): New DEFSYM. (syms_of_frame <frame_internal_parameters>): Add 'Qinternal_id'. * src/androidfns.c (Fx_create_frame): * src/haikufns.c (Fx_create_frame): * src/nsfns.m (Fx_create_frame): * src/pgtkfns.c (Fx_create_frame): * src/w32fns.c (Fx_create_frame): * src/xfns.c (Fx_create_frame): Call 'frame_set_id_from_params'. * doc/lispref/frames.texi: Add documentation. * etc/NEWS: Announce frame id.
* Fix crash where dead frame remains on list of live frames (Bug#80120)Martin Rudalics2026-01-111-3/+1
| | | | | | | * src/fns.c (delq_no_quit): New function. * src/lisp.h: Extern delq_no_quit. * src/frame.c (delete_frame): Call delq_no_quit to remove frame from Vframe_list uninterruptedly (Bug#80120).
* ; Fix doc-string of Fset_frame_positionMartin Rudalics2026-01-061-4/+5
| | | | | * src/frame.c (Fset_frame_position): In doc-string say that for a child frame X and Y are relative to FRAME's parent frame.
* Add frame parameters 'cloned-from' and 'undeleted' (bug#80104)Stéphane Marks2026-01-031-0/+4
| | | | | | | | | | | | * lisp/frame.el (clone-frame): Set the frame parameter 'cloned-from'. (undelete-frame): Set the frame parameter 'undeleted'. * src/frame.c (syms_of_frame): <Qcloned_from> <Qundeleted>: New DEFSYM. (syms_of_frame): Add 'Qcloned_from' and 'Qundeleted' to 'frame_internal_parameters'. * doc/lispref/frames.texi: Document these frame parameters. * etc/NEWS: Announce the new frame parameters.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* December 2025 spelling fixesPaul Eggert2025-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
* Add ns_set_window_size_and_positionStéphane Marks2025-12-241-1/+1
| | | | | | | | | * src/frame.c (Fset_frame_size_and_position_pixelwise): Correct docstring typo. * src/nsterm.m (compute_offset): New function of common code. (ns_set_offset): Call compute_offset. (ns_set_window_size_and_position): New function. (ns_create_terminal): Add new function to the hook.
* ; * src/frame.c (Fmake_frame_invisible): Don't skip setting frame invisible.Gerd Möllmann2025-12-231-5/+6
|
* Add functions to set frame size and position in one compound stepMartin Rudalics2025-12-221-2/+75
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/frame.el (set-frame-size-and-position): New function. * src/frame.c (adjust_frame_size): Handle requests to set size and position. (Fset_frame_size_and_position_pixelwise): New function. * src/gtkutil.c (xg_frame_set_size_and_position): New function. (xg_wm_set_size_hint): Handle any non-NorthWestGravity values for child frames only. Some GTK implementations don't like them. * src/gtkutil.h (xg_frame_set_size_and_position.): Add external declaration. * src/termhooks.h (set_window_size_and_position_hook): New hook. * src/w32term.c (w32_set_window_size_and_position): New function. (w32_create_terminal): Make it the Microsoft Windows API set_window_size_and_position_hook. * src/xterm.c (x_set_window_size_and_position_1) (x_set_window_size_and_position): New functions. (x_create_terminal): Make x_set_window_size_and_position the set_window_size_and_position_hook for the X protocol. * src/xterm.h (x_set_window_size_and_position): Add external declaration. * etc/NEWS: Announce new functions.
* Don't change visibility of tty root frames (Bug#80032)Martin Rudalics2025-12-201-18/+12
| | | | | | * src/frame.c (Fmake_frame_visible, Fmake_frame_invisible): * doc/lispref/frames.texi (Visibility of Frames): Don't change visibility of tty root frames. (Bug#80032)
* Don't make tty child frames visible when selected (bug#80020)Gerd Möllmann2025-12-191-10/+3
| | | | | | * src/frame.c (do_switch_frame): Don't change visibility of tty child frames. (Fraise_frame): Doc string fix.
* Fix some C symbol extern visibilityPaul Eggert2025-12-081-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make some C symbols static if they don’t need to be extern. Also, remove a couple of functions that were discovered to be unused as a result of this process, and mark two extern functions intended to be usable from GDB. * src/buffer.c (previous_overlay_change): * src/composite.c (composition_lisp_table): * src/fileio.c (file_name_directory): * src/frame.c (check_tty): * src/insdel.c (adjust_markers_for_insert): * src/keyboard.c (unread_switch_frame, read_char) (requeued_events_pending_p): * src/sysdep.c (renameat_noreplace) [!HAVE_ANDROID]: * src/textconv.c (get_conversion_field) [!HAVE_ANDROID]: * src/treesit.c (TREESIT_BOB_LINECOL, TREESIT_TS_POINT_1_0) (treesit_buf_tracks_linecol_p, make_treesit_parser) (make_treesit_node): * src/xdisp.c (x_y_to_hpos_vpos): * src/xfaces.c (load_color) [!MSDOS]: * src/xfns.c (x_real_pos_and_offsets): * src/xterm.c (x_dnd_do_unsupported_drop): Now static. Move up if necessary. * src/coding.c (utf8_string_p): * src/keyboard.c (detect_input_pending_ignore_squeezables): Remove; unused. * src/frame.c (gui_set_alpha): * src/textconv.c (start_batch_edit, end_batch_edit, commit_text) (finish_composing_text, set_composing_text) (set_composing_region, textconv_set_point_and_mark) (delete_surrounding_text, request_point_update) (textconv_barrier, replace_text, get_extracted_text) (get_surrounding_text): * src/xdisp.c (gui_union_rectangles): * src/xterm.c (xi_frame_selected_for): Define only if needed. * src/treesit.c (treesit_debug_print_parser_list) (treesit_debug_print_linecol): Declare EXTERNALLY_VISIBLE. * src/xdisp.c (x_y_to_column_row): New function, defined only if needed. All external callers to x_y_to_hpos_vpos changed.
* Fix root frame check in store_frame_param (Bug#79947)Martin Rudalics2025-12-061-10/+20
| | | | | | | * src/frame.c (store_frame_param): Make sure 'minibuffer', 'parent-frame' and 'delete-before' parameters reference frame on same terminal. Spare GUI frames when checking root frames of tty frames and their surrogate minibuffer frames (Bug#79947).
* Support `toolkit-theme-set-functions' on Android and execute hooks safelyPo Lu2025-11-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (setEmacsParams): New arg UIMODE. (sendConfigurationChanged): New args DETAIL and UI_MODE. * java/org/gnu/emacs/EmacsNoninteractive.java (main1): Provide an undefined UI mode. * java/org/gnu/emacs/EmacsService.java (EmacsService): New field uiMode. (onCreate): Initialize this field at start-up and provide the same to setEmacsParams. (onConfigurationChanged): If the UI mode has been altered, generate a configuration changed event to match. * src/android.c (android_ui_mode): New variable. (setEmacsParams): New argument UI_MODE. Initialize the same from this variable. * src/androidgui.h (enum android_configuration_changed): New enum. (struct android_configuration_changed_event): New field `DETAIL'. Convert fields providing specifics into a union of display density information and a UI mode integer. * src/androidterm.c (handle_one_android_event): Handle both manners of configuration change events. (android_term_init): Initialize Vtoolkit_theme from UI mode provided at start-up. * src/frame.c (syms_of_frame): Always define Vtoolkit_theme. Define Qtoolkit_theme_set_functions. * src/gtkutil.c (xg_update_dark_mode_for_all_displays): * src/w32term.c (w32_read_socket): Generate special toolkit theme events, rather than executing hooks directly within the read_socket callback. * src/keyboard.c (kbd_buffer_get_event) <TOOLKIT_THEME_CHANGED_EVENT>: Run Qtoolkit_theme_set_functions and set Vtoolkit_theme from event->ie.arg. * src/termhooks.h (enum event_kind): New event TOOLKIT_THEME_CHANGED_EVENT.
* Add `toolkit-theme' and 'toolkit-theme-set-functions'Ahmed Khanzada2025-11-221-0/+13
| | | | | | | | | | | | | | | * etc/NEWS: Document `toolkit-theme' and 'toolkit-theme-set-functions' * lisp/frame.el: Add 'toolkit-theme-set-functions' * src/frame.c: Add `toolkit-theme' Elisp variable * src/gtkutil.c: (xg_update_dark_mode_for_all_displays): Set `toolkit-theme' and call 'toolkit-theme-set-functions' * src/w32fns.c: (w32_applytheme): Send WM_EMACS_SET_TOOLKIT_THEME message to Lisp thread. * src/w32term.h: Declare WM_EMACS_SET_TOOLKIT_THEME * src/w32term.c: (w32_read_socket): Receive WM_EMACS_SET_TOOLKIT_THEME message and set `toolkit-theme' and call 'toolkit-theme-set-functions'
* ; Fix documentation of a recent commitEli Zaretskii2025-11-021-4/+4
| | | | | | | | * doc/emacs/frames.texi (Frame Commands): Document 'alter-fullscreen-frames', which is a user option. Fix indexing. * src/frame.c (syms_of_frame) <alter-fullscreen-frames>: Doc fix. (Bug#79756)
* Handle resizing of fullscreen frames more consistently (Bug#79704)Martin Rudalics2025-11-021-0/+44
| | | | | | | | | | | | | | | | * src/frame.c (adjust_frame_size): Honor new option 'alter-fullscreen-frames'. (syms_of_frame) <alter-fullscreen-frames>: New option to maintain consistent state when attempting to resize fullscreen frames. Default to 'inhibit' for NS builds because these resized the frame while leaving the 'fullscreen' parameter alone (Bug#79704). (syms_of_frame) <Qinhibit>: Define symbol. * lisp/cus-start.el (standard): Add customization options for 'alter-fullscreen-frames' * doc/lispref/frames.texi (Frame Size): Describe new option 'alter-fullscreen-frames'. * etc/NEWS: Call out new option 'alter-fullscreen-frames'.
* ; * src/frame.c (frame_get): Fix a thinko.Eli Zaretskii2025-10-221-1/+1
|
* Allow renaming of frames to F<num> on text terminalsAlan Mackenzie2025-10-221-7/+35
| | | | | | | | | | | | | This fixes bug#79649. Creating duplicate names F<num> is prevented, ensuring that select-frame-by-name is still effective on text terminals. * src/frame.c (frame_get, frame_next_F_name): New functions. (make_terminal_frame): Use frame_next_F_name. (set_term_frame_name): In place of disallowing F<num>, check that the requested F<num> doesn't already exist. * etc/NEWS (Frames): Add an entry for this amendment.
* Add frame parameter which allows border transparencyGarklein2025-07-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new 'borders-respect-alpha-background' frame parameter, when set to 't', will make window dividers and internal borders respect the 'alpha-background' frame parameter. This allows transparent gaps between windows. * doc/lispref/frames.texi (Font and Color Parameters): Document the change. * src/frame.c (frame_parm_table, syms_of_frame) (gui_set_borders_respect_alpha_background): * src/frame.h (struct frame): Add frame parameter. * src/androidfns.c (x_create_frame, android_create_tip_frame) (android_frame_parm_handlers): * src/haikufns.c (haiku_create_frame, haiku_create_tip_frame) (haiku_frame_parm_handlers): * src/nsfns.m (ns_frame_parm_handlers, x_create_frame): * src/w32fns.c (x_create_frame, w32_create_tip_frame) (w32_frame_parm_handlers): Add dummy parameters for backends that don't support opacity. * src/pgtkfns.c (pgtk_frame_parm_handlers, x_create_frame) (pgtk_create_tip_frame): * src/pgtkterm.c (pgtk_draw_window_divider): * src/xfns.c (x_create_frame, x_create_tip_frame) (x_frame_parm_handlers) * src/xterm.c (x_draw_window_divider) (x_clear_under_internal_border): Implement parameter on backends that support opacity.
* Fix crashes when "emacsclient -nw" frames are suspended (bug#78980)Pip Cet2025-07-091-3/+3
| | | | | * src/frame.c (frame_redisplay_p): Start loop with 'f', not its parent frame. Simplify return expression.
* Handle invalid frame_or_window slots in tty input events (Bug#78966)Martin Rudalics2025-07-091-0/+9
| | | | | | | | | | | * src/frame.c (make_terminal_frame): Initialize terminal's top_frame slot if it has not been set up yet (Bug#78966). * src/keyboard.c (kbd_buffer_get_event): Do not assume that the event's frame_or_window slot always produces a valid frame (Bug#78966). (tty_read_avail_input): Try to make sure that the input event we create has a valid frame_or_window slot (Bug#78966). Add assertion to that purpose.
* Have 'delete-frame' delete initial daemon frame only if FORCE is non-nilMartin Rudalics2025-05-291-4/+7
| | | | | | | | | | | * src/frame.c (delete_frame): Delete initial daemon frame only if FORCE is non-nil (Bug#78583). (Fdelete_frame): Rewrite doc-string to mention that it can delete an initial daemon frame if and only if FORCE is non-nil. * etc/NEWS: * doc/lispref/frames.texi (Deleting Frames): Mention that 'delete-frame' can delete an initial daemon frame if and only if FORCE is non-nil.
* Fix infinite looping in 'next-frame' and associates (Bug#77985)Martin Rudalics2025-05-091-30/+59
| | | | | | | | | | | | | | * src/frame.c (next_frame): Rewrite to avoid infinite looping if FRAME itself does not qualify as candidate frame (Bug#77985). (Fnext_frame, Fprevious_frame): Adjust do-strings. * lisp/frame.el (other-frame): Adjust doc-string. (frame-list-1): New function. (make-frame-names-alist): Rewrite using 'frame-list-1' instead of 'next-frame' (Bug#77985). (delete-other-frames): Rewrite using 'frame-list' instead of 'next-frame'. * doc/lispref/frames.texi (Finding All Frames): Minor clarifications for 'frame-list' and 'next-frame'.
* Further amendments of child frame handling and documentationMartin Rudalics2025-03-261-9/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (frame_subsumes_p): New static function (delete_frame): On ttys refuse to delete a frame that could be used as surrogate minibuffer frame by surviving frames. (store_frame_param): Make sure 'minibuffer' parameter does not reference a deleted window. If on a tty it references a live window, make sure its frame has the same root frame as the frame where the parameter shall be installed. Also on ttys make sure that storing the 'parent-frame' parameter does not assign a surrogate minibuffer frame a different root frame than that of any of its client frames. Further on ttys assert that making a child a new root frame gives it the dimensions of the terminal. (Fmouse_position_in_root_frame): Don't use XFRAME before it's clear that FRAME is a frame. * doc/lispref/elisp.texi (Top): Add menu for Child Frames section. * doc/lispref/frames.texi (Buffer Parameters): Mention that value 'child-frame' is not special for 'minibuffer' parameter on text terminals. (Visibility of Frames): Fix description of 'iconify-frame'. (Raising and Lowering): 'minibuffer-auto-raise' is an option. (Child Frames): Major rewrite using subsections. Explain new and deviant features on text terminals - menu bar access, reparenting, deleting, visibility and minibuffer-only child frames. * etc/NEWS: Remove remark that child frames cannot be arbitrarily reparented on ttys.
* Fix and document frame parameters for text terminals and child framesMartin Rudalics2025-03-221-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (Fmake_frame_invisible): In doc-string describe effect on text terminals. Set FRAME correctly when called with nil value. Make frame invisible before calling mru_rooted_frame or next_frame. (Ficonify_frame): Make it work for child frames on text terminals (Fmodify_frame_parameters): Make value 'icon' for 'visibility' work for child frames. * src/dispnew.c (frame_ancestors_visible_p): New function. (frames_with_root): If VISIBLE_ONLY is non-nil, return only frames whose ancestors are all visible to avoid that redisplay draws visibly orphaned child frames. * doc/lispref/frames.texi (Frames): Move descriptions of top frame and 'tty-top-frame' here. (Frame Layout): Mention that on text terminals the outer border can be emulated by setting the 'undecorated' frame parameter. (Frame Position, Frame Parameters, Window Frame Parameters) (Position Parameters, Size Parameters): Rewrite sections dealing with the handling of frame parameters in text terminals. (Layout Parameters): Move description of 'undecorated' parameter here. Clarify semantics of 'menu-bar-lines' parameter. (Frame Interaction Parameters): Move description of 'visibility' parameter here. Mention which parameters are not implemented on text terminals. (Mouse Dragging Parameters): Describe how these work on text terminals. (Visibility of Frames): Rewrite section. (Raising and Lowering): Describe for text terminals. (Child Frames): Fix description of 'iconify-child-frame' option.
* On tty frames restrict number of menu bar lines (Bug#77015)Martin Rudalics2025-03-191-10/+22
| | | | | * src/frame.c (set_menu_bar_lines): Make sure tty frames get only 0 or 1 menu bar line (Bug#77015).
* Ensure redisplay after re-parenting a tty child frame (Bug#77079)Martin Rudalics2025-03-181-0/+3
| | | | | | * src/frame.c (store_frame_param): When re-parenting a tty child frame, mark it's old and new root frames as garbaged so redisplay will reflect the change immediately (Bug#77079).
* Implement dragging and resizing of tty child framesMartin Rudalics2025-03-171-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (face-spec-recalc): Don't set scroll-bar-foreground and scroll-bar-background parameters on ttys. * lisp/mouse.el (mouse-drag-frame-resize) (mouse-drag-frame-move): On ttys call 'mouse-position-in-root-frame' to get position of child frame to resize or drag. * lisp/xt-mouse.el (xterm-mouse-event): Handle events on child frame decorations as if they happened on the internal border to find out whether a user wants to drag or resize a child frame. * src/frame.c (frame_internal_border_part): Define for ttys too. (Fmouse_position_in_root_frame): New function. * src/frame.h (internal_border_part): Define for ttys too. * src/keyboard.c (internal_border_parts): Define for ttys too. (frame_border_side): New enum. (make_lispy_position): Handle events on tty child frames. (Fposn_at_x_y): Accept -1 for Y so we can handle a position on the top decoration of a tty child frame. * src/term.c (tty_frame_at): Handle case where X and Y denote a position on a tty child frame's decoration. * src/window.c (Fwindow_at): Handle case where X and Y denote a position on the decoration of a tty child frame which we pretend as belonging to that child frame (and not to its root).
* ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some placesSean Whitton2025-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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".
* Fix capitalization ELisp -> ElispSean Whitton2025-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix handling of frame position valuesMartin Rudalics2025-03-101-15/+38
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Provide better completion for customizing frame parametersMauro Aranda2025-03-091-0/+4
| | | | | | | | | | * 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.
* Fix crash in daemon when "C-x C-c" while a client frame shows tooltipEli Zaretskii2025-03-081-9/+11
| | | | | * src/frame.c (delete_frame): Ignore tooltip frames when looking for other frames on the same terminal. (Bug#76842)
* Clarify semantics of 'frame-inhibit-implied-resize'Martin Rudalics2025-02-241-9/+17
| | | | | | * src/frame.c (frame_inhibit_implied_resize): * doc/lispref/frames.texi (Implied Frame Resizing): Clarify semantics of 'frame-inhibit-implied-resize'.
* ; Fix last changeEli Zaretskii2025-02-231-2/+2
| | | | | | * src/frame.c (syms_of_frame) <frame-inhibit-implied-resize>: * doc/lispref/frames.texi (Implied Frame Resizing): Don't use passive voice. (Bug#76275)
* Optionally inhibit implied resizing while frame is made (Bug#76275)Martin Rudalics2025-02-231-23/+35
| | | | | | | | | | | | | * 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'.
* ; Fix typosStefan Kangas2025-02-221-1/+1
|
* Handle nil top frame (bug#76410)Gerd Möllmann2025-02-191-1/+1
| | | | | * src/frame.c (do_switch_frame): Don't assume that top_frame is always a frame, it can be nil.
* Fix handling of visibility on tty frames (Bug#76031)Martin Rudalics2025-02-101-41/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove no-longer-needed delete_frame UNINITPaul Eggert2025-02-041-1/+0
| | | | | | | | | | * 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” 8c3215e7a47e3caaa005bf573765ed63e0739b89 dated Sat Apr 28 16:49:24 2018 -0700.
* Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-2/+2
|\
| * Pure storage removal: Remove purecopy hash table flagPip Cet2024-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.