1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-06 22:31:13 -07:00
Commit graph

51028 commits

Author SHA1 Message Date
Pip Cet
9a657e1dab [MPS] Trace backtrace function PDL entries
* src/igc.c (scan_specpdl): Trace bt.function, which might not be
covered by an ambiguous root.
2025-03-02 17:43:07 +00:00
Pip Cet
23ef75876e ; * src/igc.c: minor correction to the arena comments 2025-03-02 17:41:15 +00:00
Gerd Möllmann
6b8a650e60 Iterating over markers in most-recently added order (bug#76538)
* src/buffer.h (struct marker_it): Store vector as pointer.
(IGC_IDX_FREE_LIST, IGC_IDX_HEAD, IGC_IDX_START)
(IGC_OFF_NEXT, IGC_OFF_PREV, IGC_OFF_MARKER, IGC_MA_NSLOTS): Constants
for the internal structure of marker arrays.
(slot_to_index): New function.
(IGC_MA_FREE_LIST, IGC_MA_HEAD, IGC_MA_MARKER, IGC_MA_NEXT)
(IGC_MA_PREV): New macros.
(marker_it_init, marker_it_next): Rewritten.
* src/igc.c (unchain): New function.
(fix_marker_vector): Rewritten.
(larger_marker_vector, igc_add_marker, igc_remove_marker)
(igc_remove_all_markers): Reformulated.
* src/lisp.h (struct Lisp_Marker): Rename `index' to 'slot'.
* src/pdumper.c (dump_marker): Adapt to name change of 'index'.
2025-03-01 15:29:19 +01:00
Jeremy Bryant
52612cb8f7 * src/igc.c: Document arena states, and AMC pool
igc_state: Enhance comment to cross-reference MPS docs.
mps_pool_t: Insert comment on the most important pool type.
(text from Gerd Mollmann in igc.org)
2025-03-01 15:49:12 +02:00
Pip Cet
07cca9aec1 [MPS] handle shrinking allocation in igc_xnrealloc_ambig (bug#76576)
* src/igc.c (igc_xnrealloc_ambig): Copy only the minimum of the old
and new buffer sizes.
2025-02-26 14:52:40 +00:00
Pip Cet
f2316fff3f Merge from savannah/master 2025-02-24 10:27:42 +00:00
Pip Cet
542be52db3 [MPS] Avoid accidental full collections due to unsigned overflow (bug#76505)
* src/igc.c (arena_step): Pass '1.0' rather than '0.0' as a
multiplier.  Remove comment about mysterious full collections.
2025-02-23 20:26:08 +00: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
Gerd Möllmann
2a756ce9d7 Enforce redisplay when deleting a child frame (bug#76406)
* src/term.c (tty_free_frame_resources): When deleting a child mark its
root frame to garbaged.
* src/dispnew.c (prepare_desired_root_row): Add a check for GLYPH_DEBUG.
2025-02-23 10:38:27 +01:00
Paul Eggert
f12fbed4c1 Revert “Pacify GCC in pgtkselect malloc alignment”
Problem reported by the wurfkreuz (Bug#76414).
* src/pgtkselect.c: Revert my commit
ff65cc9944 dated Sun Jan 26 22:15:49
2025 -0800 for now.  I may come up with a better commit later.
2025-02-22 23:54:22 -07:00
Eli Zaretskii
827a91dbf3 Make 'text-property-default-nonsticky' buffer-local when set
* src/textprop.c (syms_of_textprop)
<text-property-default-nonsticky>: Make buffer-local when set.
(Bug#76445)

* etc/symbol-releases.eld: Add text-property-default-nonsticky.

* etc/NEWS:
* doc/lispref/text.texi (Sticky Properties): Document the change.
2025-02-22 18:04:04 +02:00
Helmut Eller
6ff509af3d Don't forget to free process->gnutls_pproc if we HAVE_MPS (Bug#76473)
* src/gnutls.c (emacs_gnutls_deinit): Free gnutls_pproc here.
* src/alloc.c (cleanup_vector): Not here.
2025-02-22 14:23:05 +00:00
Stefan Kangas
702cb123fa ; Fix typos 2025-02-22 14:48:29 +01:00
Po Lu
1f2e06283c Merge from savannah/emacs-30
25ba253609 Fix reported Haiku build error in emacs-30.1-rc1
92e96a1175 ; Delete troff markers from ChangeLog files
2025-02-21 13:32:14 +08:00
Po Lu
25ba253609 Fix reported Haiku build error in emacs-30.1-rc1
* src/haiku_support.cc (keysym_from_raw_char): Don't define
duplicate cases on the previous release.
2025-02-21 13:28:55 +08:00
Mattias Engdegård
b481fbe92f * src/fns.c (Fmapconcat): Faster fast-path condition 2025-02-20 20:14:33 +01:00
Paul Eggert
241e8e5fcf ; Spelling fix in comment. 2025-02-20 09:42:33 -08:00
Po Lu
1c49cfc711 Fix set-time-zone-rule on DJGPP
* lisp/loadup.el ("tooltip"): Load even on MS-DOS.

* src/timefns.c (tzvalbuf): Don't define on MS-DOS.
(emacs_getenv_TZ, emacs_setenv_TZ) [MSDOS]: Call getenv and
putenv rather than overwrite existing environment storage to
update DJGPP's environment modification counter.
2025-02-20 19:46:50 +08:00
Po Lu
b65971b2c0 ; * src/pdumper.c (Fdump_emacs_portable): Fix typo in comment. 2025-02-20 14:27:03 +08:00
Po Lu
c22957c4bf Port to modern GCC and pdumper on MS-DOS
* config.bat (mvOk): Protoize.
(djgppOk): Include sys/version.h for _DJGPP_MINOR.

* lisp/loadup.el: If system-type is ms-dos, dump bootstrap-emacs
as b-emacs.dmp.

* msdos/INSTALL: Document new versions of tools that have been
verified successfully to compile Emacs.

* msdos/emacs.djl: New linker script that arranges to link
symbols in `.subrs' in a contiguous part of data, as the DJGPP
runtime appears to treat any non-data and non-text section as
allocatable.

* msdos/mainmake.v2 (install): Install emacs.dmp alongside
emacs.exe.

* msdos/sed1v2.inp (CFLAGS): Define to -O2 -g3.
(LDFLAGS): Provide the said linker script.
(HAVE_PDUMPER): Define to yes.
(UNEXEC_OBJ, PAXCTL_dumped, PAXCTL_notdumped): Delete.
(DUMPING): Set to pdumper.
(MAKE_PDUMPER_FINGERPRINT): Don't erase this variable.
Don't stubify or set minstack.  Remove native-comp specific
directives.  Don't remove temacs prior to copying and replace
`pdmp' extension with DOS-conformant `dmp'.

* msdos/sed2v2.inp (HAVE_UNEXEC): Remove definition.
(HAVE_PDUMPER): Define to 1.

* msdos/sed6.inp (top_srcdir): Define appropriately.

* msdos/sedlibmk.inp (HAVE_BLKCNT_T): Define to 1.

* src/emacs.c (load_pdump) [MSDOS]: Use `dmp' suffix.

* src/pdumper.c (Fdump_emacs_portable) [MSDOS]: Replace ".pdmp"
suffixes with ".dmp".
2025-02-20 14:04:59 +08:00
Stefan Kangas
92e96a1175 ; Delete troff markers from ChangeLog files 2025-02-20 02:46:43 +01:00
Gerd Möllmann
23bf94a011 Don't call x-popup-function for non-tty frames
* src/menu.c (x_popup_menu_1): Don't call x-popup-function for non-tty
frames
(syms_of_menu): Remove Qx_popup_menu_function because unused, extend doc
string of x-popup-menu-function.
2025-02-19 08:36:59 +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
Stefan Monnier
d685d21e8a (lexical-binding): Allow changing the default value (bug#74145)
* lisp/loadup.el: Preserve (default-toplevel-value 'lexical-binding).

* src/lread.c (Fload, Feval_buffer): Obey (default-toplevel-value
'lexical-binding).

* doc/lispintro/emacs-lisp-intro.texi (Lexical vs Dynamic Binding
Example): Use the lexical dialect also for the dynamic
scoping example.
* doc/lispref/edebug.texi (Edebug Eval): Remove long-obsolete mention
of Edebug support for `lexical-let`.
2025-02-18 15:37:50 -05:00
Stefan Monnier
20edecd21f Merge remote-tracking branch 'refs/remotes/origin/master' 2025-02-18 10:07:34 -05:00
Gerd Möllmann
4d3a618941 ; * src/menu.c (x_popup_menu_1): Fix typo. 2025-02-18 16:05:38 +01:00
Stefan Monnier
41624d94ce (replace_range): Delete last arg, always the negation of the first bool
* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.
2025-02-18 10:05:34 -05:00
Stefan Monnier
19f5ccbf39 src/search.c (Freplace_match): Let replace_range call the a-c-f 2025-02-18 09:54:48 -05:00
Stefan Monnier
9854103b52 * src/editfns.c (Fsubst_char_in_region): Delete left-over code
This code was missed back in 2000 (commit 1b16afa45bb6).
2025-02-18 09:52:35 -05:00
Gerd Möllmann
bf067daf0d * src/menu.c (x_popup_menu_1): Use calln. 2025-02-18 15:47:18 +01:00
Po Lu
37fad04830 * src/menu.c (x_popup_menu_1): Fix coding style. 2025-02-18 21:00:08 +08:00
Gerd Möllmann
17bf6b9efe Add x-popup-menu-function
* src/menu.c (x_popup_menu_1): If non-nil call x-popup-menu-function.
(syms_of_menu): DEFSYM x-popup-menu-function, DEFVAR_LISP it.
2025-02-18 05:13:16 +01:00
Gerd Möllmann
a51cfbbd15 Hide cursor based on tty frame's `cursor-type'
* src/dispnew.c (terminal_cursor_magic): if selected-frame has
`(cursor-type . nil)' parameter.
2025-02-18 05:05:39 +01:00
Eli Zaretskii
1136963b4e ; * src/xdisp.c (maybe_produce_line_number): Fix last change (bug#76362). 2025-02-17 18:00:30 +02:00
Gerd Möllmann
d80ac0fbaa Fix child coordinate calculation (bug#76321)
* src/dispnew.c (rect_intersect): Simplify.
(copy_child_glyphs): Compute child coordinates using child_xy.
2025-02-17 11:22:28 +01:00
Pip Cet
48909543bd Merge from savannah/master 2025-02-17 09:39:18 +00:00
Po Lu
a951dbcf16 Implement `(- N)' frame position specifications on Haiku
* src/haikuterm.c (haiku_calc_absolute_position): New function.
(haiku_set_offset): Apply offsets configured by the said
function.
2025-02-17 12:07:20 +08:00
Po Lu
6c1e6ba83c ; * src/androidterm.c (android_set_offset): Apply correct frame offsets. 2025-02-17 12:02:05 +08:00
Po Lu
718a227f0f ; Correct merge errors. 2025-02-17 11:36:41 +08:00
Po Lu
25b25fce75 Merge from savannah/emacs-30
e3dc0ea254 Fix crash in frame deletion on Android
e34ea5db5f * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug...
48f9d6aafe * lisp/man.el (Man-shell-file-name): Ensure a Bourne shel...
7016c13e5e ; Update etc/AUTHORS (bug#76319).
0bc7b5a389 ; * admin/authors.el (authors-aliases): Add "Elías Gabrie...
e9c4f642b9 ; * doc/emacs/package.texi (Package Installation): Add om...
8c4294f370 ; Move index entries in user manual

# Conflicts:
#	src/pgtkterm.c
2025-02-17 11:36:14 +08:00
Po Lu
0a6997b58d Synchronize frame placement logic with X
* src/androidterm.c (android_calc_absolute_position): New
function.
(android_set_offset): Call android_calc_absolute_position.

* src/pgtkterm.c (pgtk_calc_absolute_position): Synchronize with
X.
2025-02-17 11:34:06 +08:00
Po Lu
e34ea5db5f * src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug#76239. 2025-02-17 10:56:45 +08:00
Pip Cet
17fae285d5 Make specpdl discards explicit
Some code used to modify the specpdl pointer directly to discard
specpdl entries without unwinding through them.  This introduces an
API to do so safely, because in the MPS case we need to mark the
discarded specpdl entries as free so they will not be traced by GC.

* src/bytecode.c (exec_byte_code):
* src/dired.c (directory_files_internal):
* src/eval.c (eval_sub):
(Ffuncall):
(apply_lambda): Use 'unbind_discard_to'.
(unbind_discard_to): New function.
* src/fileio.c (Fmake_temp_file_internal):
(Finsert_file_contents):
(write_region):
* src/fns.c (extract_data_from_object): Use 'unbind_discard_to'.
* src/lisp.h (SPECPDL_INDEX_PREV): New function.
(safe_free):
* src/process.c (Fmake_pipe_process):
(Fmake_serial_process):
(connect_network_socket):
(Fmake_network_process):
(server_accept_connection): Use 'unbind_discard_to'.
2025-02-16 19:22:29 +00:00
Pip Cet
69a10f10de [MPS] Avoid PGTK crashes (bug#76238)
* src/pgtkfns.c (Fx_create_frame):
(x_create_tip_frame): Use 'igc_xzalloc_ambig', not 'xzalloc'.
* src/pgtkmenu.c (pgtk_menu_show): Use 'SAFE_ALLOCA_LISP'.
* src/pgtkselect.c (pgtk_own_selection): Use temporary copies of the
symbol name strings.
(lisp_data_to_selection_data): Use temporary string copy.
* src/pgtkterm.c (pgtk_enumerate_devices):
(pgtk_free_devices):
(evq_enqueue): Use 'igc_xzalloc_ambig' etc.
(size_allocate): Use 'get_glib_user_data'.
(pgtk_link_touch_point):
(pgtk_unlink_touch_point):
(pgtk_unlink_touch_points):
(pgtk_free_frame_resources):
(pgtk_delete_display): Use 'igc_xzalloc_ambig' etc.
(pgtk_set_event_handler): Use 'glib_user_data'.
2025-02-15 19:04:46 +00:00
Pip Cet
000d382968 [MPS] Avoid DBUS malfunctions
* src/dbusbind.c (xd_lisp_dbus_to_pin): Use first mint pointer.
(xd_lisp_dbus_to_pin): New function.
(xd_close_bus): Free both mint pointers.
(Fdbus__init_bus) [HAVE_MPS]: Mint a pointer to an area pinning the
object whose pointer we use.
2025-02-15 18:52:24 +00:00
Eli Zaretskii
0f768b8843 Prevent buffer overflow in line-numbering code
* src/xdisp.c (maybe_produce_line_number): Limit the value of
'display-line-numbers-width' to what can be shown in the window,
and set dimension of the lnum_buf[] accordingly.  (Bug#75969)
2025-02-15 13:15:36 +02:00
Po Lu
c37e7cef42 Merge from savannah/emacs-30
58e4bfe340 Add two missing NULL checks of malloc'd values on Android
81ca9c75f1 ; * etc/PROBLEMS: Document how to grant storage permissio...
d82d468979 ; * etc/TODO: Rethink finder-known-keywords.
b9b9c33dcb Fix (Non)GNU ELPA description in manual
87a61eba1b Move 'package-archives' documentation to emacs manual
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242).
3cfbeb3fca ; Fix >72 character long lines in docstring
c68886ddb7 ; Change "virus" to "malicious" in lispref
6701866be4 Document (Non-)GNU ELPA in emacs manual
02851768b7 ; * .mailmap: Add entry for Thuna.  (Bug#76221)
2d7a8cbf4c Fix author name
1931425748 Use c-ts-common's comment setup in go-ts-mode (bug#75978)
316893ca38 Add java-language-server to eglot-server-programs
2025-02-15 16:58:55 +08:00
Po Lu
58e4bfe340 Add two missing NULL checks of malloc'd values on Android
* src/android.c (sendDndUri, sendDndText): Verify that allocated
string memory is non-nil before writing to it.
2025-02-15 16:58:18 +08:00
Pip Cet
608113628c Avoid crashes in lread.c when invalid characters are read
* src/lread.c (readchar): Don't crash for non-fixnum return values.
(read_filtered_event): Don't crash for invalid symbol properties.
(Fread_char):
(Fread_char_exclusive):
(character_name_to_code): Check 'FIXNUMP' before using 'XFIXNUM'.
(read_char_escape): Crash on invalid Lisp-supplied data when
ENABLE_CHECKING; otherwise, signal an error.
2025-02-14 13:51:28 +00:00