1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

171367 commits

Author SHA1 Message Date
Andrea Corallo
e8d2bc7531 ; * lisp/emacs-lisp/comp-cstr.el (comp--normalize-typeset0): Fix comment. 2024-03-20 12:01:10 +01:00
Andrea Corallo
0b0c7da8c8 Add native compiler sanitizer
* 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'.
2024-03-20 09:51:10 +01:00
Po Lu
e72f17e462 Respect file display names during Android drag-and-drop
* java/org/gnu/emacs/EmacsService.java (buildContentName):
Remove redundant projection argument to resolver.query.

* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): If a
content resolver is available, attempt to convert content URIs
into file names in advance.

* lisp/term/android-win.el (android-handle-dnd-event): Adjust
correspondingly.
2024-03-20 10:23:42 +08:00
Kévin Le Gouguec
014cd00402 Fix vc-git test when no identities are configured
Reported by john muhl <jm@pub.pink>.

* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Set
some environment variables (lifted from vc-tests.el) to let
'git commit' compute dummy author and committer identities.
2024-03-19 21:53:40 +01:00
Eli Zaretskii
88355de602 Unbreak the Cygw32 build broken by resent WTS_SESSION changes
* 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)
2024-03-19 14:45:45 +02:00
Andrea Corallo
f7f619779c * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test. 2024-03-19 11:05:40 +01:00
Andrea Corallo
0f76baeac0 * Use 'cl-type-of' in comp-cstr.el
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-homogeneous-no-range)
(comp-cstr-union-1-no-mem, comp-cstr-intersection-no-hashcons):
Make use of 'cl-type-of' in place of 'type-of'.
2024-03-19 11:05:40 +01:00
Po Lu
a7cb220523 Update android.texi
* doc/emacs/android.texi (Android Startup): Describe
/content/by-authority-named.
2024-03-19 12:17:43 +08:00
Po Lu
f2e239c6a7 Respect display names of Android content URIs
* 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.
2024-03-19 12:08:17 +08:00
Eli Zaretskii
ce29ae32d0 ; * lisp/vc/vc-git.el (vc-git--out-str): Doc fix. 2024-03-18 15:59:54 +02:00
Stefan Monnier
70ac815ece * lisp/emacs-lisp/cl-preloaded.el (user-ptr): Add predicate 2024-03-18 09:38:23 -04:00
Stefan Monnier
be08372bf9 Merge branch 'cl-type-of' (bug#69739) 2024-03-18 09:35:11 -04:00
Stefan Monnier
63e67916b0 Followup changes to cl-type-of
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.
2024-03-18 09:32:53 -04:00
Stefan Monnier
e624bc6275 (primitive-function): New type
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.
2024-03-18 09:32:49 -04:00
Stefan Monnier
706403f2aa (cl-type-of): New function to return more precise types (bug#69739)
* 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.
2024-03-18 09:29:47 -04:00
Po Lu
1a8b34a503 Makeshift solution for X server bug
* src/xterm.c (x_sync_init_fences): Detect errors around
XSyncCreateFence.  (bug#69762)
2024-03-18 09:14:18 +08:00
Kévin Le Gouguec
8d4a8b7dfd ; Re-apply accidentally reverted commit
This re-applies:

  2024-03-17 "Fix vc-dir when "remote" Git branch is local"
  (21828f288e)

reverted as part of the unrelated:

  2024-03-17 "Update modus-themes to their 4.4.0 version"
  (67b0c1c09e)

The original commit message follows:

Fix vc-dir when "remote" Git branch is local

While in there, add that "tracking" branch to the vc-dir
buffer.  For bug#68183.

* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce
boilerplate with new function 'vc-git--out-ok'; stop calling
vc-git-repository-url when REMOTE is "." to avoid throwing an
error; display tracking branch; prefer "none (<details...>)" to
"not (<details...>)" since that reads more grammatically
correct.
(vc-git--out-ok): Add documentation.
(vc-git--out-str): New function to easily get the output from a
Git command.
* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo)
(vc-git-test--run): New helpers, defined to steer clear of
vc-git-- internal functions.
(vc-git-test-dir-track-local-branch): Check that vc-dir does
not crash.
2024-03-17 22:37:28 +01:00
Juri Linkov
c29b6df227 * lisp/tab-bar.el (tab-bar-select-restore-windows): New defcustom.
(tab-bar-select-restore-windows): New function.
(tab-bar-select-tab): Let-bind window-restore-killed-buffer-windows
to tab-bar-select-restore-windows (bug#68235).
2024-03-17 19:57:05 +02:00
Protesilaos Stavrou
562d9c9db5
Update source repository of the Modus themes
* admin/MAINTAINERS: Update URL and remove outdated references.
2024-03-17 18:49:21 +02:00
Protesilaos Stavrou
67b0c1c09e
Update modus-themes to their 4.4.0 version
* doc/misc/modus-themes.org: Update the manual to better document
existing functionality and cover the new features.

* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Update the
palette of each theme.

* etc/themes/modus-themes.el (require): Remove call to cl-lib
and do not use relevant functions.
(modus-themes-operandi-colors, modus-themes-vivendi-colors)
(modus-themes-version, modus-themes-report-bug): Remove old
calls to 'make-obsolete' and related.

(modus-themes--annotate-theme): Tweak the completion annotation function.

(modus-themes--org-block): Deprecate the user option 'modus-themes-org-blocks'.
(modus-themes-faces): Update faces.
(modus-themes-custom-variables): Update the list of custom
variables.

Detailed release notes are available here:
<https://protesilaos.com/codelog/2024-03-17-modus-themes-4-4-0/>.
2024-03-17 18:46:15 +02:00
Kévin Le Gouguec
21828f288e Fix vc-dir when "remote" Git branch is local
While in there, add that "tracking" branch to the vc-dir
buffer.  For bug#68183.

* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Reduce
boilerplate with new function 'vc-git--out-ok'; stop calling
vc-git-repository-url when REMOTE is "." to avoid throwing an
error; display tracking branch; prefer "none (<details...>)" to
"not (<details...>)" since that reads more grammatically
correct.
(vc-git--out-ok): Add documentation.
(vc-git--out-str): New function to easily get the output from a
Git command.
* test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo)
(vc-git-test--run): New helpers, defined to steer clear of
vc-git-- internal functions.
(vc-git-test-dir-track-local-branch): Check that vc-dir does
not crash.
2024-03-17 16:44:25 +01:00
Po Lu
7a0f4de3c1 Improve C++ standard library detection on Android
* configure.ac: Stop relaying --with-ndk-cxx-shared to the
nested invocation of configure.

* build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES):

* build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Insert all
of the C++ libraries available on Android.

* configure.ac: Call ndk_LATE and ndk_LATE_EARLY within if
statement at toplevel, averting needless calls to AC_PROG_CXX.

* cross/ndk-build/Makefile.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS):

* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_CXX_STL)
(NDK_BUILD_CXX_LDFLAGS): New variables.

* cross/ndk-build/ndk-resolve.mk (NDK_SYSTEM_LIBRARIES):
Introduce several other C++ libraries sometimes present on
Android.
(NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Insert NDK_BUILD_CXX_STL
when any of these new C++ libraries are requested.

* m4/ndk-build.m4: Completely rewrite C++ compiler and library
detection.

* java/org/gnu/emacs/EmacsNative.java (EmacsNative): Attempt to
load more libraries from static initializer.

* java/INSTALL: Remove obsolete information.
2024-03-17 19:34:09 +08:00
Stefan Monnier
445e2499ba debug.el: Prevent re-entering the debugger for the same error
We can have several active `handler-bind`s that all want to invoke the
debugger, in which case we can have the following sequence:

- The more deeply nested handler calls the debugger.
- After a while the user invokes `debugger-continue`.
- `signal_or_quit` propagates the error up the stack to the
  second handler, which calls the debugger again.
- The user thus ends up right back at the same place, as if
  `debugger-continue` had not be processed.

Fix this by remembering the last processed error and skipping
the debugger if we bump into it again.

* lisp/emacs-lisp/debug.el (debugger--last-error): New var.
(debugger--duplicate-p): New function.
(debug): Use them.
2024-03-16 23:10:48 -04:00
Basil L. Contovounesios
ad3a3ad6e6 ; Pacify -Wmaybe-uninitialized in coding.c.
Warning seen with GCC 13 -Og.
2024-03-16 14:15:25 +01:00
Eli Zaretskii
685f4295f9 ; Document more DND functions with limited support
* lisp/dnd.el (dnd-begin-text-drag, dnd-begin-file-drag)
(dnd-begin-drag-files): Document platforms that support these
functions.  (Bug#69662)
2024-03-16 12:58:33 +02:00
Eli Zaretskii
d855f1c3f9 ; Fix recent changes in documentation
* doc/lispref/markers.texi (Information from Markers):
* etc/NEWS: Improve description of 'marker-last-position'.
2024-03-16 11:58:56 +02:00
Eli Zaretskii
d60d625f6e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2024-03-16 05:52:31 -04:00
Eli Zaretskii
cc8a2c57b5 Merge from origin/emacs-29
3b791ebbe1 ; Fix 'usage:' keyword in Ffile_name_concat doc.
ed48b0d657 ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.
b708e639d6 ; * src/lread.c (maybe_swap_for_eln): Clarify warning mes...
db027a0697 ; Fix bibtex-biblatex-field-alist docstring typo.
a9be5c7ea9 ; * doc/lispref/control.texi (Conditionals): Add missing ...
db5915f30b Fix 'with-sqlite-transaction'
fe491173e8 ; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
2024-03-16 05:47:41 -04:00
Martin Rudalics
c12852bbf6 Document and announce 'marker-last-position'
* 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.
2024-03-16 10:46:02 +01:00
Martin Rudalics
899ea79310 In window-related documentation write 'symbol' instead of 'constant'
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'.
2024-03-16 10:10:29 +01:00
Po Lu
deebf74b0e ; * src/xterm.c (syms_of_xterm): Fix typo. 2024-03-16 15:18:07 +08:00
Po Lu
28e481bf7a Respond to default action from Gnus notifications
* lisp/gnus/gnus-notifications.el (gnus-notifications-action):
Consider default equivalent to read.
2024-03-16 15:16:00 +08:00
Po Lu
6585299216 Support x-*-keysym on Android
* src/androidterm.c (android_android_to_emacs_modifiers)
(android_emacs_to_android_modifiers, syms_of_androidterm): Port
x-*-keysym from xterm.c.
2024-03-16 15:13:09 +08:00
Po Lu
4d03f70b7f Correct doc strings for x-*-keysym
* src/xterm.c (syms_of_xterm): Clarify whether x-*-keysym
affects the modifier key reported for a keysym or the other way
around.
2024-03-16 15:12:33 +08:00
Po Lu
c77e35efd3 * doc/lispref/frames.texi (Window System Selections): Fix misuse of xref. 2024-03-16 09:55:23 +08:00
Po Lu
6461854f47 ; Circumvent miscompilations on Sun C 5.12 (148917-07)
* src/minibuf.c (Ftry_completion, Fall_completions): Transform
ternary expressions after open-ended if statements into proper
if/else statements.
2024-03-16 09:50:58 +08:00
Po Lu
bbbf1e6f2d Fix calc.texi for Texinfo 4.13
* doc/misc/calc.texi (Fractions): Replace instances of @U with
raw Unicode characters and adjust the document encoding
suitably.
2024-03-16 09:29:42 +08:00
Basil L. Contovounesios
983d173099 ; * src/eval.c (Fhandler_bind_1): Fix docstring. 2024-03-16 00:23:41 +01:00
Basil L. Contovounesios
3b791ebbe1 ; Fix 'usage:' keyword in Ffile_name_concat doc. 2024-03-16 00:20:41 +01:00
Stefan Monnier
7231a89524 * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749) 2024-03-15 12:45:09 -04:00
Andrea Corallo
0055362855 * Don't install unnecessary trampolines (bug#69573)
* lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install):
Check that subr-name actually matches the target subr.
2024-03-15 14:44:22 +01:00
Andrea Corallo
c393c04679 * lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Don't declare. 2024-03-15 14:43:40 +01:00
Eli Zaretskii
bf3d296d24 ; Fix documentation of a recent change (bug#68235)
* 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'.
2024-03-15 14:22:14 +02:00
Eli Zaretskii
ed48b0d657 ; * CONTRIBUTE: Ask not to use non-ASCII unless necessary. 2024-03-15 13:29:31 +02:00
Martin Rudalics
3858e4f229 Fix bug with CHECK_STRUCTS introduced by last buffer.h change
* src/pdumper.c (dump_buffer): Fix HASH_buffer_.  Assign
last_name_ field.
2024-03-15 11:53:31 +01:00
Martin Rudalics
5bba1b95b8 Further adjustments for restoring killed buffer windows (Bug#68235)
* 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'.
2024-03-15 10:35:27 +01:00
Eli Zaretskii
1c4233b9a3 ; Fix documentation of 'flyspell-check-changes'
* lisp/textmodes/flyspell.el (flyspell-check-changes): Doc fixes.

* etc/NEWS: Improve wording of entry for 'flyspell-check-changes'.
2024-03-15 10:44:23 +02:00
Eli Zaretskii
ebd32040e0 ; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix. 2024-03-15 10:29:06 +02:00
Juri Linkov
ffbf876a93 * lisp/vc/diff-mode.el (diff-mode-menu): Add menu item "Apply all hunks".
It's bound to the recently added command 'diff-apply-buffer'.
2024-03-15 09:45:48 +02:00
Spencer Baugh
9dcb28d601 With visible-completions, only bind RET when completion is selected
Previously, if minibuffer-visible-completions was non-nil, we bound RET
whenever the *Completions* buffer was visible.  This meant that RET in
completion-in-region would not enter a newline, which is a somewhat
annoying behavior change from minibuffer-visible-completions=nil.

Now, we only bind RET when a completion is selected.  This means
RET will newline in completion-in-region.

So that completion help continues to suggest the correct keys,
we also add minibuffer-visible-completions--always-bind.  When
let-bound to a non-nil value, it makes the
minibuffer-visible-completions binds always active.  We let-bind
it around substitute-command-keys.

* lisp/minibuffer.el (minibuffer-visible-completions--always-bind)
(minibuffer-visible-completions--filter): Add.
(minibuffer-visible-completions-bind): Use
minibuffer-visible-completions--filter.  (bug#68801)
* lisp/simple.el (minibuffer-visible-completions--always-bind)
(completion-setup-function): Let-bind
minibuffer-visible-completions--always-bind so the completion
help is correct.
2024-03-15 09:40:48 +02:00