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

49710 commits

Author SHA1 Message Date
Eli Zaretskii
13f69f254c Fix rare segfaults due to freed fontsets
* src/xfaces.c (recompute_basic_faces): Force complete
recalculation of non-ASCII faces and their fontsets if any
non-ASCII faces are in the frame's face cache.  (Bug#72692)
2024-08-29 12:56:27 +03:00
Eli Zaretskii
9b299dd79c Revert a recent change that caused redisplay slowdown
* src/xfaces.c (recompute_basic_faces): Revert the change which
caused recalculation of all the faces, as it made cursor motion
too slow.  Reported by Juri Linkov <juri@linkov.net> (bug#72692).
2024-08-25 21:43:59 +03:00
Eli Zaretskii
4211d85eec Fix rare segfaults due to freed fontsets
* src/xfaces.c (recompute_basic_faces): Force complete
recalculation of all the faces.  (Bug#72692)
2024-08-24 12:07:02 +03:00
Martin Rudalics
25f5372166 Avoid putting a dead buffer in the minibuffer window (Bug#72487)
* src/minibuf.c (minibuffer_unwind): Make sure that the buffer
referenced by the first element of the list of previous buffers
of the minibuffer window is live before assigning it to the
minibuffer window (Bug#72487).
* src/window.c (set_window_buffer): Assert that BUFFER is live.
2024-08-23 10:27:12 +02:00
Po Lu
3419e7ea52 Correct Android failure to open an old CJK font
* src/sfnt.c (sfnt_read_cmap_format_2): Properly compute
subtable count, and append the empty table at position 0.
(sfnt_lookup_glyph_2): Update commentary.
2024-08-20 21:56:41 +08:00
Eli Zaretskii
fc7581ae2e ; Fix documentation of secure-hash functions
* src/fns.c (Fsecure_hash):
* doc/lispref/text.texi (Checksum/Hash):
* lisp/subr.el (sha1): Fix documentation wrt to the number of
bytes 'secure-hash' and its variants return when BINARY is
non-nil.  Reported by Pip Cet <pipcet@protonmail.com>.
2024-08-19 17:51:50 +03:00
Eli Zaretskii
9e7c2d3816 Avoid rare crashes due to clobbering of input events
* src/keyboard.c (read_char): Declare C 'volatile', to prevent
clobbering it by setjmp/longjmp.  Do not merge to master.
(Bug#71744)
2024-08-17 21:35:08 +03:00
Po Lu
5397808e5b ; Eliminate more C++ comments
* lib-src/movemail.c:

* nt/preprep.c (main):

* src/unexw32.c (unexec): Convert C++-style comments to C.
2024-08-17 22:04:01 +08:00
Po Lu
8d5f88d326 Backport ed305c4b98 to emacs-30
* src/xterm.c (x_construct_mouse_click): `||' → `|'.
Typo found by clang 18.1.6 -Wbool-operation.  Do not
merge to master.
2024-08-17 21:53:30 +08:00
Peter Oliver
8a072d1f05 Apply --display kluge for PGTK too
* src/emacs.c (main): The --display option needs the same handling
with the PGTK backend as it does with the X11 backends.  (Bug#72118)
2024-08-17 11:04:43 +03:00
Andrea Corallo
9a04b99b3d ; * src/data.c (Fsubrp): Improve docstring. 2024-08-15 10:54:26 +02:00
Gerd Möllmann
6d55e94996 macOS: Wrong frame rectangle after wake (bug#71912)
* src/nsterm.m ([EmacsView windowDidBecomeKey]):
Call adjustEmacsFrameRect.
2024-08-12 05:11:00 +02:00
Pip Cet
5c3d340e00 Fix format 2 cmap handling in sfnt.c
This code is untested as no font with a format 2 cmap could be found.

* src/sfnt.c (sfnt_lookup_glyph_2): Fix typos.  Assume single-byte
encodings use character codes 0, 1, ..., 255 rather than 0, 256, ...,
65280.
2024-08-11 10:22:46 +00:00
Pip Cet
8e925d582a Fix coordinate transformations in sfnt.c
Backport.

* src/sfnt.c (sfnt_transform_coordinates):
(sfnt_transform_f26dot6): Fix calculation of transformed coordinates in
the very rare case of arbitrary transformation matrices.
2024-08-11 10:22:19 +00:00
Gerd Möllmann
bd6dfb97ff NS: Fix scroll-bar setting code (bug#72331)
* src/nsterm.m (ns_set_vertical_scroll_bar): Use
WINDOW_SCROLL_AREA_WIDTH instead of NS_SCROLL_BAR_WIDTH.
(ns_set_horizontal_scroll_bar): Use WINDOW_SCROLL_AREA_HEIGHT
instead of NS_SCROLL_BAR_HEIGHT. Clear area differently if vertical
scroll bars are present.
* src/nsterm.h (NS_SCROLL_BAR_WIDTH, NS_SCROLL_BAR_HEIGHT): Remove.
2024-08-09 07:21:28 +02:00
Po Lu
679f7ccc49 Prevent accesses to /content files without a GUI connection
* src/androidvfs.c (android_content_name): Hide all
subdirectories when `android_init_gui' is not set.
2024-08-07 09:17:57 +08:00
Eli Zaretskii
f1e37ae423 Avoid crashes in very large buffers with long lines
* src/xdisp.c (get_large_narrowing_begv, get_large_narrowing_zv)
(get_medium_narrowing_begv, get_medium_narrowing_zv): Use
'ptrdiff_t' instead of 'int', to prevent integer overflow in
large buffers.  (Bug#72497)
2024-08-06 21:19:49 +03:00
Eli Zaretskii
729b17c202 ; * src/lread.c (Fload): Add comment. (Bug#72433) 2024-08-04 11:58:00 +03:00
Mattias Engdegård
e50d597f45 Fix missing type checks before specbind
This fixes bugs that crashed Emacs when the Lisp interpreter was fed
bad code.

* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Hoist symbol-with-pos elimination and type checks to a
dominating position for efficiency.  This also plugs at least two typing
holes. (Mea culpa.)
* test/src/eval-tests.el (eval-bad-specbind): New regression test.
2024-08-03 19:32:23 +02:00
Po Lu
8d073823c6 Revert "Remove redundant byte-swapping boundary"
This reverts commit daefd6771a.

* src/sfnt.c (sfnt_read_OS_2_table): Restore realignment after
s_family_class, as it occupies byte 32, not 34.  Reported by Pip
Cet <pipcet@protonmail.com>.
2024-08-03 17:34:32 +08:00
Po Lu
c25687e860 Fix various typos reported by Pip Cet
* src/ftfont.c (get_adstyle_property):

* src/sfntfont.c (sfntfont_list_1): Correct typos.  Reported by
Pip Cet <pipcet@protonmail.com>.
2024-08-03 17:09:49 +08:00
Gerd Möllmann
e539a5c7d7 NS: Fix placement of candidate window (bug#72422)
* src/nsterm.m ([EmacsView firstRectForCharacterRange:actualRange:]):
Call method of NSTextInput.
2024-08-03 10:29:24 +02:00
Eli Zaretskii
ef5466c267 Avoid aborts when buffer is modified during its redisplay
* src/xdisp.c (redisplay_window): Restore point from saved byte
position only if the buffer was not changed meanwhile.
(Bug#72165)
2024-08-01 14:01:17 +03:00
Gerd Möllmann
ceb5a15222 MacOS: Let EmacsView implement NSTextInputClient
* src/nsterm.h (@interface EmacsView): Implement NSTextInputClient protocol.
* src/nsterm.m: Implement required NSTextInputClient methods, forwarding
to existing NSTextInput methods.
2024-07-31 05:19:46 +02:00
Gerd Möllmann
9f7c1ace9f NS: Set frame position when entering/exiting fullscreen (bug#71912)
* src/nsterm.h ([EmacsView adjustEmacsRectRect]): Declare.
* src/nsterm.m ([EmacsView windowDidEnterFullScreen]): New method.
([EmacsView windowDidEnterFullScreen]): Call it.
([EmacsView windowDidExitFullScreen]): Call it.
2024-07-30 06:02:15 +02:00
Po Lu
5cf64d8377 Fix sporadic crashes and `select' failures in dumped images
* src/process.c (init_process_emacs) [HAVE_UNEXEC]: Clear
dumped values of child_signal_read_fd and child_signal_write_fd.
2024-07-29 10:37:16 +08:00
Gerd Möllmann
68a5f1f7d1 NS: prevent makeKeyWindow warnings (bug#69525)
* src/nsterm.m (ns_raise_frame): Don't makeKeyWindow if frame has
no_accept_focus set.
2024-07-26 20:59:25 +02:00
Stefan Kangas
a799661566 Standardize possessive apostrophe usage in manuals, docs, and comments
See the note in admin/notes/documentation.
Ref: https://lists.gnu.org/r/emacs-devel/2012-02/msg00649.html
2024-07-25 03:35:18 +02:00
Po Lu
23549d7175 * src/image.c (gui_put_x_image): Avoid memory leak. 2024-07-24 20:13:01 +08:00
Po Lu
3a76354e09 Adapt last change to non-NS systems
* src/image.c (xpm_load_image): Also check whether mask_img is
NULL.
2024-07-24 11:59:53 +08:00
Po Lu
b5543c54bf Fix NULL pointer dereferences in xpm_load_image
* src/image.c (x_destroy_x_image): Correct test condition.
(xpm_load_image): Do not release image data if it is still to be
created.
2024-07-24 11:57:28 +08:00
Po Lu
1ee8579eb7 Fix bug#72255
* src/image.c (struct image_type): Minor grammatical
corrections.
(image_destroy_x_image): [HAVE_NS]: Do not release
Emacs_Pix_Containers, which are identical to Emacs_Pixmaps and
consequently always released with the `struct image'.
(bug#72255)
2024-07-24 11:39:07 +08:00
Eli Zaretskii
7588e1f8a9 ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2024-07-23 14:07:30 +03:00
Gerd Möllmann
2074e94c3b Fix disappearing bar cursor on Hebrew text (bug#72230)
* src/nsterm.m (ns_draw_window_cursor): Compute the correct bar cursor
rectangle for R2L before setting the clipping.
2024-07-23 08:15:09 +02:00
Yuan Fu
87f41b937b
Fix Ftreesit_parser_create
* src/treesit.c (Ftreesit_parser_create): Use the buffer given by the
caller rather than the current buffer.
2024-07-21 17:21:58 -07:00
Yuan Fu
ed38fcc017
Fix segfault when deleting tree-sitter query (bug#72238)
* src/treesit.c (treesit_delete_query): Only delete query and cursor
when they are non-NULL.
2024-07-21 17:14:08 -07:00
Stefan Kangas
c66bda1a19 Improve treesit-node-child-by-field-name docstring
* src/treesit.c (Ftreesit_node_child_by_field_name): Improve docstring.
2024-07-21 22:21:11 +02:00
Stefan Kangas
68615a3866 Fix punctuation and doc style in treesit.c
* src/treesit.c (Ftreesit_parser_included_ranges)
(Ftreesit_query_capture, treesit_traverse_sibling_helper)
(treesit_traverse_match_predicate): Fix punctiation and documentation
style in comments and docstrings.
2024-07-21 17:47:41 +02:00
Eli Zaretskii
07b1a36f78 ; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to allowed extensions. 2024-07-20 10:27:52 +03:00
Stefan Kangas
a6cab228d4 ; Fix typos 2024-07-18 11:46:50 +02:00
Stefan Kangas
c9d28a05d9 Avoid overflow in pgtk_is_numeric_char
* src/pgtkfns.c (parse_resource_key): Avoid overflow by making array
larger, if a key is RESOURCE_KEY_MAX_LEN long.  Do not merge to master,
since it's fixed in a different way there.
2024-07-18 09:42:07 +02:00
Po Lu
4c35382e98 ; * src/emacs.c (syms_of_emacs) <Vsystem_type>: Fix doc string indentation. 2024-07-18 13:35:47 +08:00
Po Lu
c56e837a10 ; * src/android.c (setEmacsParams): Delete unused variable. 2024-07-14 12:51:48 +08:00
Po Lu
b00fc31dd1 Do not set LD_LIBRARY_PATH during Android initialization
* doc/emacs/android.texi (Android Environment): Adjust
documentation to match.

* java/org/gnu/emacs/EmacsNoninteractive.java (main1): New
function.  Remove initialization of EmacsNative hither.
(main): Acquire an ApplicationInfo or LoadedApk, as the case may
be on the host system, derive a ClassLoader from the result, and
load and call `main1' from within this class loader.

* src/android-emacs.c (main):

* src/android.c (setEmacsParams): Do not override
LD_LIBRARY_PATH or set EMACS_LD_LIBRARY_PATH.  This enables
Emacs to execute subprocesses in certain "fortified" Android
systems, amongst other things.
2024-07-14 12:46:23 +08:00
Raffael Stocker
a6c78ccf5f ; * src/w32fns.c (Fw32_notification_close): Fix typo (bug#72091). 2024-07-13 15:19:46 +03:00
Eli Zaretskii
bc154cba13 ; * src/search.c (Fre_search_forward): Clarify doc string (bug#71879). 2024-07-13 13:22:01 +03:00
Eli Zaretskii
ce13eee5ab ; * src/image.c (free_image_cache): Add assertion. (Bug#71929) 2024-07-12 09:39:39 +03:00
Po Lu
b22ab99f0a Render more Android functions safe to execute in a batch session
* src/androidfns.c (Fx_display_mm_width, Fx_display_mm_height)
(Fandroid_display_monitor_attributes_list)
(Fandroid_external_storage_available_p)
(Fandroid_request_storage_access): Verify that a display
connection or service object is available.

* src/androidselect.c (Fandroid_get_clipboard)
(Fandroid_browse_url_internal, Fandroid_get_clipboard_targets)
(Fandroid_get_clipboard_data, Fandroid_notifications_notify):
Moderate tone of error messages.
2024-07-12 14:31:33 +08:00
Po Lu
8350ebd22e Fix bug#71929
* src/image.c (free_image_cache): Unconditionally release image
cache, as this function is only called with its existence
already established.

* src/xfaces.c (free_frame_faces): Clear FRAME_IMAGE_CACHE (f).
(bug#71929)
2024-07-09 22:02:22 +08:00
Po Lu
671ad83026 Fix bug#70697 with respect to fringe bitmaps
* src/pgtkterm.c (pgtk_draw_fringe_bitmap): Always call
`fill_background_by_face' for clearing backgrounds of fringe
bitmaps.  (bug#70697)
2024-07-09 14:10:07 +08:00