aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * Prevent rare freeze on Android 4.2 through 4.4Po Lu2025-02-281-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (android_run_select_thread, android_init_events) (android_select): Enable self-pipes on all Android versions <= 21. The Android C library provides a functioning pselect on these systems, but it does not apply the signal mask atomically. (android_run_select_thread): Correct typo. This never produced any adverse consequences, as the relevant signals would already have been blocked by `setupSystemThread'. Do not merge to master.
| * ; * src/keymap.c: Fix last change (bug#75219).Eli Zaretskii2025-02-281-1/+1
| | | | | | | | (cherry picked from commit 412c1a4f0e1df8c82bd94f02e21c1ef62b3d53d5)
| * Fix mouse-2 clicks on mode line and header lineEli Zaretskii2025-02-281-4/+14
| | | | | | | | | | | | | | | | * src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and header-line, always override the keymaps at buffer position. (Bug#75219) (cherry picked from commit c41ea047a434710c4b7bc8280695c83fbe5fff35)
* | Fix redisplay of tab bar when its text properties changeEli Zaretskii2025-03-061-1/+4
| | | | | | | | | | * src/xdisp.c (update_tab_bar): Use 'equal-including-properties' to compare previous with the current tab-bar items. (Bug#76760)
* | Permit executing programs with >1024 args on AndroidPo Lu2025-03-051-18/+21
| | | | | | | | | | | | * src/android.c (MAXARGS): Delete enumerator. (android_rewrite_spawn_argv): Don't mandate a maximum number of arguments.
* | ; * src/nsterm.m (syms_of_nsterm): Fix typo in comment.Po Lu2025-03-051-4/+3
| |
* | Make Emacs buildable with -std=c11.Philipp Stephani2025-03-041-1/+1
| | | | | | | | | | | | | | | | | | With -std=c11, GCC doesn't recognize 'asm' as a keyword, see https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html and https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html. Use __asm__ instead. * src/lisp.h (flush_stack_call_func): Use __asm__ instead of asm.
* | Add ns-click-through option to control activation click handlingDaniel Colascione2025-03-041-1/+16
| | | | | | | | | | | | | | | | | | | | * src/nsterm.m (acceptsFirstMouse): Use ns_click_through variable instead of always returning YES. (syms_of_nsterm): Define ns-click-through variable. * lisp/cus-start.el: Add customization definition for ns-click-through. * etc/NEWS: Document the new option.
* | Fix 'etc/DOC' for a few functions/variablesEli Zaretskii2025-03-043-3/+3
| | | | | | | | | | | | | | | | | | * src/term.c (Ftty_frame_at): * src/menu.c (syms_of_menu) <x-popup-menu-function>: * src/dispnew.c (Fredisplay): Fix "doc:". The extra blank was preventing 'make-docfile' from recognizing the functions and variables and extracting their documentation to 'etc/DOC'. (Bug#76722)
* | ; * src/nsterm.m (ns_draw_stretch_glyph_string): One more spelling fix.Po Lu2025-03-041-1/+1
| |
* | ; Fix style and language in src/nsterm.mPo Lu2025-03-041-7/+7
| | | | | | | | | | | | * src/nsterm.m (ns_maybe_dumpglyphs_background) (ns_draw_stretch_glyph_string): Fix coding style. Use American English spelling.
* | Support colored stipples on Cocoa NS (Bug#73384)Ben Simms2025-03-043-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | On Cocoa builds of NS Emacs, stipples are now rendered using masked CGImages instead of patterned NSColors so that stipples now render with color. * src/nsimage.m ([EmacsImage stippleMask:]): Use a CGImageMask to store the stipple mask when building for Cocoa. * src/nsterm.m (ns_maybe_dumpglyphs_background): Perform a masked fill to draw stipples when building for Cocoa. (ns_draw_stretch_glyph_string): Perform a masked fill to draw stipples when building for Cocoa.
* | Revert “Avoid some union buffered_input_event uses”Paul Eggert2025-03-036-690/+630
| | | | | | | | | | | | | | | | | | | | | | | | Revert my commit 29a9fd4f4ba17822eca0f00c2037da3868bd874e and the following commit 1ec0889e7b786d79351cee3ed4964d82295f059f. This fixes a bug where ‘emacs -nw’ would sometimes freeze when Emacs is configured with ‘--with-pgtk --enable-link-time-optimization --disable-gc-mark-trace’ on GNU/Linux x86-64 (Bug#76729). As it is not yet clear whether this freeze is due to an Emacs bug that I introduced, or due to GCC bug 117423 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423>, play it safe for now and revert to the previous state.
* | ; * src/eval.c (Fdefvar_1, Fdefconst_1): Properly quote apostrophe.Philipp Stephani2025-03-041-2/+2
| |
* | Render Android hourglass cursor mechanics more consistent with XPo Lu2025-03-041-12/+26
| | | | | | | | | | | | | | | | | | * src/androidterm.c (android_show_hourglass): Always define the hourglass cursor, but... (android_hide_hourglass): ... restore the invisible cursor subsequently, if need be. (android_toggle_visible_pointer): Do not hide the current cursor if it is an hourglass.
* | Avoid crashes on MS-Windows on repeated client connectionsEli Zaretskii2025-03-031-0/+1
| | | | | | | | | | * src/w32uniscribe.c (uniscribe_close): Zero out dwrite cache. Suggested by Richard Copley <rcopley@gmail.com>. (Bug#76121)
* | Fix MS-Windows build broken by buffered_input_event changesEli Zaretskii2025-03-032-0/+4
| | | | | | | | | | | | * src/keyboard.c (kbd_buffer_store_selection_event_hold): * src/keyboard.h (kbd_buffer_store_selection_event_hold): Declare and define only for (HAVE_X11 || HAVE_PGTK).
* | Avoid some union buffered_input_event usesPaul Eggert2025-03-036-630/+686
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify by using separate local vars for struct input_event and struct selection_input_event, rather than a single local var that is the union of the two. This makes the code easier to follow by the human reader, and should help avoid GCC bug 117423 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423> and therefore work around Emacs bug 76559 <https://bugs.gnu.org/76559>. * src/androidterm.c (handle_one_android_event): * src/gtkutil.c (xg_widget_key_press_event_cb): * src/pgtkterm.c (evq_flush): * src/xterm.c (handle_one_xevent): Use struct input_event and kbd_buffer_store_event_hold, or struct selection_input_event and kbd_buffer_store_selection_event_hold, rather than union buffered_input_event and union buffered_input_event. * src/keyboard.c (beware_long_paste, maybe_quit_while_no_input): New functions, broken out from kbd_buffer_store_buffered_event. (kbd_buffer_store_event_hold): Define here, with a simplified version of the body of the old kbd_buffer_store_buffered_event, rather than defining in keyboard.h. Specialize to struct input_event. (kbd_buffer_store_selection_event_hold): New function; it is a simplified version of the old kbd_buffer_store_buffered_event, specialized to struct selection_input_event. (is_ignored_event_kind): Accept enum event_kind instead of union buffered_input_event. All callers changed. * src/keyboard.h (kbd_buffer_store_event_hold): Remove definition, as keyboard.c now defines it. * src/pgtkterm.c (evq_grow_if_needed): New function. (evq_enqueue, evq_selection_enqueue): Two functions now, not one. Args are now struct input_event const * or struct selection_input_event const *, not union buffered_input_event *. All callers changed. This lets us simplify the callers so that they need not use the union.
* | Pacify GCC in pgtkselect malloc alignmentPaul Eggert2025-03-021-8/+16
| | | | | | | | | | | | This is a better fix for Bug#76414. * src/pgtkselect.c (pgtk_nalloc): New function. (pgtk_get_window_property, lisp_data_to_selection_data): Use it.
* | Make Emacs respond to NS activation clicksDaniel Colascione2025-03-011-0/+7
| | | | | | | | | | * src/nsterm.m (acceptsFirstMouse): Opt into receiving mouse events that activate the window. (bug#76629)
* | Merge from origin/emacs-30Eli Zaretskii2025-03-011-0/+5
|\ \ | |/ | | | | | | 6f5c322f597 Recommend secure-hash in md5 docstring 1352b184f3f Improve docstring of add-hook and remove-hook
| * Recommend secure-hash in md5 docstringStefan Kangas2025-02-281-0/+5
| | | | | | | | | | * src/fns.c (Fmd5): Repeat explanation from manual about md5 being "semi-obsolete", and recommend using secure-hash instead.
| * Fix setup of coding-systems on MS-WindowsEli Zaretskii2025-02-262-1/+25
| | | | | | | | | | | | | | | | | | | | * src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call 'w32_init_file_name_codepage' again after loading the pdumper file. * src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]: Reinitialize additional variables. (Bug#75207) (cherry picked from commit cc5cd4de93d1e5ba205cbf0c370aef4559bc342b)
* | Merge from origin/emacs-30Eli Zaretskii2025-03-011-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f88dc0f2f9d ; Fix documentation of 'buffer-text-pixel-size' 734986349fd ; Minor Android documentation improvements a90da899034 ; Fix up emacs-lisp-mode docstring 58c7acb5554 ; Fix completion-fail-discreetly docstring typo. 02c830ba22b Fix ert-font-lock macro signatures 0c6b8643aec Fix a typo in 'window_text_pixel_size' 8a8c25eaccd ; Add Rudolf Schlatte to authors.el 94c0ea39a5a * doc/misc/efaq.texi (New in Emacs 30): Fix typo. (Bug#7... 0be5f9115ec ; * etc/images/README (Files): Add an entry for last-page... 63adf9dcf53 ; Reflow some cl-lib docstrings 99253f79703 ; * etc/TODO: New section "Make it easier to contribute". # Conflicts: # lisp/emacs-lisp/cl-macs.el
| * Fix a typo in 'window_text_pixel_size'Eli Zaretskii2025-02-241-1/+3
| | | | | | | | | | | | This typo caused strange mis-behaviors in buffers with non-ASCII characters. * src/xdisp.c (window_text_pixel_size): Fix typo. (Bug#76519)
* | Merge from origin/emacs-30Eli Zaretskii2025-03-011-10/+10
|\ \ | |/ | | | | 2dbf7d0b1b2 Use character position for ranges in treesit_sync_visible...
| * Use character position for ranges in treesit_sync_visible_regionYuan Fu2025-02-231-10/+10
| | | | | | | | | | | | * src/treesit.c (treesit_sync_visible_region): Use character position instead of byte position when comparing to ranges, because the ranges are in character position.
* | * test/src/editfns-tests.el (editfns--replace-region): New testStefan Monnier2025-02-281-0/+2
| | | | | | | | | | This test fails, sadly, because `replace-buffer-contents` is not careful enough to something like `replace_range`.
* | ; Grammar fixes for "native-compiled"Stefan Kangas2025-02-284-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Prefer "native-compiled" to "native compiled". The adjective "native-compiled" with the hyphen is generally more consistent with the typical pattern in English, especially when the compound modifies a noun (e.g., "native-compiled code"). 2. Prefer "natively compiled" to "natively-compiled". The adverb "natively" modifies "compiled", and it is standard not to hyphenate an adverb + adjective combination when the adverb ends in -ly (e.g., "code that is natively compiled"). For example, note that we say "high-speed internet" but "highly performant code". * Makefile.in (dest): * configure.ac (HAVE_NATIVE_COMP): * doc/emacs/building.texi (Lisp Libraries): * doc/lispref/compile.texi (Native Compilation) (Native-Compilation Functions, Native-Compilation Variables): * doc/lispref/functions.texi (What Is a Function, Declare Form): * doc/lispref/loading.texi (How Programs Do Loading, Library Search): * etc/NEWS: * etc/NEWS.28: * etc/NEWS.29: * etc/NEWS.30: * lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions) (comp-function-type-spec): * lisp/emacs-lisp/comp-cstr.el: * lisp/subr.el (locate-eln-file): * src/comp.c (SETJMP_NAME, syms_of_comp): * src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list): * src/lread.c (Fload): * src/pdumper.c (dump_do_dump_relocation): * test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect variations on "natively compiled" and "native-compiled". (Bug#56727)
* | Lift widget functions from C to LispStefan Kangas2025-02-281-61/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the mid-1990s, these functions were moved from Lisp to C to "improve performance". However, Moore's Law, and perhaps other improvements too, has made this rationale irrelevant. On this machine, with --native-compilation=no, I observed only a slight ~4% performance difference. For example, displaying a buffer full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms here, meaning the performance gap is under 0.1ms. Even on less powerful machines, this difference would remain imperceptible. Given this, let's lift these functions back to to Lisp, which offers the usual benefits. We already have solid test coverage, but let's add a more focused test for 'widget-get' and 'widget-put' to be thorough. * lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to Lisp from... * src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here. (syms_of_fns): Remove defsubrs for the above functions. * test/lisp/wid-edit-tests.el (widget-test-editable-field-widget-get/put): New test.
* | Fix the values and documentation of 'printable-chars' tableEli Zaretskii2025-02-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/character.c (syms_of_character) <printable-chars>: Doc fix. * lisp/international/characters.el (printable-chars): Fix values for non-ASCII characters. * doc/lispref/nonascii.texi (Character Properties): Add cross-reference for what is a printable character. * doc/lispref/display.texi (Usual Display): * doc/lispref/searching.texi (Char Classes): Add indexing. (Bug#76611)
* | Adapt process-tests to AndroidPo Lu2025-02-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (android_init_thread_events) (android_run_select_thread): Guarantee that the select thread is initialized before returning. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process) (process-tests/fd-setsize-no-crash/make-pipe-process) (process-tests/fd-setsize-no-crash/make-network-process) (process-tests/fd-setsize-no-crash/make-serial-process): Skip on Android.
* | Fully support Lisp threads on AndroidPo Lu2025-02-283-185/+343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (struct android_thread_event_queue): New structure. Move global pselect arguments, mutexes, and semaphores, and pipes here. (struct android_event_queue) <select_mutex, select_thread>: Remove to the above-named struct. (android_init_thread_events, android_finalize_thread_events) (android_get_poll_thread): New functions. (android_run_select_thread): Accept a set of mutexes and thread-local data as the first argument, and operate with them rather than globals. (android_handle_sigusr1): Rename to `android_handle_poll_signal'. Set thread-specific cancellation indicator. (android_init_events): Properly abort after a fatal condition. Enable interruptible polling on Android 5.1 and later, not 4.2. (android_select): Never check for queries here, but in thread_select, if threads are enabled. Adapt to per-thread polling threads and only enable interruptible polling on Android 5.1 and later. (android_before_select): New function. * src/android.h (android_before_select): New declaration. * src/thread.c (thread_select): Call `android_before_select' before the global lock is released.
* | ; Fix documentation of recent treesit changesEli Zaretskii2025-02-282-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/treesit.c (Ftreesit_query_capture) (Ftreesit_parser_embed_level, Ftreesit_parser_set_embed_level) (Ftreesit_parser_set_parent_node): * lisp/treesit.el (treesit-query-range) (treesit-query-range-by-language, treesit-range-settings) (treesit-range-rules, treesit--parser-at-level) (treesit--update-ranges-non-local, treesit--update-ranges-local) (treesit--update-range-1): Fix wording and typos in doc strings. * doc/lispref/parsing.texi (Pattern Matching): Fix wording.
* | Enable treesit-query-capture to return grouped capturesYuan Fu2025-02-271-9/+43
| | | | | | | | | | | | | | | | This is needed for creating embedded parsers for embedded code blocks of which language cannot be known ahead of time. E.g., markdown and org mode's code block. * src/treesit.c (Ftreesit_query_capture): Add parameter GROUPED.
* | Add tree-sitter-parser-embed-level and parent-nodeYuan Fu2025-02-272-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | Add parser properties embed-level and parent-node. They'll be help us implement arbitrarily nested embeded parser, and navigation across embedded and host parsers, respectively. * src/treesit.c: (Ftreesit_parser_embed_level): (Ftreesit_parser_set_embed_level): (Ftreesit_parser_parent_node): (Ftreesit_parser_set_parent_node): New functions.
* | Don't overwrite non-local exit symbol and data (Bug#65796).Philipp Stephani2025-02-281-20/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous approach would incorrectly invalidate the returned module values if another non-local exit occurred while dealing with a non-local exit. See Bug#65796. Instead, allocate the values from the usual environment storage, and return statically-allocated objects if that fails. * src/emacs-module.c (struct emacs_env_private): Turn non-local exit symbol and data into normal Lisp objects. (initialize_environment): Initialize them. (mark_module_environment): Prevent them from being garbage-collected. (module_signal_or_throw, module_non_local_exit_signal_1) (module_non_local_exit_throw_1): Adapt uses. (value_to_lisp): No longer scan for them with module assertions enabled. (module_out_of_memory_signal, module_out_of_memory_data): New statically-allocated module values to return in case of allocation failure. (syms_of_module): Initialize them. (module_non_local_exit_get): Allocate module values normally. If that fails, return statically-allocated values. * doc/lispref/internals.texi (Module Nonlocal): Document new behavior.
* | Fix drag-and-drop treatment of reused tooltip framesPo Lu2025-02-276-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/androidfns.c (Fx_show_tip): Set `tip_window' to that of any reused tooltip frame. * src/haikufns.c (unwind_create_frame): Return whether the frame was destroyed, as on X. (unwind_create_tip_frame, haiku_create_frame, Fx_show_tip): Synchronize with X. (do_unwind_create_frame): New function. (tip_window): Remove unused variable. * src/nsfns.m (tip_window, unwind_create_tip_frame): Remove unused variable `tip_window'. * src/pgtkfns.c (pgtk_create_tip_frame): Rename to pgtk_create_tip_frame. (Fx_show_tip): Adjust accordingly. Set `tip_window' to that of any reused tooltip frame. * src/w32fns.c (Fx_show_tip): * src/xfns.c (Fx_show_tip): Set `tip_window' to that of any reused tooltip frame.
* | * src/dispnew.c (rect_intersect): Fix a typo (bug#76592)Gerd Möllmann2025-02-271-1/+1
| |
* | ; Whitespace fixes to silence git hooksStefan Kangas2025-02-262-5/+5
| |
* | Guarantee delivery of inotify special eventsPo Lu2025-02-261-1/+4
| | | | | | | | | | | | | | | | | | * src/inotify.c (inotifyevent_to_event): Always match events that are not encompassed by IN_ALL_EVENTS and which the documentation implies are always delivered to callbacks. * test/src/inotify-tests.el (inotify-file-watch-stop-delivery): New test.
* | Handle multibyte mode line spec chars (bug#76517)Pip Cet2025-02-251-1/+10
| | | | | | | | | | | | * src/xdisp.c (display_mode_element): Make 'c' an 'int'. Use 'string_char_and_length' to fetch the character from a multibyte string, not 'SREF'.
* | Clarify semantics of 'frame-inhibit-implied-resize'Martin Rudalics2025-02-241-9/+17
| | | | | | | | | | | | * src/frame.c (frame_inhibit_implied_resize): * doc/lispref/frames.texi (Implied Frame Resizing): Clarify semantics of 'frame-inhibit-implied-resize'.
* | (Ftranspose_regions): Fix text-properties for len1==len2Stefan Monnier2025-02-231-140/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | When `len1_byte == len2_byte`, the code presumed that len1==len2 as well in its handling of text-properties. Fix that case. While at it, try and reduce code duplication by hoisting common code out of `if`s, and throw away the optimization for `len_mid == 0` which only saved 3 trivial function calls. * src/editfns.c (Ftranspose_regions): Shuffle the code a bit. * test/src/editfns-tests.el (editfns-tests--transpose-equal-but-not): New test.
* | ; Fix last changeEli Zaretskii2025-02-231-2/+2
| | | | | | | | | | | | * src/frame.c (syms_of_frame) <frame-inhibit-implied-resize>: * doc/lispref/frames.texi (Implied Frame Resizing): Don't use passive voice. (Bug#76275)
* | Optionally inhibit implied resizing while frame is made (Bug#76275)Martin Rudalics2025-02-231-23/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | Enforce redisplay when deleting a child frame (bug#76406)Gerd Möllmann2025-02-232-4/+20
| | | | | | | | | | | | * 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.
* | Revert “Pacify GCC in pgtkselect malloc alignment”Paul Eggert2025-02-221-39/+92
| | | | | | | | | | | | | | Problem reported by the wurfkreuz (Bug#76414). * src/pgtkselect.c: Revert my commit ff65cc9944dc0b37986d512ee8b9817c6913db36 dated Sun Jan 26 22:15:49 2025 -0800 for now. I may come up with a better commit later.
* | Make 'text-property-default-nonsticky' buffer-local when setEli Zaretskii2025-02-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | ; Fix typosStefan Kangas2025-02-2210-14/+14
| |