aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Unexec removal: Remove HYBRID_MALLOC supportPip Cet2024-12-1210-220/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gmalloc.c (gdefault_morecore): Remove HYBRID_MALLOC code. (allocated_via_gmalloc, hybrid_malloc, hybrid_calloc, hybrid_free_1) (hybrid_free, hybrid_aligned_alloc, hybrid_realloc): Remove functions. * msdos/sed1v2.inp: * msdos/sedlibmk.inp: * src/alloc.c (GC_MALLOC_CHECK, USE_ALIGNED_ALLOC) (refill_memory_reserve, aligned_alloc): * src/emacs.c (main): * src/lastfile.c (my_edata): * src/lisp.h: * src/ralloc.c: * src/sysdep.c (get_current_dir_name_or_unreachable): * src/xdisp.c (decode_mode_spec): Remove HYBRID_MALLOC conditions. * configure.ac (hybrid_malloc, HYBRID_MALLOC): Remove variables and dependent code. * src/conf_post.h (hybrid_malloc, hybrid_calloc, hybrid_free) (hybrid_aligned_alloc, hybrid_realloc): Remove conditional prototypes. * src/Makefile.in (HYBRID_MALLOC): Remove variable. (base_obj): Remove sheap.o (LIBEGNU_ARCHIVE): * lib/Makefile.in (libgnu_a_OBJECTS): Remove libegnu.a support.
| * | Unexec removal: Main partPip Cet2024-12-1214-435/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove unexec-specific parts. (EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC feature. (AC_ECHO): No longer display a line about the unexec feature. * lisp/loadup.el: * lisp/startup.el: Remove unexec-specific code. * src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'. * src/alloc.c (staticvec): Never initialize this variable. (BLOCK_ALIGN): Always allow large blocks. (mmap_lisp_allowed_p): Remove unexec-specific code. * src/buffer.c (init_buffer): * src/conf_post.h (ADDRESS_SANITIZER): * src/emacs.c (load_pdump, main): Remove unexec-specific code. (Fdump_emacs): Remove function. (syms_of_emacs): Remove 'Fdump_emacs'. * src/lastfile.c: Remove unexec-specific code. * src/lisp.h (gflags): Remove unexec-specific flags. (will_dump_p, will_bootstrap_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust predicates. (SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition. * src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning. * src/process.c (init_process_emacs): Remove !unexec condition * src/sysdep.c (maybe_disable_address_randomization): Adjust comment. (init_signals): * src/timefns.c (init_timefns): Remove unexec-specific code. * src/w32heap.c (report_temacs_memory_usage): Remove function. * src/w32heap.h: Adjust comment. * src/w32image.c (globals_of_w32image): Remove unexec-specific code.
| * | Unexec removal: Remove obsolete filesPip Cet2024-12-1211-4666/+0
| | | | | | | | | | | | | | | | | | * src/sheap.c, src/sheap.h, src/unexec.h, src/unexaix.c, unexcoff.c: * src/unexcw.c, src/unexelf.c, src/unexhp9k800.c, src/unexmacosx.c: * src/unexsol.c, src/unexw32.c: Remove files.
* | | Don’t use garbage after tty_frame_at returns nilPaul Eggert2025-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/term.c (handle_one_term_event): Don’t access possibly uninitialized storage if frame is nil. This fixes an issue introduced in commit 5eae7f5227c7789dea45cef26fec17c057024670 dated 2025-01-26 14:43:51 -0800. Issue caught by --enable-gcc-warnings, which enables -Wanalyzer-use-of-uninitialized-value with gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7).
* | | Revert "Prefer static switch-case checking in pdumper"Pip Cet2025-01-311-0/+19
| | | | | | | | | | | | This reverts commit 6e2e7265a04f63f482db7fbdfd8e2519d8bfe03e.
* | | Revert "Pacify -Wanalyzer-use-of-uninitialized-value"Pip Cet2025-01-311-29/+62
| | | | | | | | | | | | This reverts commit 1ed769a3cb753a86badba8a2878fa788a6fdc1f8.
* | | Revert "; * src/pdumper.c (dump_do_fixup): Pacify GCC.Pip Cet2025-01-311-1/+1
| | | | | | | | | | | | This reverts commit a99ba59aa02ef8cfd314737950b6cd8d97015925.
* | | Avoid stack overflow on MS-Windows due to 'make-temp-name'Eli Zaretskii2025-01-311-6/+6
| | | | | | | | | | | | | | | * src/fileio.c (Fexpand_file_name) [DOS_NT]: Use 'SAFE_ALLOCA' instead of 'alloca'. (Bug#75938)
* | | ; * src/pdumper.c (dump_do_fixup): Pacify GCC.Eli Zaretskii2025-01-301-1/+1
| | |
* | | Fix tree-sitter language remappingYuan Fu2025-01-291-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/treesit.c (resolve_language_symbol): Move forward. (treesit_ensure_query_compiled): Resolve language remapping here. (Ftreesit_parser_list): Don't resolve language remaping here, because there's no need: parsers now carries the remapped language. (Ftreesit_query_compile): Don't resolve language remapping here, because we resolve language remapping when actually compiling the query. Also we want the query to carry the unmapped language.
* | | Further fixes for cursor positioning (bug#75056)Gerd Möllmann2025-01-301-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | * src/dispnew.c (write_matrix): Don't set the cursor here. Parameter to set the cursor or not removed. (combine_updates_for_frame): Call tty_set_cursor here, depending on whether or not the selected frame is related to the updated frame. (update_frame_with_menu): Adapt to change of write_matrix.
* | | Replace two macros with functions in dispnew.c (bug#75056)Gerd Möllmann2025-01-301-19/+4
| | | | | | | | | | | | | | | | | | | | | * src/dispnew.c (WINDOW_TO_FRAME_VPOS, WINDOW_TO_FRAME_VPOS): Macros removed. (window_to_frame_vpos, window_to_frame_vpos): Always define, and use them instead of the removed macros.
* | | Don't use selected frame in tty_set_cursor (bug#75056)Gerd Möllmann2025-01-301-5/+3
| | | | | | | | | | | | | | | * src/dispnew.c (tty_set_cursor): Add frmae parameter. (write_matrix): Pass to the updated frame to tty_set_cursor.
* | | ; Fix Cygw32 buildEli Zaretskii2025-01-291-1/+1
| | |
* | | ; Fix last changeEli Zaretskii2025-01-281-2/+2
| | | | | | | | | | | | | | | | | | * src/buffer.c (Fother_buffer): * lisp/frame.el (make-frame): * doc/lispref/frames.texi (Creating Frames): Fix em-dash.
* | | New variable 'expose-hidden-buffer' (Bug#75828)Martin Rudalics2025-01-282-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | | Fix frame-visible-p for tty root framesGerd Möllmann2025-01-281-2/+0
| | | | | | | | | | | | | | | * src/frame.c (Fframe_visible_p): Don't unconditionally return t for tty root frames.
* | | Avoid some make_formatted_string mallocsPaul Eggert2025-01-271-1/+1
| | | | | | | | | | | | | | | * src/alloc.c (make_formatted_string): Grow the local buffer from 64 to MAX_ALLOCA bytes.
* | | Make vmessage a bit saferPaul Eggert2025-01-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (vmessage): Avoid undefined behavior if FRAME_MESSAGE_BUF_SIZE (f) is zero, or if doprnt generates output containing only encoding errors. Although it’s not clear whether either is possible, it is better to be safe. Also, clarify via a new local message_bufsize.
* | | Avoid printing NUL characters in 'message' (bug#75900)Pip Cet2025-01-271-3/+12
| | | | | | | | | | | | | | | | | | * src/xdisp.c (vmessage): Increase buffer size to fit an extra multibyte character. On buffer overflow, drop the last multibyte character to determine an accurate byte length.
* | | Fix buffer overflows in doprnt (bug#75900)Pip Cet2025-01-271-2/+7
| | | | | | | | | | | | | | | * src/doprnt.c (doprnt): Clear rest of buffer on multibyte overflow. Always decrement bufsize when writing a byte.
* | | doprnt %X supportPaul Eggert2025-01-271-2/+3
| | | | | | | | | | | | | | | * src/doprnt.c (doprnt): Also support %X, since callers now use %X.
* | | Fix clicking in child frames with GPMjared2025-01-271-2/+4
| | | | | | | | | | | | | | | * src/term.c (handle_one_term_event): Store child frame coordinates in event.
* | | Pacify -Wanalyzer-use-of-uninitialized-valuePaul Eggert2025-01-261-62/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With ‘configure --enable-gcc-warnings’, gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7) on x86-64 complained, as it apparently did not want to assume that enum variables have one of the listed values. Work around the problem by using tables rather than switch statements. This gives up a little static checking but I don’t see any other easy way to pacify GCC without disabling the warnings entirely. * src/pdumper.c (dump_fwd_int, dump_fwd_bool, dump_fwd_obj) (dump_fwd_buffer_obj, dump_fwd_kboard_obj): Last arg is now void const * so that these functions’ addresses can all be put into the same array. (dump_fwd, dump_anonymous_allocate_posix, dump_map_file_posix): Use an array rather than a switch. (mem_prot_posix_table): New static constant table.
* | | Fix unlikely eassert failure in invalid_radix_integerPaul Eggert2025-01-261-3/+3
| | | | | | | | | | | | | | | * src/lread.c (invalid_radix_integer): Simplify by using sprintf with a big-enough buffer.
* | | Fix unlikely eassert failure in xg_set_widget_bgPaul Eggert2025-01-261-7/+3
| | | | | | | | | | | | | | | * src/gtkutil.c (xg_set_widget_bg): Simplify by using sprintf with a big-enough buffer.
* | | Fix unlikely eassert failure in pgtk_enumerate_devicesPaul Eggert2025-01-261-9/+4
| | | | | | | | | | | | | | | | | | * src/pgtkterm.c (pgtk_enumerate_devices): Prefer make_formatted_string to snprintf + build_string + eassert, as it’s simpler and won’t crash Emacs if the eassert fails.
* | | Minor format_string tuneupPaul Eggert2025-01-261-5/+1
| | | | | | | | | | | | | | | | | | * src/comp.c (format_string): Prefer strcpy to doing things by hand in a place where strcpy is easier to read, generates more-efficient code, and similar parts of Emacs do strcpy.
* | | Ignore -fanalyzer-null-argument in pgtkterm.cPaul Eggert2025-01-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pgtkterm.c: Ignore -Wanalyzer-null-dereference. I don’t have time to look into all the diagnostics, but the ones I checked seemed to be false alarms with gcc -std=gnu23 on x86-64, and we are ignoring this diagnostic in other modules. This is GCC 14.2.1 20250110 (Red Hat 14.2.1-7).
* | | Pacify -fanalyzer-null-argument on pgtk_term_initPaul Eggert2025-01-261-1/+1
| | | | | | | | | | | | | | | * src/pgtkterm.c (pgtk_term_init): Use xstrdup, not g_strdup. The value is never freed so the allocator shouldn’t matter.
* | | Protect against GCing of last_mouse_windowPaul Eggert2025-01-269-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/window.c (last_mouse_window): New global var. All static instances removed, and all their uses replaced with this global var. This fixes a very unlikely bug where last_mouse_window was GC’ed and a new window created in its place. It also fixes several places that assumed NIL_IS_ZERO without static_asserting it. (init_window_once): Initialize the new var.
* | | Pacify GCC in pgtkselect malloc alignmentPaul Eggert2025-01-261-92/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/pgtkselect.c (pgtk_size_for_format): Remove. (pgtk_get_window_property): Third arg is now void **, not unsigned char **. Omit last arg. All callers changed. Simplify allocation to pacify GCC 14.2.1 complaint about malloc size mismatching size of array: there’s no need for an extra byte when converting from ldata to idata. (selection_data_to_lisp_data): Third arg is now void const *, not unsigned char const *. All callers changed. Omit unnecessary casts. Make some locals more local.
* | | Avoid undefined behavior with botched pgtk menuPaul Eggert2025-01-261-1/+1
| | | | | | | | | | | | | | | | | | * src/pgtkmenu.c (pgtk_menu_show): Do not dereference save_wv if null. Problem found by gcc 20250110 (Red Hat 14.2.1-7) -Wanalyzer-null-dereference.
* | | Use gtk_disable_setlocalePaul Eggert2025-01-262-8/+3
| | | | | | | | | | | | | | | | | | * src/pgtkterm.c (pgtk_term_init): * src/xterm.c (x_term_init): Use gtk_disable_setlocale rather than fixup_locale.
* | | Avoid unlikely int overflow.Paul Eggert2025-01-262-7/+8
| | | | | | | | | | | | | | | | | | | | | * src/pgtkterm.c (pgtk_term_init): * src/xterm.c (x_term_init): Use a bool, not an int that keeps incrementing, to record whether initialization has occurred.
* | | Beware large stack growth in pgtk_menu_showPaul Eggert2025-01-262-11/+10
| | | | | | | | | | | | | | | * src/pgtkmenu.c (pgtk_menu_show): USE_SAFE_ALLOCA instead of alloca. Problem found with --enable-gcc-warnings.
* | | Fix x-show-tip bignum crashPaul Eggert2025-01-261-6/+6
| | | | | | | | | | | | | | | * src/pgtkfns.c (compute_tip_xy): Fix crash if user specifies bignums. Bug found with --enable-gcc-warnings.
* | | Prefer make_formatted_string in svg_load_imagePaul Eggert2025-01-261-54/+18
| | | | | | | | | | | | | | | | | | * src/image.c (svg_load_image): Prefer make_formatted_string to snprintf, as this simplifies the code and does not truncate the resulting string arbitrarily.
* | | Simplify building of color names in image.cPaul Eggert2025-01-261-23/+18
| | | | | | | | | | | | | | | * src/image.c (make_color_name): New function. (image_background, image_build_heuristic_mask, png_load_body): Use it.
* | | Simplify make_formatted_string APIPaul Eggert2025-01-268-58/+44
| | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix unlikely time zone abbreviation bugPaul Eggert2025-01-261-9/+18
| | | | | | | | | | | | | | | | | | | | | * src/timefns.c (Fcurrent_time_zone): Fix double-"-" bug when time zone name is not known and time zone offset is -3600 or less. Also, stop assuming that make_formatted_string works with "*" precisions; this might ease future changes.
* | | Fix the Android portPo Lu2025-01-272-0/+10
| | | | | | | | | | | | | | | | | | | | | * src/term.c (tty_frame_at) [HAVE_ANDROID]: Always return nil. * src/terminal.c (cursor_to, raw_cursor_to) [HAVE_ANDROID]: Don't call root_xy.
* | | Fix compilation warnings in pdumper with !HAVE_NATIVECOMPStefan Kangas2025-01-261-3/+7
| | | | | | | | | | | | | | | | | | * src/pdumper.c [!HAVE_NATIVECOMP] (cold_op, dump_subr): Fix compilation warnings. Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg01003.html
* | | Prefer static switch-case checking in pdumperStefan Kangas2025-01-261-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | * src/pdumper.c (dump_fwd, dump_symbol, dump_drain_cold_data) (dump_do_fixup, dump_anonymous_allocate_w32) (dump_anonymous_allocate_posix, dump_map_file_w32, dump_map_file_posix) (dump_do_emacs_relocation): Remove default clauses to allow static checking using -Wswitch.
* | | Avoid crashes in Fdocumentation caused by incorrect data typesPip Cet2025-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Note that this can only change things when function-documentation is defined or overloaded incorrectly. * src/doc.c (Fdocumentation): Check that the cdr of a docstring cons is a fixnum.
* | | Display separators on tty menus with display table entriesGerd Möllmann2025-01-263-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (display_tty_menu_separator): Lookup separator char in standard-display-table, make a string, and display that using display_string. * src/xdisp.c (display_tty_menu_separator_char): New function. (display_tty_menu_separator): Use it. * lisp/disp-table.el (display-table): Increase from 12 to 18. (box-double-vertical, box-double-horizontal, box-double-down-right) (box-double-down-left, box-double-up-right, box-double-up-left): New symbols for extra slots. (display-table-slot, set-display-table-slot): Change doc string. (describe-display-table): Describe new slots. (standard-display-unicode-special-glyphs): Define new slots. * src/disptab.h (DISP_TABLE_P): Add enumerators. (DISP_TABLE_EXTRA_SLOTS): Define based on enum box. * src/dispnew.c (produce_box_glyphs): Add new enumerators to switch to make it exhaustive. * src/xdisp.c (display_tty_menu_separator): Use BOX_DOUBLE_HORIZONTAL for '=' if present. * doc/lispref/display.texi: Add documentation. * etc/NEWS: Mention in NEWS.
* | | Change doc string of frame-visible-pGerd Möllmann2025-01-251-5/+1
| | | | | | | | | | | | | | | * src/frame.c (Fframe_visible_p): Don't say it always returns t for tty frames.
* | | Replace is_frame_ancestor with frame_ancestor_pGerd Möllmann2025-01-253-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | * src/dispnew.c (is_frame_ancestor): Removed. (frame_z_order_cmp): Use frame_ancestor_p. (copy_child_glyphs): Ditto. * src/dispextern.h: Declaration removed. * src/term.c (mouse_get_xy): Use frame_ancestor_p.
* | | Add 'treesit-forward-comment' with 'forward-comment-function'Juri Linkov2025-01-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/treesit.el (treesit-forward-comment): New function. (treesit-major-mode-setup): Set 'forward-comment-function' to 'treesit-forward-comment' if the 'comment' thing is defined. * src/syntax.c (forward-comment-function): New variable. (Fforward_comment): Call the function from 'forward-comment-function' when it's non-nil (bug#75609).
* | | Merge from origin/emacs-30Eli Zaretskii2025-01-255-11/+16
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67903f5909d Restore the old behavior of `bookmark-write-file' 062da7003f9 ; Improve prompts and error messages in 'info-look' 52dc01f1c8b ; * admin/admin.el (set-version): Note about Android. fb282da2a07 Avoid double spaces around abbrevations in Texinfo bc1ab8ac3d8 ; * doc/emacs/custom.texi (Init Rebinding): Fix spacing. b41ef43af19 ; Fix previous change 5638b1d6bd4 Ispell: Use "personal dictionary" terminology consistently cc791e7499f ; Check man pages for mistakes less frequently 4ed4792e3b9 ; * admin/release-process: Minor copy-edits. 4a867c823b7 Add language server "ruff server" for Python 9e687c2871f Fix go-ts-mode type declaration indentation (Bug#75785) f751b3afa4f ; Minor improvements for doc strings in map.el cda78edc7d9 ; Fix typos ce50a1d3c18 ; * src/w32.c (w32_memory_info): Fix coding style of last... 58d3d4820ad Fix bug in w32_memory_info 77386412050 Avoid crashes in redisplay due to problematic font setups 0e3687e6006 Improve 'key-valid-p' docstring 9878092d2b9 Minor copyedits in internals.texi 4726900fdc5 Better document side-effect free and pure C functions 04c475a39f2 ; Fix documentation about faces of tool-tip text # Conflicts: # admin/codespell/codespell.exclude