1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 12:20:39 -08:00
Commit graph

50310 commits

Author SHA1 Message Date
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
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
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
Eli Zaretskii
316e47c5af ; * src/fns.c (Fmapconcat): Doc fix (bug#76242). 2025-02-13 11:03:26 +02:00
Martin Rudalics
8eef890739 Handle negative frame position values in xterm.c (Bug#76190)
* src/xterm.c (x_calc_absolute_position): Always handle negative
positions when XNegative or YNegative were set (Bug#76190).
2025-02-12 10:54:28 +01:00
Po Lu
fa4260594f X11 drag-and-drop corrections
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Take cdddr of
client-message, skipping the selection information.
(x-dnd-do-direct-save): Do not erase the local copy of a remote
file if it was not in fact copied on behalf of the recipient.
(x-dnd-handle-xds-drop): Return proper action.

* src/xterm.c (x_term_init): Remove unused variable on non-GTK
builds.
2025-02-12 15:51:39 +08:00
Eli Zaretskii
326593c88d * src/bidi.c: Add comments to uses of INT_PROMOTE (bug#75964). 2025-02-11 15:42:26 +02:00
Stefan Kangas
2a405cb897 Minor simplification in Fdescribe_buffer_bindings
* src/keymap.c (Fdescribe_buffer_bindings): Minor simplification.
2025-02-11 02:05:07 +01:00
Paul Eggert
467a88394f Pacify gcc -Wswitch-enum in bidi.c
* src/bidi.c (bidi_get_type, bidi_resolve_explicit)
(bidi_find_bracket_pairs, bidi_resolve_brackets)
(bidi_resolve_neutral): Use ‘switch (INT_PROMOTE (E))’
to indicate that it’s intended that we not enumerate all the enum
values.
2025-02-10 15:22:30 -08:00
Stefan Kangas
8a669b6be5 Set process-adaptive-read-buffering to nil by default
* src/process.c (syms_of_process) <process-adaptive-read-buffering>:
Set the default to nil.  (Bug#75574)
2025-02-10 21:55:11 +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
Po Lu
6e8bb75784 Fix compilation on Haiku Nightly hrev58622
* configure.ac (BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER):
Define if BObjectList ownership over its contents is specified
as a template parameter.

* src/haiku_support.cc (class EmacsFontSelectionDialog)
[BOBJECTLIST_OWNERSHIP_IS_TEMPLATE_PARAMETER]: Adjust
accordingly.
2025-02-10 12:04:27 +08:00
Eli Zaretskii
3cd9f62687 Merge from origin/emacs-30
ed9dd4705c ; * admin/authors.el (authors-aliases): Add aliases.
223ee56aae ; Avoid passive tense in Emacs manual
be4cf26c16 Fix gnus-score-find-score-files-function :type
143f1096da Improve documentation of 'file-name-concat'
2025-02-08 07:36:34 -05:00
Robert Pluim
a62b58648a ; * src/keyboard.c (syms_of_keyboard): Fix previous change. 2025-02-07 15:55:28 +01:00
Michael Albinus
0065c9dbb8 Suppress unneded events in special-event-map
* src/keyboard.c (keys_of_keyboard): Don't add ns-put-working-text
and ns-unput-working-text to Vspecial_event_map unless on NS port.
2025-02-07 15:14:47 +01:00
Eli Zaretskii
f806b9cba6 ; * src/keyboard.c (Finsert_special_event): Don't use "//". 2025-02-07 13:37:56 +02:00
Michael Albinus
d41178368e New function insert-special-event and special event sleep-event
* doc/lispref/commands.texi (Misc Events): Add sleep-event.
(Special Events): New function insert-special-event.

* etc/NEWS: New function insert-special-event.  New event 'sleep-event'.
Fix typos.

* src/keyboard.c (Finsert_special_event): New defun.
(syms_of_keyboard): Declare Qsleep_event.  Define subroutine
Sinsert_special_event.  Add sleep-event to Vspecial_event_map.
(Bug#63620)
(kbd_buffer_get_event, make_lispy_event)
(init_while_no_input_ignore_events, is_ignored_event):
* src/termhooks.h (event_kind): Add SLEEP_EVENT.
2025-02-07 12:04:05 +01:00
Eli Zaretskii
143f1096da Improve documentation of 'file-name-concat'
* doc/lispref/files.texi (Directory Names):
* src/fileio.c (Ffile_name_concat): Advise not to use
'file-name-concat' unless necessary.  (Bug#76023)
2025-02-06 10:42:04 +02:00
Stefan Monnier
1f4a26df86 Merge remote-tracking branch 'origin/emacs-30' 2025-02-05 20:21:03 -05:00
Stefan Monnier
4be087f1e1 (font-ccl-encoder-alist): Delete variable, unused
* src/ccl.c (syms_of_ccl): Remove `font-ccl-encoder-alist`.
* lisp/language/ethiopic.el (ccl-encode-ethio-font): Delete CCL program.
(font-ccl-encoder-alist): Don't modify it.
2025-02-05 19:43:45 -05:00
Eli Zaretskii
a1f2f5995d Revert "Improve bidi_get_time runtime checking"
This reverts commit 782ec71053.
It makes the code less readable and less future-proof, so a
net loss.  (Bug#75964)
2025-02-05 14:44:01 +02: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
Paul Eggert
782ec71053 Improve bidi_get_time runtime checking
* src/bidi.c (bidi_get_type): Improve runtime checking, by also
aborting if the bidi_type_table entry is not a bidi_type_t value.
2025-02-04 13:04:35 -08:00
Gerd Möllmann
f9a1f449d9 Fix min-width display spec handling (bug#76014)
* src/xdisp.c (display_min_width): Take into account that the output may
already be longer than the specified min-width.
2025-02-04 15:43:42 +01:00
Eli Zaretskii
5c36b41265 * src/fileio.c (Fsubstitute_in_file_name): Doc fix (bug#76023). 2025-02-04 16:06:36 +02:00
Pip Cet
14ebe4d5db Fix GC-related crashes in styled_format (bug#75754)
This approach ensures we don't use an SSDATA pointer after GC, and
that no Lisp callback code can modify the format string while we're
working on it.

* src/editfns.c (styled_format): Operate on a copy of the format
string rather than the original.  Ensure final NUL byte is copied.
2025-02-03 20:52:57 +00:00
Eli Zaretskii
a22e971a11 Fix -nw sessions on MS-Windows
* src/w32console.c (w32con_clear_end_of_line): Set the space
glyphs' frame to NULL.
(w32con_write_glyphs): Handle face_id_frame == NULL, when called
from 'w32con_clear_end_of_line'.
(tty_draw_row_with_mouse_face): Adjust to changes in term.c.
2025-02-03 18:36:11 +02:00
Gerd Möllmann
a8e8524379 Handle mouse highlighting in the presence of tty child frames
* src/term.c (tty_draw_row_with_mouse_face): Draw only parts
of the highlighted text that are not covered by other frames.
2025-02-03 06:13:16 +01:00
Paul Eggert
7ac05c33b1 Improve malloc Lisp alignment commentary
Prompted by a private email from Pip Cet.
2025-02-01 22:55:30 -08:00
Eli Zaretskii
354b2907fc Fix mouse pointer inside mouse-face on text with 'pointer' property
* src/dispnew.c (gui_update_window_end): Don't consider mouse face
overwritten.
* src/xdisp.c (show_mouse_face): Accept an additional argument;
redefine the mouse cursor only if that argument is 'true'.  All
callers changed.  (Bug#75931)
2025-02-02 08:23:02 +02:00
Gerd Möllmann
42f1318e65 Fix hiding tty cursor for overlapping children
* src/dispnew.c (is_cursor_obscured): If selected frame is in the
z-order of the root frame, use that, otherwise use the root frame.
2025-02-02 05:44:39 +01:00
Paul Eggert
c91c591f0f Omit 2 ‘volatile’s in internal_lisp_condition_case
* src/eval.c (internal_lisp_condition_case): Omit an unnecessary
‘volatile’ and an unnecessary pointer-to-volatile local var.
Perhaps these were needed in previous versions of Emacs, or to
pacify older versions of GCC when using --enable-gcc-warnings,
but they are not needed to pacify current GCC.
2025-02-01 14:17:54 -08:00
Pip Cet
5a5706f943 ; src/pdumper.c (dump_hash_table): Bump CHECK_STRUCTS hash. 2025-02-01 17:08:27 +00:00
Pip Cet
4eabfd68c9 Use #$ for lambda fixups in native compilation data vectors
The "#$" syntax is recognized by Fread, which substitutes
Vload_file_name in its place.  If Vload_file_name is bound
appropriately, no other value can produce an object EQ to the one
produced by "#$".

We use this to check the data vector for entries that we know should
have been initialized: if the value is still equal to what we bound
Vload_file_name to when it was read, it wasn't initialized, and we
abort.

* lisp/emacs-lisp/comp.el (comp--#$): New defvar.
(comp--finalize-container): Use it.
* src/comp.c (ABI_VERSION): Bump.
(emit_static_object): Ensure 'comp--#$' prints as "#$".
(load_static_obj): Ensure '#$' reads as Vcomp__hashdollar.
(check_comp_unit_relocs): Adjust assertion.
(syms_of_comp): Define 'comp--#$'.
* src/pdumper.c (dump_do_dump_relocation): Adjust assertion.
2025-02-01 17:02:50 +00:00
Po Lu
532ff6e29d Fix compilation warnings on Android
* src/alloc.c (pointer_align): Only define if
!USE_ALIGNED_ALLOC.
2025-02-01 20:59:24 +08:00
Eli Zaretskii
22ab03e155 ; Avoid compiler warnings in the MS-Windows build
* src/w32heap.c: Remove unused variables, to avoid compilation
warnings.  This removes variables that were used only in the
unexec build.
2025-02-01 12:21:51 +02:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Paul Eggert
3a7809f9cc Don’t use garbage after tty_frame_at returns nil
* src/term.c (handle_one_term_event): Don’t access possibly
uninitialized storage if frame is nil.  This fixes an issue introduced
in commit 5eae7f5227 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).
2025-01-31 15:01:34 -08:00
Pip Cet
e8ae77e939 Revert "Prefer static switch-case checking in pdumper"
This reverts commit 6e2e7265a0.
2025-01-31 15:01:34 -08:00
Pip Cet
6cfac8e3a3 Revert "Pacify -Wanalyzer-use-of-uninitialized-value"
This reverts commit 1ed769a3cb.
2025-01-31 15:01:34 -08:00
Pip Cet
fa6eb08dc0 Revert "; * src/pdumper.c (dump_do_fixup): Pacify GCC.
This reverts commit a99ba59aa0.
2025-01-31 15:01:34 -08:00