aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Properly initialize argment list supplied to android_init_emacsPo Lu2023-10-161-1/+3
| | | | * src/android.c (initEmacs): NULL-terminate c_argv.
* ; New command alias xprint for LLDBGerd Möllmann2023-10-151-0/+3
|
* Correctly receive files through Android DNDPo Lu2023-10-151-4/+16
| | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsService.java (getUsefulContentResolver) (getContentResolverContext): New functions which return a content resolver from an EmacsActivity, if at all possible. (openContentUri, checkContentUri): Probe or open URIs through such content resolvers. Probe URIs by opening them if merely testing permissions fails, for DND URIs do not make checkCallingUriPermission return true. * java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Address potential crash. * src/androidvfs.c (android_check_content_access): Circumvent JNI dynamic method dispatch. (android_authority_name): Guarantee NAME is never a directory.
* Implement multi-window drag-and-drop under AndroidPo Lu2023-10-143-0/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (sendDndDrag, sendDndUri) (sendDndText): Declare new event-sending functions. * java/org/gnu/emacs/EmacsView.java (onDragEvent): New function. * java/org/gnu/emacs/EmacsWindow.java (onDragEvent): New function; respond to each drag and drop event, request permissions if necessary and transfer dropped data to Lisp. * lisp/dnd.el (dnd-unescape-file-uris): New variable. (dnd-get-local-file-name): If that variable is nil, refrain from unescaping URLs provided. * lisp/term/android-win.el (android-handle-dnd-event): New function. (special-event-map): Bind drag-n-drop-event. * src/android.c (sendDndDrag, sendDndUri, sendDndText): New functions. * src/androidgui.h (enum android_event_type): New event types ANDROID_DND_DRAG_EVENT, ANDROID_DND_URI_EVENT, ANDROID_DND_TEXT_EVENT. (struct android_dnd_event): New structure. (union android_event) <dnd>: New field. * src/androidterm.c (handle_one_android_event) <ANDROID_DND_..._EVENT>: Generate drag-n-drop events for each of these types. (syms_of_androidterm) <Quri, Qtext>: New defsyms.
* Merge from origin/emacs-29Michael Albinus2023-10-131-1/+2
|\ | | | | | | | | | | | | | | 53292c5d818 Fix treesit-query-validate for string input (bug#66400) 81a0c1ed2e4 ; Improve documentation of VC commands 0590e3e69a9 Recommend `M-x man` in woman.el docs 809da7fc9a1 ; * doc/lispref/processes.texi (Process Buffers): More ac... 8f23a02a9ea Fix updating process-mark position in 'set-process-buffer'
| * Fix updating process-mark position in 'set-process-buffer'Eli Zaretskii2023-10-071-1/+2
| | | | | | | | | | | | * src/process.c (update_process_mark): Update marker position only if P's process-mark is not already associated with P's buffer. (Bug#66313)
* | Try harder to generate tombstones upon emacs_abortPo Lu2023-10-132-3/+22
| | | | | | | | | | | | | | | | | | * src/android.c (HAS_BUILTIN_TRAP): New macro definition. (emacs_abort) [HAS_BUILTIN_TRAP]: Call __builtin_trap to abort, in place of dereferencing NULL. * src/androidterm.c (android_draw_fringe_bitmap): Correct comment transplanted from X code.
* | New filenotify testsMichael Albinus2023-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | * src/inotify.c (Finotify_watch_list, Finotify_allocated_p): Fix argument list. * test/lisp/filenotify-tests.el (file-notify-test04-autorevert): Use `skip-when'. (file-notify-test12-unmount, file-notify-test12-unmount-remote): New tests.
* | Respond to JNI errors around drawing operationsPo Lu2023-10-121-4/+23
| | | | | | | | | | | | | | * src/android.c (android_fill_polygon, android_draw_rectangle) (android_draw_point, android_draw_line, android_lock_bitmap): Check or clear errors around potential JNI errors; the penalty incurred to performance is not as significant as was expected.
* | Update Android keysym listPo Lu2023-10-111-0/+9
| | | | | | | | | | * src/keyboard.c (lispy_function_keys): Introduce entries for scroll lock, num lock, and input method keys.
* | File notifications report unmount events (bug#66381)Michael Albinus2023-10-103-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (File Notifications): Unmounting a watched filesystem is reported now. * etc/NEWS: File notifications report unmount events now. Fix typos. * lisp/filenotify.el (file-notify--callback-inotify) (file-notify--add-watch-inotify): Handle `unmount'. (file-notify--callback-kqueue, file-notify--add-watch-kqueue): Handle `revoke'. (file-notify--callback-gfilenotify): Handle `unmounted'. (file-notify-callback): Handle `unmount' and `unmounted'. (file-notify--add-watch-inotify): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch): Handle `unmounted'. * lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch): Handle `unmount' and `unmounted'. * src/gfilenotify.c (dir_monitor_callback): Handle Qunmounted. * src/inotify.c (symbol_to_inotifymask): Handle IN_IGNORED and IN_UNMOUNT. * src/kqueue.c (kqueue_callback, Fkqueue_add_watch): Handle NOTE_REVOKE. (Fkqueue_add_watch): Adapt docstring. (syms_of_kqueue): Declare `revoke.
* | Implement frame restacking under AndroidPo Lu2023-10-103-10/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsActivity.java (invalidateFocus1): Synchronize with window.children for iteration through it. * java/org/gnu/emacs/EmacsService.java (queryTree): Synchronize with windowList for iteration through it. * java/org/gnu/emacs/EmacsView.java (moveChildToBack): Correct formatting mistake. (moveAbove, moveBelow): New functions. * java/org/gnu/emacs/EmacsWindow.java (destroyHandle, reparentTo) (raise, lower): Remedy synchronization blunders. (reconfigure): New function. * src/android.c (android_init_emacs_window): Link with `reconfigure'. (android_reconfigure_wm_window): New wrapper function. * src/androidfns.c (android_frame_restack): New function. (Fandroid_frame_restack): Properly implement this function and expunge outdated comment. * src/androidgui.h (enum android_stack_mode) (enum android_window_changes): New enumerators.
* | Don't allow Services entries in pop-up menus on macOS (bug#66420)Mattias Engdegård2023-10-091-0/+4
| | | | | | | | | | | | * src/nsmenu.m ([EmacsMenu runMenuAt:forFrame:keymaps:]): Prevent the system from adding context menu plug-ins (Services entries or sub-menu) to all our pop-up menus.
* | Update default font substitution listPo Lu2023-10-091-1/+21
| | | | | | | | | | * src/sfntfont-android.c (init_sfntfont_android): Account for Android 4.x not distributing Noto Serif.
* | Merge from origin/emacs-29Eli Zaretskii2023-10-072-22/+30
|\ \ | |/ | | | | | | | | | | | | | | | | a74e51cfd15 Fix a defcustom :type c27b90d04bf Fix 'ido--ffap-find-file' 1594d5f17ad Fix setting the pipe capacity for subprocesses aad8b5d78f3 Handle LANG on macOS differently (bug#65908) # Conflicts: # src/process.c
| * Fix setting the pipe capacity for subprocessesEli Zaretskii2023-10-061-2/+8
| | | | | | | | | | | | * src/process.c (create_process) [F_SETPIPE_SZ]: Set the pipe capacity only if the required read-process-max is larger than the default capacity of the pipe. (Bug#66288)
| * Handle LANG on macOS differently (bug#65908)Gerd Möllmann2023-10-051-18/+21
| | | | | | | | | | | | * src/nsterm.m (ns_init_locale): If LANG is set, try to use that, otherwise try to deduce what LANG should be. Check is the result is valid, and use LANG="en_US.UTF-8" if not.
* | Merge from origin/emacs-29Eli Zaretskii2023-10-073-3/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e9b88f61ccc Fix a defcustom :type 3216cd96952 Fix pulse-flag :type 2065ab5562e Fix defcustoms in timeclock.el bdd30132496 ; * lisp/image-mode.el (image-mode-to-text, image-mode-as... 5c2d9ae48ed ; * lisp/image-mode.el: Fix typos in doc strings (bug#663... fa0d3f45aeb ; Improve wording of last change 3ef259e28a8 Improve documentation of `ns-use-proxy-icon` 712505a82b9 Document assigning libraries to packages in make-tarball.txt 6bdc5cfe384 Doc fix; more consistently refer to "text terminals" d210d761b19 ; Fix doc strings of overlay-arrow variables 4fd00ff1f7e Fix defcustoms in type-break.el (Bug#66210) 47770b0eca4 Fix term-scroll-to-bottom-on-output :type f8bdc8dff0b ; Normalize GNU ELPA :core package statements 63ec6d998d4 ; * doc/emacs/custom.texi (Early Init File): Improve inde... a4185f87bd0 ; Silence macOS 14 warning d9d6e14a698 ; * lisp/vc/vc.el (vc-next-action): Improve commentary. d558f38fe5c ; * lisp/emacs-lisp/let-alist.el (let-alist): Fix quoting... 71feee79309 Doc fix in let-alist for keys with nil value 72cc9cf2cde ; Fix typos
| * ; Improve wording of last changeStefan Kangas2023-10-011-2/+2
| | | | | | | | | | | | * doc/emacs/macos.texi (Mac / GNUstep Customization): * src/nsfns.m (syms_of_nsfns): Improve wording. Reported by Gerd Möllmann <gerd.moellmann@gmail.com>.
| * Improve documentation of `ns-use-proxy-icon`Stefan Kangas2023-10-011-1/+6
| | | | | | | | | | | | | | * doc/emacs/macos.texi (Mac / GNUstep Customization): * src/nsfns.m (syms_of_nsfns): Fix documentation of 'ns-use-proxy-icon'; explain what it does and how it's used. (Bug#66190)
| * ; Fix doc strings of overlay-arrow variablesEli Zaretskii2023-10-011-2/+3
| | | | | | | | | | * src/xdisp.c (syms_of_xdisp) <overlay-arrow-string> <overlay-arrow-variable-list>: Doc fixes. (Bug#66282)
| * ; Silence macOS 14 warningEshel Yaron2023-09-291-0/+5
| | | | | | | | | | * src/nsterm.m: Implement 'applicationSupportsSecureRestorableState' to silence warning on macOS 14. (Bug#66245)
* | Revise font family translation lists under AndroidPo Lu2023-10-071-5/+10
| | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Environment): Revise paragraph illustrating the startup notification. (Android Fonts): Mention font family replacement. * src/sfntfont-android.c (init_sfntfont_android): Translate DejaVu Serif to either Droid Serif or Noto Serif.
* | Revert slurp_image extraction for svg_loadStefan Kangas2023-10-061-3/+14
| | | | | | | | | | | | * src/image.c (svg_load): Inline slurp_image code again, as it didn't build in its current form. Reported by Andreas Schwab <schwab@linux-m68k.org>.
* | Extract function slurp_image from image loadingStefan Kangas2023-10-051-67/+32
| | | | | | | | | | | | * src/image.c (slurp_image): New function... (xbm_load, xpm_load, pbm_load, webp_load, svg_load): ...extracted from here.
* | Nontext mouse cursor as default on {tab|tool}-barManuel Giraud2023-10-051-5/+4
| | | | | | | | | | * src/xdisp.c (note_mouse_highlight): Always set the mouse cursor to nontext when entering tab-bar and tool-bar. (Bug#66243)
* | Introduce an input method callback required by Android 34Po Lu2023-10-055-1/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsInputConnection.java (replaceText): New function. * java/org/gnu/emacs/EmacsNative.java (replaceText): Declare native function. * src/androidgui.h (enum android_ime_operation): New operation ANDROID_IME_REPLACE_TEXT. * src/androidterm.c (android_handle_ime_event): Decode text when encountering an ANDROID_IME_REPLACE_TEXT operation. Return if decoding overflowed rather than presenting Qnil to textconv functions. (replaceText): New JNI function. * src/frame.h (enum text_conversion_operation): New operation TEXTCONV_REPLACE_TEXT. * src/textconv.c (really_commit_text): Move point to start if the composing region is set. (really_replace_text): New function. (handle_pending_conversion_events_1) <TEXTCONV_REPLACE_TEXT>: New case. (replace_text): New function. * src/textconv.h: Update prototypes.
* | Port Emacs to Android 34Po Lu2023-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Detect and require Android 34 headers. * doc/emacs/android.texi (Android Environment): Mention new permissions mandated by Android 34. * java/AndroidManifest.xml.in: Introduce new permissions and foreground service types prerequisite for background execution under Android 34. * java/INSTALL: Update installation documentation. * java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity) (Sdk7FontObject): * java/org/gnu/emacs/EmacsService.java (onCreate): Silence deprecation warnings. * src/android.c: Update documentation.
* | Correct local reference leaksPo Lu2023-10-045-21/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/android.c (android_build_string): Accept a list of local references to destroy upon an allocation failure, facilitating the proper deallocation of local references in such situations. (android_browse_url): Revise for new calling convention. * src/android.h (android_build_string): Update declaration correspondingly. * src/androidmenu.c (android_menu_show, android_dialog_show): Revise for new calling convention. * src/androidselect.c (android_notifications_notify_1): Supply each successive local reference to android_build_string as notification text is being encoded. * src/androidvfs.c (android_saf_exception_check): Introduce absent va_end.
* | regex.c: Fix recent regression with mutually_exclusive_pStefan Monnier2023-10-031-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | The new analysis code ended up increasing the scope of an optimization a bit too far. Reign it in. * src/regex-emacs.c (struct mutexcl_data): Add `unconstrained` field. (mutually_exclusive_one): Use and set it. (mutually_exclusive_p): Initialize it. * test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization): Add test.
* | Update Android portPo Lu2023-10-032-24/+60
| | | | | | | | | | | | | | | | | | | | * src/androidvfs.c (android_afs_open, android_asset_fstat): Return proper mtime within file descriptors incorporating asset data and within android_asset_fstat. * src/xterm.c (handle_one_xevent) <KeyPress, XI_KeyPress>: Verify presence of a quit keysym prior to registering it.
* | ; Fix mistyped --enable-checking in docs.Basil L. Contovounesios2023-10-011-1/+1
| |
* | Update Android portPo Lu2023-10-012-7/+7
| | | | | | | | | | | | | | | | | | | | | | * doc/emacs/input.texi (On-Screen Keyboards): Revise documentation to reflect changes. * src/keyboard.c (lispy_function_keys) <KEYCODE_DPAD_CENTER>: Define select key absent out of negligence. * src/xterm.c (syms_of_xterm) <x-quit-keysym>: Default to nil. (bug#66040)
* | ; * src/regex-emacs.c (forall_firstchar_1): Fix compilation error.Eli Zaretskii2023-09-301-1/+2
| |
* | Merge remote-tracking branch 'refs/remotes/origin/master'Stefan Monnier2023-09-303-12/+24
|\ \
| * | Update Android portPo Lu2023-09-302-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | * src/androidmenu.c (android_menu_show): Properly encode pane names before deriving Java strings from them. * src/sfntfont.c (sfnt_parse_style, sfntfont_list_1): Intern adstyles.
| * | Fix last changePo Lu2023-09-301-5/+5
| | | | | | | | | | | | | | | * src/search.c (Fre__describe_compiled): Correct typos and pointer signedness missmatch.
* | | regex.c: Remove the old analyzes functionsStefan Monnier2023-09-291-562/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After testing and checking that the changes brought by the new consolidated analysis function (which are all cases of improved optimizations) are indeed safe, remove the old code. * src/regex-emacs.c (analyze_first_old): Delete function. (analyze_first): Don't call it any more. (skip_noops): Delete function. (mutually_exclusive_aux): Delete function. (mutually_exclusive_p): Don't call it any more.
* | | regex.c: Consolidate the two analysis functionsStefan Monnier2023-09-291-11/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have two functions that analyze the bytecode to try and apply optimizations: `analyze_first` and `mutually_exclusive_p`. Extract the common code between them into a new function `forall_firstchar`, and then rewrite the old ones on top of that one. Along the way, we get slightly better analyses that reverts the recent de-optimizations but without re-introducing the corresponding bugs. * src/regex-emacs.c (forall_firstchar_1, forall_firstchar): New functions. (analyze_first_old): Rename from `analyze_first`. (struct anafirst_data): New struct. (analyze_first_fastmap, analyze_first_null): New functions. (analyze_first): Rewrite to use `forall_firstchar` with those two functions. Take a `bufp` rather than a `multibyte` arg. (regex_compile, re_compile_fastmap): Adjust calls accordingly. (struct mutexcl_data): New struct. (mutually_exclusive_one): New function. (mutually_exclusive_p): Rewrite to use `forall_firstchar` with that function.
* | | regex.c: Various cosmetic changesStefan Monnier2023-09-291-42/+45
|/ / | | | | | | | | | | | | | | | | | | * src/regex-emacs.c (extract_address): New function. (skip_noops, mutually_exclusive_aux, re_match_2_internal): Use it. (regex_compile): Fix oversight in last commit. (analyze_first): Return a bool rather than an int. (re_compile_fastmap): Simplify accordingly. (re_match_2_internal): Share the common code between the fail and success exit paths.
* | * src/regex-emacs.c (STORE_NUMBER): Make it a plain functionStefan Monnier2023-09-291-5/+6
| |
* | search.c (re--describe-compiled): New function (bug#66261)Stefan Monnier2023-09-293-85/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a fairly primitive but handy way to see what a regexp compiles to without having to enable REGEX_EMACS_DEBUG and wade through tons of stderr output. * doc/lispref/searching.texi (Regexp Problems): Mention `re--describe-compiled`. * src/regex-emacs.c (debug_putchar, print_fastmap) (print_partial_compiled_pattern, print_compiled_pattern): Add `dest` argument, and compile also when `ENABLE_CHECKING` is set. (DEBUG_PRINT_COMPILED_PATTERN, print_double_string, regex_compile): Adjust to additional argument. * src/regex-emacs.h (print_compiled_pattern): Declare. * src/search.c (Fre__describe_compiled): New function. (syms_of_search): Defsubr it.
* | regex.c (mutually_exclusive_aux) <wordbound>: Remove optimizationStefan Monnier2023-09-281-2/+15
| | | | | | | | | | | | | | | | | | Another case that was too optimistic. Better use \> or \< rather than \b if you want your regexp to be handled efficiently. * src/regex-emacs.c (mutually_exclusive_aux) <wordbound>: Cancel optimization. * test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization): New test.
* | Update Android portPo Lu2023-09-282-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/android.texi (Android Windowing): Document `android-keyboard-bell-duration'. * java/org/gnu/emacs/EmacsService.java (ringBell): New argument DURATION. * src/android.c (android_init_emacs_service): Adjust correspondingly. (android_bell): Provide the duration of the vibration. * src/androidfns.c (syms_of_androidfns) <android_keyboard_bell_duration>: New variable.
* | * src/regex-emacs.c (analyze_first): Fix incorrect optimizationStefan Monnier2023-09-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The optimization was incorrect in a particular corner case. In this fix I just disable it conservatively for more cases because it's not obvious how to fix it while preserving the "good" cases. We may find a better fix by using an approach like the one in `mutually_exhaustive_aux`, but for now this is good enough, especially since \{..\} repetitions are not used very frequently. * test/src/regex-resources/PTESTS: New test.
* | regex.c (mutually_exclusive_p): Fix initial value of `loop_beg`Stefan Monnier2023-09-261-1/+1
| | | | | | | | | | | | | | | | | | * src/regex-emacs.c (mutually_exclusive_p): Don't pretend that pattern position 0 has been checked already. * test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization): Add a corresponding regression test plus some other related tests I had around.
* | Update Android portPo Lu2023-09-261-0/+1
| | | | | | | | | | * src/androidterm.c (android_draw_fringe_bitmap): Sync with xterm.c.
* | Update Android portPo Lu2023-09-262-7/+34
| | | | | | | | | | | | | | | | * src/androidterm.c (android_clip_to_row) (android_draw_fringe_bitmap, android_draw_hollow_cursor) (android_draw_bar_cursor): Sync with xterm.c. * src/xterm.c (x_draw_fringe_bitmap): Delete unused variables.
* | Properly clip overlaid fringe bitmapsPo Lu2023-09-261-8/+43
| | | | | | | | | | | | | | | | | | * src/xterm.c (x_draw_fringe_bitmap): Save clip rectangle from x_clip_to_row, and draw only the intersection between it and the fringe bitmap, for if the bitmap is overlaid, the clip mask will override the clip rectangle. (x_clip_to_row): New argument *RECT_RETURN. All callers changed.
* | Use heuristic to speed up allocation of small vectors (bug#65491)Mattias Engdegård2023-09-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of scanning vector_free_lists from the appropriate size until we find a nonempty bucket, start at the last bucket where we last put something in. This may favour splitting larger vectors than necessary but in general saves a lot of time in the allocation of small vectors. Original patch by Ihor Radchenko. * src/alloc.c (last_inserted_vector_free_idx): New variable. (setup_on_free_list): Set it. (allocate_vector_from_block): Use it. (sweep_vectors): Reset it.