aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | ; Fix doc strings of recent changesEli Zaretskii2024-03-201-4/+5
| | | | | | | | | | * src/comp.c (syms_of_comp) <comp-sanitizer-active>: * lisp/emacs-lisp/comp.el (comp-sanitizer-emit): Doc fixes.
* | Add native compiler sanitizerAndrea Corallo2024-03-201-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (ABI_VERSION): Bump new version. (CALL0I): Uncomment. (helper_link_table, declare_runtime_imported_funcs): Add 'helper_sanitizer_assert'. (Fcomp__init_ctxt): Register emitter for 'helper_sanitizer_assert'. (helper_sanitizer_assert): New function. (syms_of_comp): 'helper_sanitizer_assert' defsym. (syms_of_comp): 'comp-sanitizer-error' define error. (syms_of_comp): 'comp-sanitizer-active' defvar. * lisp/emacs-lisp/comp.el (comp-passes): Add 'comp--sanitizer'. (comp-sanitizer-emit): Define var. (comp--sanitizer): Define function. * lisp/emacs-lisp/comp-run.el (comp-run-async-workers): Forward 'comp-sanitizer-emit'.
* | Unbreak the Cygw32 build broken by resent WTS_SESSION changesEli Zaretskii2024-03-192-5/+12
| | | | | | | | | | | | | | | | * src/w32xfns.c (WTS_VIRTUAL_CLASS): * src/w32fns.c (WTS_VIRTUAL_CLASS, WM_WTSSESSION_CHANGE) (WTS_SESSION_LOCK): Define only for WINDOWSNT. * src/w32xfns.c (drain_message_queue): Call 'reset_w32_kbdhook_state' only for WINDOWSNT. (Bug#69888)
* | Respect display names of Android content URIsPo Lu2024-03-191-14/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/org/gnu/emacs/EmacsNative.java (displayNameHash): New function. * java/org/gnu/emacs/EmacsService.java (buildContentName): New argument RESOLVER. Generate names holding URI's display name if available. All callers changed. * lisp/international/mule-cmds.el (set-default-coding-systems): Fix file name coding system as utf-8-unix on Android as on Mac OS. * src/androidvfs.c (enum android_vnode_type): New enum ANDROID_VNODE_CONTENT_AUTHORITY_NAMED. (android_content_name): Register root directories for this new type. (displayNameHash): New function. (android_get_content_name): New argument WITH_CHECKSUM. If present, treat the final two components as a pair of checksum and display name, and verify and exclude the two. (android_authority_name): Provide new argument as appropriate. (android_authority_initial_name): New function.
* | Followup changes to `cl-type-of`scratch/object-typeStefan Monnier2024-03-183-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes came up while working on `cl-type-of` but are not directly related to the new `cl-type-of`. The BASE_PURESIZE bump was needed at some point on one of my machine, not sure why. * src/puresize.h (BASE_PURESIZE): Bump up. * src/sqlite.c (bind_value): Don't use `Ftype_of`. * lisp/emacs-lisp/seq.el (seq-remove-at-position): Simplify. * lisp/emacs-lisp/cl-preloaded.el (finalizer): New (previously missing) type. * doc/lispref/objects.texi (Type Predicates): Minor tweaks.
* | (primitive-function): New typeStefan Monnier2024-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type hierarchy and `cl-type-of` code assumed that `subr-primitive` only applies to functions, but since it also accepts special-forms it makes it an unsuitable choice since it can't be a subtype of `compiled-function`. So, use a new type `primitive-function` instead. * lisp/subr.el (subr-primitive-p): Fix docstring (bug#69832). (primitive-function-p): New function. * lisp/emacs-lisp/cl-preloaded.el (primitive-function): Rename from `subr-primitive` since `subr-primitive-p` means something else. * src/data.c (Fcl_type_of): Return `primitive-function` instead of `subr-primitive` for C functions. (syms_of_data): Adjust accordingly. * test/src/data-tests.el (data-tests--cl-type-of): Remove workaround.
* | (cl-type-of): New function to return more precise types (bug#69739)Stefan Monnier2024-03-182-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (Fcl_type_of): New function, extracted from `Ftype_of`. Make it return more precise types for symbols, integers, and subrs. (Ftype_of): Use it. (syms_of_data): Define the corresponding new symbols and defsubr the new function. * doc/lispref/objects.texi (Type Predicates): Document it. * src/comp.c (emit_limple_insn): Use `Fcl_type_of`. * lisp/emacs-lisp/cl-preloaded.el (subr): Demote it to `atom`. (subr-native-elisp, subr-primitive): Add `compiled-function` as parent instead. (special-form): New type. * lisp/obsolete/eieio-core.el (cl--generic-struct-tag): * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-generalizer): Use `cl-type-of`. cl--generic--unreachable-types): Update accordingly. test/src/data-tests.el (data-tests--cl-type-of): New test.
* | Makeshift solution for X server bugPo Lu2024-03-181-0/+8
| | | | | | | | | | * src/xterm.c (x_sync_init_fences): Detect errors around XSyncCreateFence. (bug#69762)
* | ; Pacify -Wmaybe-uninitialized in coding.c.Basil L. Contovounesios2024-03-161-1/+1
| | | | | | | | Warning seen with GCC 13 -Og.
* | Merge branch 'master' of git.sv.gnu.org:/srv/git/emacsEli Zaretskii2024-03-161-6/+6
|\ \
| * | Document and announce 'marker-last-position'Martin Rudalics2024-03-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/markers.texi (Information from Markers): Document 'marker-last-position'. * etc/NEWS: Announce 'marker-last-position'. * src/window.c (window_restore_killed_buffer_windows): Minor doc-string fix. * doc/lispref/windows.texi (Window Configurations): Minor fix.
* | | Merge from origin/emacs-29Eli Zaretskii2024-03-162-4/+4
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | 3b791ebbe17 ; Fix 'usage:' keyword in Ffile_name_concat doc. ed48b0d657c ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary. b708e639d63 ; * src/lread.c (maybe_swap_for_eln): Clarify warning mes... db027a06976 ; Fix bibtex-biblatex-field-alist docstring typo. a9be5c7ea92 ; * doc/lispref/control.texi (Conditionals): Add missing ... db5915f30ba Fix 'with-sqlite-transaction' fe491173e8f ; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
| * ; Fix 'usage:' keyword in Ffile_name_concat doc.Basil L. Contovounesios2024-03-161-1/+1
| |
| * ; * src/lread.c (maybe_swap_for_eln): Clarify warning message.Eli Zaretskii2024-03-141-3/+3
| |
* | In window-related documentation write 'symbol' instead of 'constant'Martin Rudalics2024-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Suggested by Michael Heerdegen <michael_heerdegen@web.de>. * src/window.c (window_restore_killed_buffer_windows): In doc-string write 'symbol' instead of 'constant'. * lisp/window.el (display-buffer--lru-window) (display-buffer-use-least-recent-window): In doc-strings write 'symbol' instead of 'constant'. * doc/lispref/windows.texi (Window Configurations): Write 'symbol' instead of 'constant'.
* | ; * src/xterm.c (syms_of_xterm): Fix typo.Po Lu2024-03-161-5/+5
| |
* | Respond to default action from Gnus notificationsPo Lu2024-03-161-10/+10
| | | | | | | | | | * lisp/gnus/gnus-notifications.el (gnus-notifications-action): Consider default equivalent to read.
* | Support x-*-keysym on AndroidPo Lu2024-03-161-10/+71
| | | | | | | | | | | | * src/androidterm.c (android_android_to_emacs_modifiers) (android_emacs_to_android_modifiers, syms_of_androidterm): Port x-*-keysym from xterm.c.
* | Correct doc strings for x-*-keysymPo Lu2024-03-161-20/+22
| | | | | | | | | | | | * src/xterm.c (syms_of_xterm): Clarify whether x-*-keysym affects the modifier key reported for a keysym or the other way around.
* | ; Circumvent miscompilations on Sun C 5.12 (148917-07)Po Lu2024-03-161-12/+18
| | | | | | | | | | | | * src/minibuf.c (Ftry_completion, Fall_completions): Transform ternary expressions after open-ended if statements into proper if/else statements.
* | ; * src/eval.c (Fhandler_bind_1): Fix docstring.Basil L. Contovounesios2024-03-161-2/+2
| |
* | ; Fix documentation of a recent change (bug#68235)Eli Zaretskii2024-03-151-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: * doc/lispref/windows.texi (Window Configurations): Improve wording of 'window-restore-killed-buffer-windows's doc. * src/window.c (syms_of_window) <window-restore-killed-buffer-windows>: Doc fix. * etc/NEWS: * doc/lispref/buffers.texi (Buffer Names): Document 'buffer-last-name'.
* | Fix bug with CHECK_STRUCTS introduced by last buffer.h changeMartin Rudalics2024-03-151-1/+2
| | | | | | | | | | * src/pdumper.c (dump_buffer): Fix HASH_buffer_. Assign last_name_ field.
* | Further adjustments for restoring killed buffer windows (Bug#68235)Martin Rudalics2024-03-153-65/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Announce 'window-restore-killed-buffer-windows'. * src/buffer.h (struct buffer) : New field last_name_. * src/buffer.c (Fbuffer_last_name): New function to return last name of buffer before it was killed or renamed. (bset_last_name, Fget_buffer_create, Fmake_indirect_buffer) (Frename_buffer, Fkill_buffer, init_buffer_once): Set buffer's last_name_ field accordingly. * src/window.c (window_restore_killed_buffer_windows): New variable replacing Vwindow_kept_windows_functions. (Fset_window_configuration): Use window_restore_killed_buffer_windows instead of Vwindow_kept_windows_functions. * lisp/window.el (window--state-put-2, window-state-put): Use 'window-restore-killed-buffer-windows' instead of 'window-kept-windows-functions'. * doc/lispref/windows.texi (Window Configurations): Describe 'window-restore-killed-buffer-windows' which replaces 'window-kept-windows-functions'.
* | ; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix.Eli Zaretskii2024-03-151-2/+3
| |
* | ; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string.Po Lu2024-03-151-1/+1
| |
* | * src/sfntfont-android.c (init_sfntfont_android): Fix SDK check.Po Lu2024-03-151-1/+1
| |
* | Fix last changePo Lu2024-03-151-5/+6
| | | | | | | | | | * src/xwidget.c (Fmake_xwidget): Cast boolean value to gboolean. (syms_of_xwidget): Fix coding style and improve doc string.
* | ; Fix last change (bug#68604)Eli Zaretskii2024-03-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-disable-javascript): Move from here... * lisp/cus-start.el (standard): ...to here. * src/xwidget.c (syms_of_xwidget) <xwidget-webkit-disable-javascript>: Doc fix. * doc/emacs/misc.texi (Embedded WebKit Widgets): Fix wording.
* | Add user option to disable JavaScript in xwidget webviewNoé Lopez2024-03-141-1/+7
| | | | | | | | | | | | | | | | | | * src/xwidget.c: Add the 'xwidget-webkit-disable-javascript' variable to disable JavaScript in WebKit sessions. (Bug#68604) * etc/NEWS: * doc/emacs/misc.texi (Embedded Webkit Widgets): Document the change.
* | ; Fix last change to compile with mingw.org's MinGWEli Zaretskii2024-03-142-0/+18
| | | | | | | | | | | | * src/w32xfns.c: * src/w32fns.c (WTS_VIRTUAL_CLASS) [!MINGW_W64]: Declare. * src/w32xfns.c: Include wtsapi32.h.
* | Fix resetting keyboard hook state on MS-WindowsRaffael Stocker2024-03-145-9/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register session notifications so Emacs is notified when the computer is being locked, as required to reset the low level keyboard hook state. (Bug#69083). * src/w32term.h: * src/w32fns.c (setup_w32_kbdhook, remove_w32_kbdhook) (w32_wnd_proc, globals_of_w32fns, maybe_pass_notification): Register and manage session notifications in GUI Emacs. * src/w32console.c (initialize_w32_display, find_ime_window): * src/w32xfns.c (drain_message_queue): Register notifications and reset keyboard hook state in console Emacs. * src/w32.c (term_ntproc): Un-register session notifications when terminating.
* | ns_select fix for macOS terminals (bug#69561)Gerd Möllmann2024-03-131-2/+6
| | | | | | | | * src/nsterm.m (ns_select_1): Return early for terminals.
* | Prevent freezes on macOS (bug#69561)Gerd Möllmann2024-03-131-7/+10
| | | | | | | | | | * src/nsterm.m (ns_select_1): Store pending input_events. Always call [NSApp run].
* | Port more notification senders to non-XDG systemsPo Lu2024-03-131-27/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Desktop Notifications): Document that `:timeout' is now implemented. * java/org/gnu/emacs/EmacsDesktopNotification.java (EmacsDesktopNotification): New field delay. (display1): Set delay on Android 8.0 and up. * lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): Call Android or Haiku notification functions on those systems. * lisp/gnus/gnus-notifications.el (gnus-notifications-action) (gnus-notification-close): Remove dismissed notifications from the notification to message map. (gnus-notifications-notify): Call android-notifications-notify if possible. * src/androidselect.c (android_init_emacs_desktop_notification): Update accordingly. (android_notifications_notify_1): New argument TIMEOUT. (Fandroid_notifications_notify): New argument QCtimeout. (syms_of_androidselect) <QCtimeout>: New symbol.
* | Fix CheckJNI crash on Android 2.2Po Lu2024-03-121-2/+2
| | | | | | | | | | * src/androidfns.c (syms_of_androidfns_for_pdumper): Don't free local reference to script name if nonexistent.
* | Resolve inconsistency between Android and XDG notificationsPo Lu2024-03-121-11/+11
| | | | | | | | | | | | | | | | * doc/lispref/os.texi (Desktop Notifications): * src/androidselect.c (android_notifications_notify_1) (Fandroid_notifications_notify, android_notification_action) (syms_of_androidselect): Rename `:on-cancel' to `:on-close'.
* | ; Fix omission from last changePo Lu2024-03-121-1/+1
| | | | | | | | | | * src/androidselect.c (android_notification_deleted): Adjust for changed notification list format.
* | Implement notification residency on AndroidPo Lu2024-03-123-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Desktop Notifications): Document support for `:resident'. * java/org/gnu/emacs/EmacsService.java (cancelNotification): * src/android.c (android_init_emacs_service): * src/android.h (struct android_emacs_service): New function. * src/androidselect.c (android_notifications_notify_1) (Fandroid_notifications_notify): New parameter QCresident; save it within notification lists. (android_notification_deleted, android_notification_action): Adjust for changes to the format of notification lists and cancel non-resident notifications when an action is selected. (syms_of_androidselect): <QCresident>: New symbol.
* | Implement notification callbacks on AndroidPo Lu2024-03-119-22/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/os.texi (Desktop Notifications): Document that :on-cancel, :on-action and :actions are now supported on Android. * java/org/gnu/emacs/EmacsActivity.java (onNewIntent): New function. * java/org/gnu/emacs/EmacsDesktopNotification.java (NOTIFICATION_ACTION, NOTIFICATION_TAG, NOTIFICATION_DISMISSED): New constants. <actions, titles>: New fields. (insertActions): New function. (display1, display): Insert actions on Jelly Bean and up, and arrange to be notified when the notification is dismissed. (CancellationReceiver): New class. * java/org/gnu/emacs/EmacsNative.java (sendNotificationDeleted) (sendNotificationAction): New functions. * src/android.c (sendDndDrag, sendDndUri, sendDndText): Correct return types. (sendNotificationDeleted, sendNotificationAction) (android_exception_check_5, android_exception_check_6): New functions. * src/android.h: * src/androidgui.h (struct android_notification_event): New structure. (union android_event): New member for notification events. * src/androidselect.c (android_init_emacs_desktop_notification): Update JNI signatures. (android_notifications_notify_1, Fandroid_notifications_notify): New arguments ACTIONS, ACTION_CB and CANCEL_CB. Convert and record them as appropriate. (android_notification_deleted, android_notification_action): New functions. (syms_of_androidselect): Prepare a hash table of outstanding notifications. <QCactions, QCon_action, QCon_cancel> New defsyms. * src/androidterm.c (handle_one_android_event) <ANDROID_NOTIFICATION_DELETED> <ANDROID_NOTIFICATION_ACTION>: Dispatch event contents to androidselect.c for processing. * src/androidterm.h: * src/androidvfs.c (java_string_class): Export. * src/keyboard.c (kbd_buffer_get_event) <NOTIFICATION_EVENT>: Call callback specified by the event. * src/termhooks.h (enum event_kind) [HAVE_ANDROID]: New enum NOTIFICATION_EVENT.
* | Change bare-symbol back to match intentPaul Eggert2024-03-111-13/+22
| | | | | | | | | | | | | | | | | | | | Also, attempt to document the intent better. Problem reported by Alan Mackenzie (Bug#69684). * src/data.c (Fbare_symbol): Do not signal if the SYM is a symbol with position and symbols-with-pos-enabled is nil. Instead, ignore symbols-with-pos-enabled, as that was the intent. * test/src/data-tests.el (data-tests-bare-symbol): New test, to help prevent this bug from reoccurring.
* | * src/keyboard.c (read_key_sequence): Remove MSVC compatibility hackTim Ruffing2024-03-101-13/+5
| |
* | Continue reading in 'read-event' etc. at the end of a keyboard macroTim Ruffing2024-03-102-24/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug that could make 'read-event', 'read-char', and 'read-char-exclusive' erroneously return -1, an internal magic return value of 'read_char' leaked from C to lisp. Instead of returning -1, the aforementioned lisp functions now transparently continue reading available input (e.g., from the keyboard) when reaching the end of a keyboard macro. * src/keyboard.c (read_char, read_key_sequence): Move handling of the end of a keyboard macro from 'read_char' to its caller 'read_key_sequence', which is the only caller that can meaningfully deal with this case. * src/macros.c (Fexecute_kbd_macro): Document how the end of keyboard macro is processed. * etc/NEWS: Announce this change.
* | * src/keyboard.c (requeued_events_pending_p): New functionTim Ruffing2024-03-102-3/+14
| | | | | | | | | | | | | | | | * src/keyboard.c, src/keyboard.h (requeued_events_pending_p): Add function 'requeued_events_pending_p' (whose name was made available in the previous commit). As opposed to the previous function with the same name, the new function covers both command and other events. * src/keyboard.c (Finput_pending_p): Use the new function.
* | * src/keyboard.c (requeued_events_pending_p): Improve name and fix commentTim Ruffing2024-03-103-11/+7
| | | | | | | | | | | | | | | | | | * src/keyboard.c, src/keyboard.h (requeued_events_pending_p): Rename to 'requeued_command_events_pending_p' to clarify that the function covers only command events. Fix wrong comment that claimed that the function was unused. * src/process.c (wait_reading_process_output): Update caller to use the new name.
* | Extract check for end of macro to functionTim Ruffing2024-03-103-2/+18
| | | | | | | | | | | | | | * src/macros.h (at_end_of_macro_p): * src/macros.c (at_end_of_macro_p): New function. * src/keyboard.c (read_char): Use the new function.
* | Merge from origin/emacs-29Eli Zaretskii2024-03-091-5/+21
|\ \ | |/ | | | | | | | | b9f7a2274f6 ; Improve documentation of 'minibuffer-allow-text-propert... 5ffcca121bb ; Improve documentation of image properties 6e801077ae8 ; * src/composite.c (composition_compute_stop_pos): Add c...
| * ; * src/composite.c (composition_compute_stop_pos): Add comment.Eli Zaretskii2024-03-041-5/+21
| |
* | Enable stack overflow recovery on AndroidPo Lu2024-03-091-12/+13
| | | | | | | | | | | | | | | | | | * src/sysdep.c (handle_sigsegv): Return after restoring the original signal handler, which should proceed to call debuggerd to generate a tombstone. (init_sigsegv): Save the original signal handler on Android, to be restored after a signal is received. (init_signals): Call init_sigsegv on Android.
* | Update android_wc_lookup_stringPo Lu2024-03-081-1/+4
| | | | | | | | | | * src/android.c (android_wc_lookup_string): Don't clear compose state upon modifier key depress.