1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-02 18:21:19 -08:00
Commit graph

49605 commits

Author SHA1 Message Date
Po Lu
02e70821b3 Restore functionality on Android 2.2
* java/Makefile.in (install_temp): Do not compress
directory-tree and generate such files in a special format that
stores file sizes.

* lib-src/asset-directory-tool.c (struct directory_tree): New
field st_size.
(need_file_size): New variable.
(main_1, main_2, main): Write file sizes before sibling offsets
if `--api-8' is specified.

* src/android-asset.h (struct android_asset_manager): New field
open.
(struct android_asset): New field name.
(AAssetManager_fromJava): Load AssetManager#open.
(AAssetManager_open): If a directory tree has already been
loaded, search for a matching asset and load its size thence, to
avoid the requirement of an AssetFileDescriptor.
(AAsset_close): Don't assume asset->fd exists.  Release
asset->name.
(AAsset_getLength): Likewise.
(android_asset_create_stream): If asset->name exists, call
AssetManager#open, in order to open compressed files.

* src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8.
(android_extract_long, android_scan_directory_tree): Mark
arguments as const.  Adjust offsets when OLD_ANDROID_ASSETS.
(android_is_directory, android_init_assets, android_afs_readdir):
Likewise.

* src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
2024-06-12 16:44:21 +08:00
Dmitry Gutov
3199b8584e read_and_insert_process_output: Insert before markers
* src/insdel.c (adjust_markers_for_insert): Make non-static.

* src/lisp.h: Add declaration for it.

* src/process.c (read_and_insert_process_output): Use it here.
And also call insert_1_both with BEFORE_MARKERS=t, for
compatibility with internal-default-process-filter (bug#66020).
2024-06-11 21:03:19 +03:00
Eli Zaretskii
4b902f5031 ; * src/emacs.c (Fkill_emacs): Doc fix. 2024-06-11 15:39:51 +03:00
Po Lu
cc30758eed Enable support for color fonts in recent releases of Xft
* etc/PROBLEMS (Some fonts are detected..): Document that Xft
2.3.6 should have resolved this issue.

* src/ftfont.c (ftfont_spec_pattern, ftfont_list): Disable
inhibition of color fonts on Xft 2.3.6 and subsequent versions.
2024-06-11 17:00:00 +08:00
Eli Zaretskii
c0aa201ade ; Revert "Provide for negative PIDs on MS Windows"
This reverts commit 9e96fbfd85.
Please don't install any changes in this area without discussion.
Bug#71477.
2024-06-11 10:38:58 +03:00
Eli Zaretskii
57c492e1c0 ; Revert "* src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly."
This reverts commit f33806dd66.
Please don't install changes in this area without discussion.
2024-06-11 10:38:11 +03:00
Eli Zaretskii
a95f9e5bc6 ; * src/process.c (read_and_dispose_of_process_output): Fix style. 2024-06-11 10:37:31 +03:00
Dmitry Gutov
bac8a70f45 fast-read-process-output: Make safer
* src/process.c (read_process_output): Move the call to
'read_and_insert_process_output' from here.
(read_and_dispose_of_process_output): To here (bug#66020).  So
that any Lisp code invoked through modification hook from the
former function also benefit from safety guards like
running_asynch_code, saved match data, inhibit_quot, etc.
2024-06-11 05:54:57 +03:00
Dmitry Gutov
d9890bb870 read_process_output_set_last_coding_system: Extract, reuse
* src/process.c (read_process_output_set_last_coding_system):
New function, extracted from read_and_dispose_of_process_output.
(read_and_dispose_of_process_output): Update accordingly.
(read_and_insert_process_output): Use it here instead of just
transferring carryover (bug#66020, also mentioned in bug#71452).
2024-06-11 05:37:45 +03:00
Po Lu
f33806dd66 * src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly. 2024-06-11 10:15:28 +08:00
Po Lu
9e96fbfd85 Provide for negative PIDs on MS Windows
* src/filelock.c (pid_t, getpid_for_lock, pidintmax, EPRIdMAX):
New macros; define to unsigned long or corresponding values if
WINDOWSNT.
(lock_file_1, current_lock_owner): Replace intmax_t, getpid,
pid_t and the like with the aforementioned macros.  (bug#71477)
2024-06-11 10:05:14 +08:00
Dmitry Gutov
5a576069fc read_and_insert_process_output: Call 'prepare_to_modify_buffer' first
* src/process.c (read_and_insert_process_output): Call
'prepare_to_modify_buffer' before any insertions (bug#71452).
2024-06-11 04:51:37 +03:00
Po Lu
f74f4089fd ; * src/process.c (syms_of_process): Fix ommission. 2024-06-11 09:09:35 +08:00
Eli Zaretskii
7c97d05b56 Avoid rare assertion violations when deleting a frame
* src/dispnew.c (adjust_frame_glyphs): Allow nrows = 0 when
deleting a frame.  (Bug#71475)
2024-06-10 22:13:29 +03:00
Eli Zaretskii
2ac85aa613 ; * src/treesit.c (treesit_check_node): Don't use non-ASCII comments. 2024-06-10 21:24:51 +03:00
Eli Zaretskii
aca5de19b8 Allow to print treesit objects from GDB
* src/.gdbinit (xtsparser, xtsnode, xtsquery): New functions.
(xpr): Call them for treesit objects.
2024-06-10 21:12:12 +03:00
Mattias Engdegård
ce4e5e6a28 * src/print.c (print_vectorlike_unreadable): Fix merge accident. 2024-06-10 18:50:15 +02:00
Po Lu
485b01429f ; * src/process.c (read_process_output): Check in missing hunk. 2024-06-10 21:15:45 +08:00
Po Lu
5df7506a49 Rename new variable in process.c
* src/process.c (syms_of_process): Rename
read_process_output_fast to fast_read_process_output.
2024-06-10 21:13:34 +08:00
Po Lu
bd80717d8e Re-enable TTY glyph production for batch mode frames on Android
* lisp/org/ob-core.el (org-babel-execute-src-block): Revert
previous change.

* src/term.c (tty_append_glyph, produce_glyphs) [HAVE_ANDROID]:
Re-enable suppressed code.
2024-06-10 11:56:24 +08:00
Stefan Kangas
a1a4c6dccb Unbreak build with Clang 15 on macOS 14.5
* src/process.c (read_process_output): Use EQ for comparison.
(syms_of_process): Properly set a DEFVAR_BOOL to 'true' instead of 'Qt'.
2024-06-09 20:58:08 +02:00
Eli Zaretskii
6cc23f4b2a Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-06-09 16:28:41 +03:00
Po Lu
f22ae39a1a Enable accessing tool bar with the touch screen
* src/w32fns.c (w32_createwindow): Reset tool_bar_dwID.

* src/w32term.c (w32_read_socket): Reserve touch event sequences
that fall on the tool bar for future tool-bar manipulation.

* src/w32term.h (struct w32_output) <tool_bar_dwID>: New field.
2024-06-09 21:26:51 +08:00
Eli Zaretskii
b8e78d2657 Fix MS-Windows build broken by recent touch-screen changes
* src/w32term.c (TOUCHEVENTF_DOWN, TOUCHEVENTF_UP):
(struct _TOUCHINPUT): Move before first use.
(TOUCHEVENTF_MOVE, TOUCHEVENTMASKF_CONTACTAREA)
(TOUCHEVENTMASKF_EXTRAINFO, TOUCHEVENTMASKF_TIMEFROMSYSTEM): Ifdef
away unused macros.
(w32_read_socket): Fix typo.
2024-06-09 16:26:14 +03:00
Po Lu
588a8439e0 Amend last change
* lisp/loadup.el: Load touch-screen.el on MS-Windows.

* src/w32fns.c (Emacs_GESTURECONFIG): New structure.
(SetGestureConfig_fn): New variable.
(w32_createwindow): Disable emulated mouse and gesture events
for the frame's window.
(w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_LBUTTONUP>
<WM_RBUTTONUP>: Ignore mouse events which are marked as emulated
pointer events.
(globals_of_w32fns): Load SetGestureConfig from user32.dll.

* src/w32term.c (w32_read_socket): Correct utilization of
GetTouchInputInfo, coordinate spaces, &c.
2024-06-09 20:40:59 +08:00
Po Lu
5eb729c0b3 Report touch events on MS-Windows
* etc/NEWS: Announce change.

* src/w32fns.c (RegisterTouchWindow_fn): New function.
(w32_createwindow): Assign a base value for touch event
identifiers to the frame, and register for touch input.
(w32_wnd_proc): Forward WM_TOUCH/WM_TOUCHMOVE messages to the
main thread.
(globals_of_w32fns): Load RegisterTouchWindow from user32.dll.

* src/w32term.c (w32_read_socket) <WM_TOUCH>: Detect WM_TOUCH
events, compare and record their touch points with and into the
frame's record of their prior state, and report the same to Lisp.
(pfnCloseTouchInputHandle, pfnGetTouchInputInfo): New variables.
(w32_initialize): Load the above functions from user32.dll.

* src/w32term.h (MAX_TOUCH_POINTS): New definition.
(struct w32_output) <touch_ids, touch_x, touch_y, touch_base>:
New fields.
2024-06-09 20:40:58 +08:00
Eli Zaretskii
1f407e286c Fix a recent change in reading from sub-processes
* src/process.c (make_process): Move to here...
(create_process): ...from here.
2024-06-09 12:13:18 +03:00
Po Lu
f896c5e8ca ; Fix coding style of last change
* src/process.c (read_and_insert_process_output)
(read_and_dispose_of_process_output): Fix coding style.
2024-06-09 09:11:01 +08:00
Dmitry Gutov
d4bbffe83d read-process-output-max: Increase the default value
* src/process.c (read-process-output-max):
Increase the default value to 65536 (bug#66020).
2024-06-09 02:58:19 +03:00
Dmitry Gutov
8cf6e311b8 Remember the value of read_process_output_max when process is created
* src/process.h (Lisp_Process): Add field readmax.

* src/process.c (read_process_output): Use it.
(create_process): Save the value of read_process_output_max to
it when the process is created (bug#66020).  Use for pipe size.
2024-06-09 02:51:47 +03:00
Dmitry Gutov
bbc18031af Go around calling the default process filter (reducing GC churn)
Instead of allocating strings and passing them to the filter, pass
the char buffer to a C function implementing the same logic.

* src/process.c (read_process_output_before_insert)
(read_process_output_after_insert):
New functions, extracted from internal-default-process-filter.
(Finternal_default_process_filter): Use them.
(read_and_insert_process_output): New function.  Use them.
(read_process_output_fast): New variable.
(read_process_output): Use it to choose how to insert (bug#66020).

* etc/NEWS: Mention the change.
2024-06-09 02:44:19 +03:00
Eli Zaretskii
35e65a84eb Merge from origin/emacs-29
53e9caa23e ; * doc/emacs/help.texi (Help, Apropos): Improve text and...
00360258ca Fix treesit-parse-string crash (bug#71012)
20af58d3a1 Check for buffer liveness when accessing tree-sitter node...
2024-06-08 07:34:20 -04:00
Stefan Kangas
bef514de4d ; Fix typos 2024-06-07 23:51:18 +02:00
Eli Zaretskii
e99a821f97 Avoid crashes in half-baked emacsclient frames
If a client connection comes in while we handle a Lisp error,
the new frame creation could signal an error before the new
frame is ready for display.
* src/xdisp.c (redisplay_internal): Don't redisplay windows on
frames that were not completely set up.  (Bug#71224)
2024-06-07 22:30:41 +03:00
Eli Zaretskii
b4b4c0fec4 Unbreak the Cygw32 build
It was broken by latest changes to w32image.c.
* src/emacs.c (main): Call 'syms_of_w32image' and
'globals_of_w32image' only if native image APIs are enabled.
(Bug#71412)
2024-06-07 16:34:53 +03:00
Eli Zaretskii
7d36bb0547 ; * src/dispnew.c (update_frame_line): Fix thinko (bug#71289). 2024-06-07 09:11:04 +03:00
Eli Zaretskii
91f51f5ac5 Prevent another abort in 'cmcheckmagic'
* src/dispnew.c (update_frame_line): Prevent rare aborts when TTY
frame is resized.  (Bug#71289)
2024-06-06 17:43:00 +03:00
Eli Zaretskii
9da2faf73b ; Fix last change in sqlite.c
* etc/NEWS:
* doc/lispref/text.texi (Database):
* src/sqlite.c (Fsqlite_execute_batch): Fix last change (Bug#70145).
2024-06-06 13:06:58 +03:00
Javier Olaechea
23ef989935 Add 'sqlite-execute-batch' command
This command is similar to 'sqlite-execute' except that it
executes multiple statements in exchange for not accepting
any arguments.  (Bug#70145)
* src/sqlite.c (Fsqlite_execute_batch): New function.

* test/src/sqlite-tests.el (sqlite-multiple-statements): Add
smoke test for 'sqlite-execute-batch'.

* etc/NEWS: Mention new command 'sqlite-execute-batch'.
* doc/lispref/text.texi (Database): Document the new command.
2024-06-06 12:51:46 +03:00
Eli Zaretskii
7fbafb9d95 Attempt to fix rare assertion violations in 'mark_terminals'
* src/terminal.c (delete_terminal): Block input while we modify
the frame list and 'terminal_list'.  (Bug#71289)
2024-06-06 10:47:21 +03:00
Eli Zaretskii
6fbb699bee ; Fix last change. 2024-06-05 19:32:17 +03:00
Eli Zaretskii
e84057d072 Another attempt to prevent crashes when resizing TTY frames
* src/dispnew.c (frame_size_change_delayed): Accept frame as
argument, and check the 'new_size_p' flag of the frame in
addition to 'delayed_size_change'.  Callers changed.
(window_to_frame_vpos, build_frame_matrix_from_leaf_window): Call
'frame_size_change_delayed' instead of looking at
delayed_size_change alone.  (Bug#71289)
2024-06-05 19:18:49 +03:00
Po Lu
b2ed1ed1d8 Fix Mac OS build
* src/nsfns.m (ns_make_frame_key_window): Restore, but
only when NS_IMPL_COCOA.
2024-06-05 17:11:27 +08:00
Po Lu
533ed7b221 Fix the GNUstep build
* src/Makefile.in (NON_OBJC_CFLAGS): Add
-Wflex-array-member-not-at-end.

* src/lisp.h (flush_stack_call_func): "asm" is unavailable in
Objective C.

* src/nsfns.m (ns_make_frame_key_window): Delete unused
function.
2024-06-05 16:41:52 +08:00
Paul Eggert
3dcac22dd4 Spelling fixes 2024-06-04 22:16:28 -07:00
Yuan Fu
2ee3edce3f
Revert "New function treesit-parser-changed-ranges"
This reverts commit 996b957671.

For reason see 760b54de08.
2024-06-04 21:44:05 -07:00
Robert Pluim
3656a81850 ; * src/cm.c (cmcheckmagic): Typo fix. 2024-06-04 15:56:41 +02:00
Paul Eggert
ce660c5c30 lwlib: pacify gcc -Wmissing-variable-declarations
* lwlib/lwlib.c (lwlib_toolkit_type): Remove unused var.
* lwlib/xlwmenu.c (submenu_destroyed): Now static.
* src/xmenu.c (widget_id_tick): Declare extern, as a FIXME.
2024-06-03 22:34:33 -07:00
Eli Zaretskii
642bf58d4f Avoid assertion violations in 'try_window_id'
* src/xdisp.c (try_window_id): Avoid assertions in
'find_first_unchanged_at_end_row' due to 'init_iterator' freeing
all the realized faces.  (Bug#71274)
2024-06-03 21:13:05 +03:00
Eli Zaretskii
eb9afd558e Avoid crashes and assertions while handling SIGWINCH
* src/dispnew.c (build_frame_matrix_from_leaf_window)
(window_to_frame_vpos): Avoid assertion violations when we have an
unhandled SIGWINCH.
(frame_size_change_delayed): New function.
* src/dispextern.h (frame_size_change_delayed): Add prototype.
* src/cm.c (cmcheckmagic): Don't check magicwrap if we have an
unhandled SIGWINCH.  (Bug#71289)
2024-06-03 20:37:31 +03:00