]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 months agoFix crash when displaying notifications on Android 3.0
Po Lu [Wed, 13 Mar 2024 07:33:24 +0000 (15:33 +0800)]
Fix crash when displaying notifications on Android 3.0

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't call setPriority until Jelly Bean.

(cherry picked from commit e7e285ec348c8c19b1ce06a52b89baec71956d7a)

13 months agoPrevent freezes on macOS (bug#69561)
Gerd Möllmann [Sat, 9 Mar 2024 14:06:29 +0000 (15:06 +0100)]
Prevent freezes on macOS (bug#69561)

* src/nsterm.m (ns_select_1): Store pending input_events. Always call
[NSApp run].

(cherry picked from commit 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68)

13 months agoPort more notification senders to non-XDG systems
Po Lu [Wed, 13 Mar 2024 02:59:39 +0000 (10:59 +0800)]
Port more notification senders to non-XDG systems

* 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.

(cherry picked from commit 6b40d557c4a9a4152565c1a1b0da49a1aaaec84f)

13 months agoTry and avoid hardcoding lists of function types
Stefan Monnier [Tue, 12 Mar 2024 20:09:23 +0000 (16:09 -0400)]
Try and avoid hardcoding lists of function types

* lisp/bind-key.el (bind-key--get-binding-description):
Show docstrings for compiled functions also.  Don't hardcode knowledge
about various particular kinds of functions.

* lisp/emacs-lisp/bytecomp.el (display-call-tree): Remove special
support for functions with a `byte-code` body since we never generate
that nowadays.  Don't hardcode knowledge
about various particular kinds of functions.

(cherry picked from commit 4afafa03704aab0c21e4cb4f028256ecead5f795)

13 months agoCleanup some type predicates
Stefan Monnier [Tue, 12 Mar 2024 19:43:43 +0000 (15:43 -0400)]
Cleanup some type predicates

Use the new `cl--define-built-in-type` to reduce the manually
maintained list of built-in type predicates.
Also tweak docstrings to use "supertype" rather than "super type",
since it seems to be what we use elsewhere.

* lisp/subr.el (special-form-p): Remove redundant `fboundp` test.
(compiled-function-p): Don'Return nil for subrs that aren't functions.

* lisp/emacs-lisp/cl-macs.el (type predicates): Trim down the list.

* lisp/emacs-lisp/cl-preloaded.el (cl--define-built-in-type):
Register the corresponding predicate if applicable.
(atom, null): Specify the predicate name explicitly.

(cherry picked from commit 8df673907781bce8b080b91b056cb9987587387c)

13 months agocl-generic: Signal an error when a type specializer won't work
Stefan Monnier [Tue, 12 Mar 2024 16:00:17 +0000 (12:00 -0400)]
cl-generic: Signal an error when a type specializer won't work

* lisp/emacs-lisp/cl-generic.el (cl--generic--unreachable-types): New var.
(cl-generic-generalizers :extra "typeof"): Use it to signal an
error for those types we can't handle.

(cherry picked from commit 3e96dd4f8851a45c66ebc9b8666ae449cc4c2725)

13 months ago; * admin/MAINTAINERS: Add Daniel Pettersson.
Eli Zaretskii [Tue, 12 Mar 2024 13:30:18 +0000 (15:30 +0200)]
; * admin/MAINTAINERS: Add Daniel Pettersson.

(cherry picked from commit 0cc44094613530744d3650e4a169335374d6727b)

13 months agoJsonrpc: improve performance of process filter function
Daniel Pettersson [Wed, 28 Feb 2024 12:03:56 +0000 (13:03 +0100)]
Jsonrpc: improve performance of process filter function

`run-at-time' keeps `timer-list' list sorted by inserting each
timer based on the timer value.  This means that
`timer--time-less-p' needs is executed ~N*N/2 times for each N
pending messages.  This means that jsonrpc becomes unusable
for connections that generate a lot messages at the same time.

* lisp/jsonrpc.el (Version): Bump to 1.0.25.
(jsonrpc--process-filter): Improve performance by activating
timers in a different order.  (Bug#69241)

(cherry picked from commit 7c552b22e64fa9173557e3511aa4e37ac1d5ea59)

13 months ago(comp-known-predicates): Fix overly optimistic `functionp`
Stefan Monnier [Tue, 12 Mar 2024 12:48:09 +0000 (08:48 -0400)]
(comp-known-predicates): Fix overly optimistic `functionp`

* lisp/emacs-lisp/comp.el (comp-known-predicates): `functionp` can also
be true for `cons` objects.

(cherry picked from commit d5773276fb1671da619eeee2c316098d6b1c25c4)

13 months agoFix CheckJNI crash on Android 2.2
Po Lu [Tue, 12 Mar 2024 04:24:59 +0000 (12:24 +0800)]
Fix CheckJNI crash on Android 2.2

* src/androidfns.c (syms_of_androidfns_for_pdumper): Don't free
local reference to script name if nonexistent.

(cherry picked from commit 3ed5777fa732123e8bf630293020f9d1766694b7)

13 months ago; Check in missing change to AndroidManifest.xml.in
Po Lu [Tue, 12 Mar 2024 02:46:00 +0000 (10:46 +0800)]
; Check in missing change to AndroidManifest.xml.in

* java/AndroidManifest.xml.in: Register CancellationReceiver.

(cherry picked from commit fd293c7c67d03204356be3cd6a0cb565dec9ecbf)

13 months ago(gnus-convert-old-newsrc): Remove ancient converters
Stefan Monnier [Tue, 12 Mar 2024 01:51:29 +0000 (21:51 -0400)]
(gnus-convert-old-newsrc): Remove ancient converters

* lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): Remove converters
from 2004 and before.
* lisp/gnus/legacy-gnus-agent.el: Delete file.

(cherry picked from commit 2704ec54fd3e33a0914b06ad762be42c4956110d)

13 months agoResolve inconsistency between Android and XDG notifications
Po Lu [Tue, 12 Mar 2024 01:58:51 +0000 (09:58 +0800)]
Resolve inconsistency between Android and XDG notifications

* 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'.

(cherry picked from commit 7ea3a464036f123f70d89b4571afcdeb3e650688)

13 months ago; Fix omission from last change
Po Lu [Tue, 12 Mar 2024 01:54:54 +0000 (09:54 +0800)]
; Fix omission from last change

* src/androidselect.c (android_notification_deleted): Adjust for
changed notification list format.

(cherry picked from commit fd33b637e986e7ec1c34a1358b5c71e31db95c11)

13 months agoImplement notification residency on Android
Po Lu [Tue, 12 Mar 2024 01:48:53 +0000 (09:48 +0800)]
Implement notification residency on Android

* 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.

(cherry picked from commit d7ded996082503ca00546c220c7ce8d96e16b76a)

13 months agoFix notification cancellation detection on Android
Po Lu [Tue, 12 Mar 2024 00:51:52 +0000 (08:51 +0800)]
Fix notification cancellation detection on Android

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Don't specify FLAG_ONE_SHOT in cancel intents.

(cherry picked from commit bf38783c32e794e46fd03210242f265f34257940)

13 months agoImplement notification callbacks on Android
Po Lu [Mon, 11 Mar 2024 13:40:47 +0000 (21:40 +0800)]
Implement notification callbacks on Android

* 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.

(cherry picked from commit a7a37341cad230448e487d0ffa343eeeb8a66a65)

13 months ago; Fix error message in last change to bindat.el
Basil L. Contovounesios [Mon, 11 Mar 2024 10:16:20 +0000 (11:16 +0100)]
; Fix error message in last change to bindat.el

Remove trailing period as per "(elisp) Error Symbols".

Relates to the following discussion:
https://lists.gnu.org/r/emacs-devel/2023-10/msg00473.html
https://lists.gnu.org/r/emacs-devel/2024-03/msg00340.html

(cherry picked from commit 75cfc6c73faa1561018b1212156964a7919c69fe)

13 months agoChange bare-symbol back to match intent
Paul Eggert [Mon, 11 Mar 2024 07:03:39 +0000 (00:03 -0700)]
Change bare-symbol back to match intent

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.

(cherry picked from commit 2d61ebb505977af4f9fd90f92a776599a73f8501)

13 months agoImprove pp-emacs-lisp-code backquote form printing
Michael Heerdegen [Sun, 18 Feb 2024 00:55:54 +0000 (01:55 +0100)]
Improve pp-emacs-lisp-code backquote form printing

* lisp/emacs-lisp/pp.el (pp--quoted-or-unquoted-form-p): New helper
function.
(pp--insert-lisp): Take care of quoted, backquoted and
unquoted expressions; print using an recursive call.
(pp--format-list): Exclude more cases from printing as a function call
by default.  Print lists whose second-last element is an (un)quoting
symbol using dotted list syntax; e.g. (a b . ,c) instead of (a b \, c).

(cherry picked from commit bbc53e0bcf3fe18e7c1cd51fb8719cf62b9f6c71)

13 months agoFix pp-emacs-lisp-code printing of symbols
Michael Heerdegen [Sun, 18 Feb 2024 01:48:15 +0000 (02:48 +0100)]
Fix pp-emacs-lisp-code printing of symbols

* lisp/emacs-lisp/pp.el (pp--insert-lisp): Print symbols
readably (bug#69168).

(cherry picked from commit 9a2ce74c3783c4be8ba70642da374d8e77c6f9ac)

13 months ago(bindat--unpack-item): Sanitize vector length
Petteri Hintsanen [Mon, 11 Mar 2024 03:30:11 +0000 (23:30 -0400)]
(bindat--unpack-item): Sanitize vector length

Copyright-paperwork-exempt: yes

* lisp/emacs-lisp/bindat.el (bindat--unpack-item): Sanitize vector length

(cherry picked from commit ed43ad5b5652aed075348357121d9193256721c0)

13 months agoAvoid dependency on nonexisting target in lispref makefile
Andreas Schwab [Sun, 10 Mar 2024 22:02:26 +0000 (23:02 +0100)]
Avoid dependency on nonexisting target in lispref makefile

* doc/lispref/Makefile.in (auxfiles): Change target into a
variable.
($(buildinfodir)/elisp.info): Adjust dependency.
(infoclean): Clean $(auxfiles).

(cherry picked from commit 887789eecc8546d60a296ce9771ecb20fc280a4d)

13 months agoLet 'browse-url-interactive-arg' return more values for NEW-WINDOW-FLAG
Jim Porter [Fri, 8 Mar 2024 05:55:45 +0000 (21:55 -0800)]
Let 'browse-url-interactive-arg' return more values for NEW-WINDOW-FLAG

Previously it always returned t or nil for NEW-WINDOW-FLAG, but now it
can return the actual prefix arg when appropriate.  This lets functions
for 'browse-url-browser-function' consult it and do more things than
just open a new window or not (for example, you could use "C--" as the
prefix arg to do something special in a custom function).

* lisp/net/browse-url.el (browse-url-interactive-arg): Use 'xor' to
adjust the value of 'current-prefix-arg'.
(browse-url): Update docstring.

(cherry picked from commit 46afc91c9f7e6ee6a7917537c83052e0877fa4f2)

13 months agosyncdoc-type-hierarchy.el: Sort and remove `comp` dependency
Stefan Monnier [Sun, 10 Mar 2024 19:12:00 +0000 (15:12 -0400)]
syncdoc-type-hierarchy.el: Sort and remove `comp` dependency

* admin/syncdoc-type-hierarchy.el: Delay loading `org-table` so as
not to "pollute" the table with Org-specific types.
(syncdoc-all-types): Sort the types topologically from the root.
(syncdoc-hierarchy): Use `cl--class-parents` instead if
`comp--direct-supertypes` so we don't depend on `comp-cstr`.
(syncdoc-make-type-table): Sort the table so supertypes always come before
their subtypes.
(syncdoc-make-type-table): Require `org-table` here.

* doc/lispref/elisp_type_hierarchy.jpg:
* doc/lispref/elisp_type_hierarchy.txt: Refresh.

(cherry picked from commit c17ecd2dcd27b73d673df51ce66f4b188afff6db)

13 months ago* src/keyboard.c (read_key_sequence): Remove MSVC compatibility hack
Tim Ruffing [Sat, 9 Mar 2024 11:15:22 +0000 (12:15 +0100)]
* src/keyboard.c (read_key_sequence): Remove MSVC compatibility hack

(cherry picked from commit 2fdb281a276af57c104008d68ae95c7f4b1c3da8)

13 months ago* lisp/calc/calc-prog.el: Switch to new method of detecting end of kbd macro
Tim Ruffing [Sat, 9 Mar 2024 11:29:39 +0000 (12:29 +0100)]
* lisp/calc/calc-prog.el: Switch to new method of detecting end of kbd macro

'read-char' will no longer return -1 as of
ac82baea1c41ec974ad49f2861ae6c06bda2b4ed. This switches to a cleaner
method of detecting whether the end of a keyboard macro has been
reached.

* lisp/calc/calc-prog.el (calc--at-end-of-kmacro-p): New function.
(calc-kbd-skip-to-else-if): Use the function.

Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
(cherry picked from commit df3e0bcbdbcfe907d7572b5561dd2bf9c3715a4a)

13 months agoRemove workarounds for solved 'read-event' bug
Tim Ruffing [Wed, 27 Dec 2023 13:32:09 +0000 (14:32 +0100)]
Remove workarounds for solved 'read-event' bug

* lisp/subr.el (read-char-choice-with-read-key):
* lisp/net/dbus.el (dbus-call-method):
Remove workarounds for the bug fixed in the previous commit
ac82baea1c41ec974ad49f2861ae6c06bda2b4ed, where 'read-event',
'read-char' and 'read-char-exclusively' could return wrongly -1.
In the case of lisp/dbus.el, this reverts commit
7177393826c73c87ffe9b428f0e5edae244d7a98.

(cherry picked from commit d444390ec569afee35628e112a8d96d11f40175c)

13 months agoContinue reading in 'read-event' etc. at the end of a keyboard macro
Tim Ruffing [Wed, 27 Dec 2023 13:32:09 +0000 (14:32 +0100)]
Continue reading in 'read-event' etc. at the end of a keyboard macro

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.

(cherry picked from commit 6f46dd516b84ad7d59b49c2e9e3fc1a2d4ef4d1c)

13 months ago* src/keyboard.c (requeued_events_pending_p): New function
Tim Ruffing [Wed, 27 Dec 2023 13:29:34 +0000 (14:29 +0100)]
* src/keyboard.c (requeued_events_pending_p): New function

* 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.

(cherry picked from commit d6f326452ecc761498d627a365c8014a467812eb)

13 months ago* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment
Tim Ruffing [Wed, 27 Dec 2023 13:29:34 +0000 (14:29 +0100)]
* src/keyboard.c (requeued_events_pending_p): Improve name and fix comment

* 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.

(cherry picked from commit 385a02cffde6d0fd80ff189704ad70cfebc3e8d4)

13 months agoExtract check for end of macro to function
Tim Ruffing [Wed, 27 Dec 2023 13:26:26 +0000 (14:26 +0100)]
Extract check for end of macro to function

* 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.

(cherry picked from commit fbc5fb2561d9e1d4e5b69b349a26c49d30ffc938)

13 months agoFix faulty decoded-time adjustment in erc-stamp
F. Jason Park [Sun, 10 Mar 2024 13:08:30 +0000 (06:08 -0700)]
Fix faulty decoded-time adjustment in erc-stamp

* lisp/erc/erc-stamp.el (erc-stamp--lr-date-on-pre-modify): Remove
disruptive assertion for now.
(erc-stamp--time-as-day): Attempt to fix date being rewound by a whole
day when daylight saving time is in effect.  Do this by forcing the
`dst' slot of the `decoded-time' object to -1 and the `zone' to nil.

(cherry picked from commit f3da3d1c68bef60ef28d67c6d8fa5d0cba8c9f08)

13 months agoRedefine erc-spoiler-face to indicate revealed text
F. Moukayed [Fri, 8 Mar 2024 08:39:03 +0000 (08:39 +0000)]
Redefine erc-spoiler-face to indicate revealed text

* lisp/erc/erc-goodies.el (erc-spoiler-face): Redefine role and redo
definition to inherit from `erc-control-default-face'.
(erc-controls-propertize): Include `cursor-face' in the applied hover
properties for spoiler text, and ensure they aren't clobbered by other
built-in modules, like `button'.
(Bug#69597)

Copyright-paperwork-exempt: yes
(cherry picked from commit 166c8a989491c21ea3baf96e4730a4ad9b78308f)

13 months agoMake important text props more resilient in ERC
F. Jason Park [Fri, 8 Mar 2024 05:53:23 +0000 (21:53 -0800)]
Make important text props more resilient in ERC

* lisp/erc/erc-button.el (erc-button-remove-old-buttons): Restore
original `mouse-face' values in areas marked as important after
clobbering.
* lisp/erc/erc.el (erc--reserve-important-text-props): New function.
(erc--restore-important-text-props): New function.
* test/lisp/erc/erc-tests.el (erc--restore-important-text-props): New
test.
(Bug#69597)

(cherry picked from commit e2620fd73441af19d478f7a9262de8c08a47ee2f)

13 months agoLeverage inverse-video for erc-inverse-face
F. Jason Park [Fri, 8 Mar 2024 05:53:11 +0000 (21:53 -0800)]
Leverage inverse-video for erc-inverse-face

* lisp/erc/erc-goodies.el (erc-inverse-face): Specify face attribute
`:inverse-video' (née :reverse-video) to swap foreground and
background colors over affected intervals, as per
https://modern.ircdocs.horse/formatting#reverse-color.
(erc-control-default-fg erc-control-default-bg): New faces for IRC
color-code number 99.  Ignore the ERC convention of prefixing
control-code-derived faces with "fg:" and "bg:" because it doesn't
comport with modern sensibilities, which demand identifiers normally
be namespaced.
(erc-get-bg-color-face, erc-get-fg-color-face): Return new, dedicated
faces instead of `default', and don't nest them in a list.
* test/lisp/erc/erc-goodies-tests.el
(erc-controls-highlight--inverse): Redo completely, asserting behavior
described in the spec linked to above.
(erc-controls-highlight--spoilers): New test based on the body of the
old `erc-controls-highlight--inverse', except without shadowing
`erc-insert-modify-hook' with an unrealistic, idealized value.  Adjust
expected buffer state to reflect the new role of
`erc-spoiler-face'.  (Bug#69597)

(cherry picked from commit 7b4ca9e609e2eadc824313053e70d7272d360b9d)

13 months ago; * java/org/gnu/emacs/EmacsPreferencesActivity.java: Fix commentary.
Po Lu [Sun, 10 Mar 2024 02:37:14 +0000 (10:37 +0800)]
; * java/org/gnu/emacs/EmacsPreferencesActivity.java: Fix commentary.

(cherry picked from commit 18b6289adfd15029fbaf4a259c44f8df10b9d702)

13 months ago(eglot-server-programs): Comment and whitespace only change
Stefan Monnier [Fri, 8 Mar 2024 17:39:59 +0000 (12:39 -0500)]
(eglot-server-programs): Comment and whitespace only change

* lisp/progmodes/eglot.el (eglot-server-programs): Add comment.
Make the definition fit into 80 columns.

(cherry picked from commit 357eb52e094ee751b2ee2f736f7a5e8cc1cdc99c)

13 months agoSimplify mode-indexed tables in packages
Stefan Monnier [Fri, 8 Mar 2024 17:50:33 +0000 (12:50 -0500)]
Simplify mode-indexed tables in packages

Now that we use extra-parents to group alternative major modes,
some tables can be simplified to mention only the group's leader.

* lisp/align.el (align-c++-modes, align-rules-list):
Don't bother listing TS alternatives.
(align-perl-modes): Don't bother listing CPerl alternative.

* lisp/info-look.el (perl-mode): Simplify.

* lisp/cedet/semantic/symref/grep.el (semantic-symref-filepattern-alist):
Don't bother listing TS alternatives.

* lisp/emulation/viper.el (viper-vi-state-mode-list): Don't bother
listing CPerl alternative.

* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions-if-enabled):
Take into account the modes hierarchy.
(gud-tooltip-modes): Don't bother listing TS alternatives.

* .dir-locals.el (c-ts-mode): Simplify.

(cherry picked from commit 41de53d4a1c49ef6c6e8ac4ecb0c10cb1b6e07ce)

13 months agoAdd non-TS modes as extra parent of TS modes (bug#68246)
Stefan Monnier [Fri, 8 Mar 2024 17:58:11 +0000 (12:58 -0500)]
Add non-TS modes as extra parent of TS modes (bug#68246)

Record the fact that TS modes are alternatives to the non-TS
modes using the new `derived-mode-add-parents` functionality.
Do the same for long standing similar issues with CPerl-mode.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode):
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode):
* lisp/textmodes/html-ts-mode.el (html-ts-mode):
* lisp/textmodes/css-mode.el (css-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode, tsx-ts-mode):
* lisp/progmodes/sh-script.el (bash-ts-mode):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/python.el (python-ts-mode):
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode):
* lisp/progmodes/json-ts-mode.el (json-ts-mode):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/java-ts-mode.el (java-ts-mode):
* lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
* lisp/progmodes/go-ts-mode.el (go-ts-mode, go-mod-ts-mode):
* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
* lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode):
* lisp/progmodes/csharp-mode.el (csharp-ts-mode):
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode):
* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode):
Add non-TS mode as extra parent.

* lisp/progmodes/cperl-mode.el (cperl-mode): Add `perl-mode` as
extra parent.

(cherry picked from commit c79a509384d33dab6a964ef9a97cbc9a1f1b5bf7)

13 months ago(dir-locals-collect-variables): Avoid spurious safety warnings
Stefan Monnier [Fri, 8 Mar 2024 17:44:38 +0000 (12:44 -0500)]
(dir-locals-collect-variables): Avoid spurious safety warnings

* lisp/files.el (dir-locals-collect-variables): Silence warnings for
extra parents' variables.

(cherry picked from commit 454a55dbd963d4b07c0dc0f6d540cc5fd4b4faa7)

13 months agoRun 'syncdoc-update-type-hierarchy'.
Andrea Corallo [Sat, 9 Mar 2024 15:14:14 +0000 (16:14 +0100)]
Run 'syncdoc-update-type-hierarchy'.

* doc/lispref/elisp_type_hierarchy.jpg: Update.
* doc/lispref/elisp_type_hierarchy.txt: Likewise.

(cherry picked from commit 3be70a13d7b27ccdffbd4efb44752d15376d5e57)

13 months ago* 'syncdoc-type-hierarchy.el' update due to recent changes
Andrea Corallo [Sat, 9 Mar 2024 15:13:47 +0000 (16:13 +0100)]
* 'syncdoc-type-hierarchy.el' update due to recent changes

* admin/syncdoc-type-hierarchy.el (syncdoc-all-types): Update.

(cherry picked from commit cc2579c10bc67dc375247490bb55367ef0800435)

13 months agoAuto-commit of loaddefs files.
Eli Zaretskii [Sat, 9 Mar 2024 09:24:30 +0000 (04:24 -0500)]
Auto-commit of loaddefs files.

(cherry picked from commit 1ea3b369021c90701c634c512426f75ce1291d77)

13 months agoEnable stack overflow recovery on Android
Po Lu [Sat, 9 Mar 2024 08:12:40 +0000 (16:12 +0800)]
Enable stack overflow recovery on Android

* 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.

(cherry picked from commit 5d9a8c3704c156cccea90a46362e6bfae0de87f2)

13 months agoFix case-sensitivity in 'complete-tag'
Eli Zaretskii [Sat, 9 Mar 2024 08:09:36 +0000 (10:09 +0200)]
Fix case-sensitivity in 'complete-tag'

* lisp/progmodes/etags.el (complete-tag): Bind
'completion-ignore-case', so that 'completion-in-region' is
affected by it.  This fixes a bug made in 30 Apr 2010, when this
function was refactored to use
'tags-completion-at-point-function'.  Reported by Morgan Willcock
<morgan@ice9.digital>.

(cherry picked from commit a4473afefe1a0f171ac6e811853836dd675f93d2)

13 months agoDo interactive mode tagging for locate.el
Charalampos Mitrodimas [Thu, 7 Mar 2024 18:38:15 +0000 (18:38 +0000)]
Do interactive mode tagging for locate.el

* lisp/locate.el (locate-tags, locate-find-directory)
(locate-find-directory-other-window): Do interactive mode
tagging.  (Bug#69619)

Copyright-paperwork-exempt: yes
(cherry picked from commit 966e1be5b337cf71f404a509cae4057b73f3f381)

13 months ago(eieio--generic-subclass-specializers): Autoload class
Stefan Monnier [Fri, 8 Mar 2024 16:57:22 +0000 (11:57 -0500)]
(eieio--generic-subclass-specializers): Autoload class

* lisp/emacs-lisp/eieio-core.el (eieio--generic-subclass-specializers):
Don't forget to handle autoloaded classes.

(cherry picked from commit 345cdd7a70558cd47c2ab3e124e2352debaa57cb)

13 months agoEIEIO: Fix regession (bug#69631)
Stefan Monnier [Fri, 8 Mar 2024 16:24:18 +0000 (11:24 -0500)]
EIEIO: Fix regession (bug#69631)

Not sure why earlier tests did not catch it, but there are more
places where we bump into problems because `eieio--class-precedence-list`
now returns also non-EIEIO classes.

* lisp/obsolete/eieio-compat.el
(eieio--generic-static-object-generalizer):
* lisp/emacs-lisp/eieio-core.el (eieio--generic-generalizer)
(eieio--generic-subclass-specializers): Handle non-EIEIO parents.

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-7): Adjust test.

(cherry picked from commit 5beb56fb53b2d6ee9d5ad621b7fc2c9d1d0ec9c5)

13 months agoeieio-core.el: Try and fix bug#69631
Stefan Monnier [Fri, 8 Mar 2024 15:47:01 +0000 (10:47 -0500)]
eieio-core.el: Try and fix bug#69631

* lisp/emacs-lisp/eieio-core.el (eieio--class-precedence-c3)
(eieio--class-precedence-dfs, eieio--class-precedence-bfs): Use
`cl--class-parents` since some of the parents aren't EIEIO classes.

(cherry picked from commit 055e31f1d021ef2c8ac5cca505b5f73118736cff)

13 months ago* Fix `capitalize` entry in `comp-known-type-specifiers` (bug#69631)
Andrea Corallo [Fri, 8 Mar 2024 13:26:14 +0000 (14:26 +0100)]
* Fix `capitalize` entry in `comp-known-type-specifiers` (bug#69631)

* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Fix
'capitalize' entry.

(cherry picked from commit 966d0a62a1a13a3df5155476d36eafe17999497e)

13 months ago; Improve documentation of 'minibuffer-allow-text-properties'
Eli Zaretskii [Fri, 8 Mar 2024 13:06:37 +0000 (15:06 +0200)]
; Improve documentation of 'minibuffer-allow-text-properties'

* doc/lispref/minibuf.texi (Text from Minibuffer): Document the
default value of 'minibuffer-allow-text-properties'.

(cherry picked from commit b9f7a2274f6a8352085d01c15bf9086ffe25f437)

13 months agoUpdate android_wc_lookup_string
Po Lu [Fri, 8 Mar 2024 12:47:23 +0000 (20:47 +0800)]
Update android_wc_lookup_string

* src/android.c (android_wc_lookup_string): Don't clear compose
state upon modifier key depress.

(cherry picked from commit cc75e103dd2a9d47f29addcc724812162c1a2626)

13 months agoSimplify type hierarchy operations
Stefan Monnier [Fri, 8 Mar 2024 06:48:59 +0000 (01:48 -0500)]
Simplify type hierarchy operations

Now that built-in types have classes that describe their
relationships exactly like struct/eieio/oclosure classes,
we can the code that navigates that DAG.

* lisp/emacs-lisp/cl-generic.el (cl--generic-struct-tag): Move to
`eieio-core.el`.
(cl--generic-type-specializers): Rename from
`cl--generic-struct-specializers`.  Make it work for any class.
(cl--generic-typeof-generalizer, cl--generic-oclosure-generalizer): Use it.
(cl--generic-struct-generalizer): Delete generalizer.
(cl-generic-generalizers :extra "cl-struct"): Delete method.
(prefill 0 cl--generic-generalizer): Move to after the typeof.
(cl-generic-generalizers :extra "typeof"): Rewrite to use
classes rather than `cl--all-builtin-types`.
(cl-generic--oclosure-specializers): Delete function.

* lisp/emacs-lisp/cl-preloaded.el (cl--direct-supertypes-of-type)
(cl--typeof-types, cl--all-builtin-types): Delete constants.

* lisp/emacs-lisp/comp-cstr.el (comp--typeof-builtin-types):
Delete constant.
(comp--cl-class-hierarchy): Simplify.
(comp--compute-typeof-types): Simplify now that
`comp--cl-class-hierarchy` and `comp--all-classes` work for built-in
types as well.
(comp--direct-supertypes): Just use `cl--class-parents`.
(comp-supertypes): Simplify since typeof-types should now be complete.

* lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload):
Use `superclasses` argument, so we can find parents before it's loaded.
(eieio--class-precedence-c3, eieio--class-precedence-dfs):
Don't add a `eieio-default-superclass` parent any more.
(eieio--class/struct-parents): Delete function.
(eieio--class-precedence-bfs): Use `eieio--class-parents` instead.
Don't stop when reaching `eieio-default-superclass`.
(cl--generic-struct-tag): Move from `cl-generic.el`.

(cherry picked from commit bd017175d4571e24ef1fdf84676136af1d36002d)

13 months agoeieio-core.el: Always put a parent in the parents of a class
Stefan Monnier [Thu, 7 Mar 2024 22:45:41 +0000 (17:45 -0500)]
eieio-core.el: Always put a parent in the parents of a class

* lisp/emacs-lisp/eieio-core.el (eieio-defclass-internal):
Always put a parent in the `parents` slot of the class.

* lisp/emacs-lisp/eieio.el (eieio-class-parents): Remove the
`eieio-default-superclass` if it's the only parent.
(child-of-class-p): Handle all classes in the parents.
(eieio-default-superclass): Adjust docstring.

(cherry picked from commit 945af4d9d11192d262f4fabbc66ee83f5beefc86)

13 months agoMake "parentless" structs inherit from their builtin type
Stefan Monnier [Thu, 7 Mar 2024 21:58:15 +0000 (16:58 -0500)]
Make "parentless" structs inherit from their builtin type

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-register-child):
Register child only in struct parents.
(cl-struct-define): Put the "type" as parent of parentless :type structs.
Copy slots only from struct parent classes.
(cl-structure-object): Set (manually) its parent to `record`
and remove assertion that it has no parents.

(cherry picked from commit 7c127fc965fbe781141a6bccbe0b620dc7862b1d)

13 months ago* lisp/emacs-lisp/oclosure.el (oclosure): Make it a subtype of `function`
Stefan Monnier [Thu, 7 Mar 2024 20:26:12 +0000 (15:26 -0500)]
* lisp/emacs-lisp/oclosure.el (oclosure): Make it a subtype of `function`

(cherry picked from commit 76e9c761a45e0157a8ca43eaaf928385d8e0c228)

13 months agocl-preloaded.el (built-in-class): New type
Stefan Monnier [Wed, 6 Mar 2024 21:32:35 +0000 (16:32 -0500)]
cl-preloaded.el (built-in-class): New type

Add classes describing the built-in types.

* lisp/emacs-lisp/cl-preloaded.el (built-in-class): New type.
(cl--define-built-in-type): New aux macro.
(all built-in types): "Define" them with it.
(cl--builtin-type-p): New aux function.
(cl--struct-name-p): Use it.
(cl--direct-supertypes-of-type, cl--typeof-types, cl--all-builtin-types):
Move the definitions to after the built-in classes are defined,
and rewrite to make use of those classes.

* lisp/emacs-lisp/cl-extra.el (cl-describe-type):
Accept two (unused) optional args, for use with `describe-symbol-backends`.
(describe-symbol-backends): Simplify accordingly and
add ourselves at the end.
(cl--class-children): New function.
(cl--describe-class): Use it.  Also don't show a silly empty list of slots
for the built-in types.

(cherry picked from commit 4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8)

13 months agocomp-cstr.el: Fix a minor error and prepare for upcoming changes
Stefan Monnier [Thu, 7 Mar 2024 21:56:42 +0000 (16:56 -0500)]
comp-cstr.el: Fix a minor error and prepare for upcoming changes

* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy): Add `atom`
and `t` only to those types whose "allparents" is clearly not complete.
(comp--compute--pred-type-h): Store the cstr rather than the type
in the hash-table, as expected by `comp--pred-to-cstr`.

(cherry picked from commit 9830421e964cfb39077b69efd38d122e3bacf5d4)

13 months agoDeclare 124 new Android permissions
Po Lu [Fri, 8 Mar 2024 02:58:17 +0000 (10:58 +0800)]
Declare 124 new Android permissions

* doc/emacs/android.texi (Android Environment): Document new
permissions and delete recently introduced permissions from the
list for Android 5.1 and earlier.

* java/AndroidManifest.xml.in: Declare 124 new permissions to
enable invoking features they protect from code running inside
Emacs.

(cherry picked from commit e4d1739a2917a1b2ab279f4765f015e667e07db0)

13 months ago; perl-mode, cperl-mode: Fix $\" in strings (Bug#69604)
Harald Jörg [Thu, 7 Mar 2024 23:37:36 +0000 (00:37 +0100)]
; perl-mode, cperl-mode: Fix $\" in strings (Bug#69604)

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-function):
Add to syntax-propertize-rules that $ is punctuation in strings.

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): capture $\
to catch the edge case of "$\"".  Make $ a punctuation char in
strings and comments.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-69604):
New testcases with various combinations of $ " \

(cherry picked from commit 00f86833ac5423d57825213ef8b611978be0a3eb)

13 months agoSupport expanding Eshell globs for remote file names
Jim Porter [Wed, 6 Mar 2024 21:27:07 +0000 (13:27 -0800)]
Support expanding Eshell globs for remote file names

* lisp/eshell/em-glob.el (eshell-glob-chars-regexp): New function...
(eshell-glob-regexp): ... use it.
(eshell-glob-p): New function...
(eshell-glob-convert): ... use it, and return the deepest start
directory possible.

* lisp/eshell/esh-util.el (eshell-split-path): Rename to...
(eshell-split-path): ... this, and account for remote file names.

* test/lisp/eshell/em-glob-tests.el
(em-glob-test/convert/current-start-directory)
(em-glob-test/convert/relative-start-directory)
(em-glob-test/convert/absolute-start-directory)
(em-glob-test/convert/remote-start-directory): New tests (bug#69592).

(cherry picked from commit e42f14f0e034d0b20c6b9fd0fea23686699e7df0)

13 months ago; * test/lisp/net/eww-tests.el (eww-test--response-function): Fix typo.
Jim Porter [Thu, 7 Mar 2024 20:19:28 +0000 (12:19 -0800)]
; * test/lisp/net/eww-tests.el (eww-test--response-function): Fix typo.

(cherry picked from commit aec0f610cb5aace1301cd230e57844a93d40cccd)

13 months agoRevert "Suppress docstring control char warning in macro-generated function"
Mattias Engdegård [Thu, 7 Mar 2024 13:29:36 +0000 (14:29 +0100)]
Revert "Suppress docstring control char warning in macro-generated function"

This reverts commit eeb89a5cb292bffe40ba7d0b0cf81f82f8452bf8.
It is no longer needed now that (lambda (...) "string") does not
have a doc string (bug#69387).

(cherry picked from commit 90c2e287b7654c22b66012059c953c976c1596c1)

13 months agoSingle string literal in body is return value only, not doc string
Mattias Engdegård [Wed, 6 Mar 2024 11:03:06 +0000 (12:03 +0100)]
Single string literal in body is return value only, not doc string

A function or macro body consisting of a single string literal now only
uses it as a return value.  Previously, it had the dual uses as return
value and doc string, which was never what the programmer wanted and
had some inconvenient consequences (bug#69387).

This change applies to `lambda`, `defun`, `defsubst` and `defmacro`
forms; most other defining forms already worked in the sensible way.

* lisp/emacs-lisp/bytecomp.el (byte-compile-lambda):
Don't use a lone string literal as doc string.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defun.el
(foo): Update docstring warning test.
* doc/lispref/functions.texi (Function Documentation): Update.
* etc/NEWS: Announce.

(cherry picked from commit 61b2f5f96b1d9dfd2fd908e09fac0d4163049c42)

13 months ago; Improve documentation of image properties
Eli Zaretskii [Thu, 7 Mar 2024 08:11:44 +0000 (10:11 +0200)]
; Improve documentation of image properties

* lisp/image.el (create-image, image-property): Add to do strings
link to description of image properties in ELisp manual.

* doc/lispref/display.texi (Defining Images): Fix example and add
cross-reference to where image properties are described.
(Image Descriptors): Add index entry.

(cherry picked from commit 5ffcca121bb79b97c6a0f941c71a61505032d8f8)

13 months ago; * src/composite.c (composition_compute_stop_pos): Add comment.
Eli Zaretskii [Mon, 4 Mar 2024 15:09:29 +0000 (17:09 +0200)]
; * src/composite.c (composition_compute_stop_pos): Add comment.

(cherry picked from commit 6e801077ae88e72dbad32015a083602062c4efe3)

13 months ago; Fix Tramp test
Eshel Yaron [Sun, 10 Mar 2024 11:20:44 +0000 (12:20 +0100)]
; Fix Tramp test

13 months agoDeprecate 'minibuffer-help-form'
Eshel Yaron [Sun, 10 Mar 2024 11:06:57 +0000 (12:06 +0100)]
Deprecate 'minibuffer-help-form'

13 months ago* lisp/follow.el: Put property 'isearch-scroll' on 'follow-recenter'.
Juri Linkov [Thu, 7 Mar 2024 07:56:02 +0000 (09:56 +0200)]
* lisp/follow.el: Put property 'isearch-scroll' on 'follow-recenter'.

(cherry picked from commit 8aabd835747297818d538cc16b3f53fcc1dd67f6)

13 months agoWhen navigating through history in EWW, don't keep adding to 'eww-history'
Jim Porter [Sun, 18 Feb 2024 04:49:15 +0000 (20:49 -0800)]
When navigating through history in EWW, don't keep adding to 'eww-history'

This resolves an issue where navigating back and then forward kept
adding new history entries so you could never hit the "end" (bug#69232).

* lisp/net/eww.el (eww-before-browse-history-function): New option.
(eww-history-position): Add docstring.
(eww-mode-map, eww-context-menu): Use correct predicates for when to
enable back/forward.
(eww-save-history): Save history entry in its original place when
viewing a historical page.
(eww--before-browse): New function...
(eww, eww-follow-link, eww-readable): ... call it.
(eww-render): Don't set 'eww-history-position' here...
(eww--before-browse): ... instead, set it here.
(eww-back-url): Set 'eww-history-position' based on the result of
'eww-save-history'.
(eww-forward-url): Set 'eww-history-position' directly, since
'eww-save-history' no longer adds a new entry in this case.
(eww-delete-future-history, eww-clone-previous-history): New functions.

* test/lisp/net/eww-tests.el: New file.

* etc/NEWS: Announce this change.

(cherry picked from commit 59e470dd5de6e75c4d3bb91c876c8540faf33fdb)

13 months agoTramp fixes after running regression tests on Android
Michael Albinus [Wed, 6 Mar 2024 16:51:42 +0000 (17:51 +0100)]
Tramp fixes after running regression tests on Android

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Unset environment variable PS2.

* lisp/net/tramp-androidsu.el (tramp-default-host-alist):
Don't add an entry; `tramp-default-host' is set properly.
(tramp-androidsu-maybe-open-connection): Don't set connection
property "remote-namespace" to nil, this is the default anyway.
Don't set connection property "remote-path", we use
connection-local values instead.  Unset environment variable PS2.
Dump shell options after setting all of them.
(tramp-androidsu-handle-make-process): Don't use hard-coded user "root".
(tramp-androidsu-connection-local-default-variables): New defvar.
Add it to connection-local profiles.

(cherry picked from commit b12059e4c320f374735a9c00975ef12cb964043f)

13 months agoRename type_hierarchy.* -> elisp_type_hierarchy.*
Andrea Corallo [Wed, 6 Mar 2024 15:43:45 +0000 (16:43 +0100)]
Rename type_hierarchy.* -> elisp_type_hierarchy.*

* doc/lispref/elisp_type_hierarchy.txt: Renamed.
* doc/lispref/elisp_type_hierarchy.jpg: Likewise.
* doc/lispref/Makefile.in (auxfiles)
($(buildinfodir)/elisp_type_hierarchy.txt)
($(buildinfodir)/elisp_type_hierarchy.jpg): Update.
* admin/syncdoc-type-hierarchy.el (syncdoc-update-type-hierarchy0): Likewise.
* Makefile.in (install-info, uninstall): Likewise.

(cherry picked from commit 415604c7a77205d91254a271f0112f69729eb3a9)

13 months agoRe-generate type_hierarchy.*
Andrea Corallo [Wed, 6 Mar 2024 14:50:33 +0000 (15:50 +0100)]
Re-generate type_hierarchy.*

* doc/lispref/type_hierarchy.txt: Update.
* doc/lispref/type_hierarchy.jpg: Likewise.

(cherry picked from commit a5d3ce38fa77296f12bf15a9451d4c151f10d766)

13 months ago* Update syncdoc to dump all preloaded type hierarchy
Andrea Corallo [Wed, 6 Mar 2024 14:41:37 +0000 (15:41 +0100)]
* Update syncdoc to dump all preloaded type hierarchy

* admin/syncdoc-type-hierarchy.el (syncdoc-file)
(syncdoc-emacs-repo-dir): New constants.
(syncdoc-lispref-dir): Make use of.
(syncdoc-all-types): New function.
(comp--direct-supertypes): Declare.
(syncdoc-hierarchy): Update.
(syncdoc-update-type-hierarchy0): Rename from
'syncdoc-update-type-hierarchy' and make non interactive.
(syncdoc-update-type-hierarchy): New function.

(cherry picked from commit 9526bd3cf8eb5e5ed78c7fb8eb03d9e7dac9b941)

13 months agoDon't report files from read-only adb partitions as writable
Po Lu [Wed, 6 Mar 2024 02:48:28 +0000 (10:48 +0800)]
Don't report files from read-only adb partitions as writable

* lisp/net/tramp-adb.el (tramp-adb-handle-file-writable-p):
Ignore the file-attributes cache, since file mode is not a
reliable indicator of writability.

(cherry picked from commit 1a5850a3af0693f022bb0a62e36bb84f762287c7)

13 months ago; Fix last change
Po Lu [Wed, 6 Mar 2024 02:20:36 +0000 (10:20 +0800)]
; Fix last change

* lisp/net/tramp-androidsu.el
(tramp-androidsu-generate-wrapper): Arguments to fset must be
symbols rather than functions.

(cherry picked from commit 845d334c10ab8a12ac5eead90abfa9cae1f4b67c)

13 months ago* Makefile.in (install-info): Fix target (bug#69569).
Vincenzo Pupillo [Tue, 5 Mar 2024 21:36:34 +0000 (22:36 +0100)]
* Makefile.in (install-info): Fix target (bug#69569).

(cherry picked from commit d5f11e890c598cd2e15cb2fd93e604ed100ce355)

13 months ago; * etc/NEWS: Fix wording and punctuation of a recently added entry.
Eli Zaretskii [Tue, 5 Mar 2024 17:32:29 +0000 (19:32 +0200)]
; * etc/NEWS: Fix wording and punctuation of a recently added entry.

(cherry picked from commit 33976ecf244082346cbc71ff1102ef7de1ed36fe)

13 months ago* lisp/tab-bar.el (tab-bar-tab-post-select-functions): New hook (bug#69093).
Juri Linkov [Tue, 5 Mar 2024 17:14:28 +0000 (19:14 +0200)]
* lisp/tab-bar.el (tab-bar-tab-post-select-functions): New hook (bug#69093).

(tab-bar-select-tab): Call tab-bar-tab-post-select-functions at the end.

(cherry picked from commit 3cb06145070ff5d4a220f1144434f1ba6c1976f7)

13 months agoNew property 'context-menu-functions' (bug#62250)
Juri Linkov [Tue, 5 Mar 2024 16:50:51 +0000 (18:50 +0200)]
New property 'context-menu-functions' (bug#62250)

* lisp/iimage.el (iimage-mode-buffer): Set context-menu-functions
text property to '(image-context-menu)'.

* lisp/image.el (image-context-menu): New function.
(put-image): Set context-menu-functions overlay property
to '(image-context-menu)'.
(insert-image, insert-sliced-image): Set context-menu-functions
text property to '(image-context-menu)'.

* lisp/mouse.el (context-menu-map): Use mouse-posn-property
'context-menu-functions' and call its funs at the end.

(cherry picked from commit f16a85e317d940aa2e0f0375ec5d1917cb04ade3)

13 months ago* lisp/net/dictionary.el: More fixes for dictionary-new-matching (bug#69312)
Juri Linkov [Tue, 5 Mar 2024 16:42:49 +0000 (18:42 +0200)]
* lisp/net/dictionary.el: More fixes for dictionary-new-matching (bug#69312)

(dictionary-new-matching): Change the order of standard calls
to be the same as in 'dictionary-new-search'.
Use new function 'dictionary-new-matching-internal'.
(dictionary-new-matching-internal): New function based on
'dictionary-new-search-internal'.

(cherry picked from commit 9cf0f254bae79f6b6cda01e7a4b77fabec9f3f8f)

13 months ago* Makefile.in (uninstall): Clean-up type_hierarchy* files.
Andrea Corallo [Tue, 5 Mar 2024 14:21:44 +0000 (15:21 +0100)]
* Makefile.in (uninstall): Clean-up type_hierarchy* files.

(cherry picked from commit 5155f5b1cc0a48566d0f419de8cffd845638e567)

13 months ago* Makefile.in (install-info): Install type_hierarchy* files as well.
Andrea Corallo [Tue, 5 Mar 2024 14:07:05 +0000 (15:07 +0100)]
* Makefile.in (install-info): Install type_hierarchy* files as well.

(cherry picked from commit 4673b99071399bf43329741d3f5ab56eb6854572)

13 months ago* Copy type hierarchy representation to the info dir
Andrea Corallo [Tue, 5 Mar 2024 10:48:08 +0000 (11:48 +0100)]
* Copy type hierarchy representation to the info dir

* doc/lispref/Makefile.in (auxfiles)
($(buildinfodir)/type_hierarchy.txt)
($(buildinfodir)/type_hierarchy.jpg): New targets.
($(buildinfodir)/elisp.info): Add dependecy.

(cherry picked from commit 3023976b484e52f756ac9fc4c87cc7c6c5192b05)

13 months agoAdapt tramp.texi
Michael Albinus [Tue, 5 Mar 2024 10:17:48 +0000 (11:17 +0100)]
Adapt tramp.texi

* doc/misc/tramp.texi (Quick Start Guide): Add androidsu.
(Inline methods): Make androidsu an own item.

(cherry picked from commit dcdb066025ca7ed813fa832bf931d411a9d109a0)

13 months agodisass.el (disassemble-1): Minor simplification
Stefan Monnier [Tue, 5 Mar 2024 04:42:50 +0000 (23:42 -0500)]
disass.el (disassemble-1): Minor simplification

* lisp/emacs-lisp/disass.el (disassemble-1): Remove code for functions
of the form (lambda ARGS (byte-code ...)) which we don't use any
more nowadays.

(cherry picked from commit 218748c26287ae865229fe8a3c520facfa12fede)

13 months agocl-preloaded.el: Further fine-tuning
Stefan Monnier [Tue, 5 Mar 2024 04:12:29 +0000 (23:12 -0500)]
cl-preloaded.el: Further fine-tuning

* lisp/emacs-lisp/cl-preloaded.el (cl--direct-supertypes-of-type):
Fix some left over issues:
- Remove redundant `number-or-marker` from `marker`s parents.
- Add `function` to the types, since it was missing.
(cl--typeof-types): Add a warning for missing type info.

* admin/syncdoc-type-hierarchy.el (syncdoc-hierarchy): Fix parent of
`oclosure`.

* doc/lispref/type_hierarchy.txt:
* doc/lispref/type_hierarchy.jpg: Update.

(cherry picked from commit 418ad866bf846a6a3328d91df28c958be75337be)

13 months agoRearrange Android splash screen messages
Po Lu [Tue, 5 Mar 2024 03:23:27 +0000 (11:23 +0800)]
Rearrange Android splash screen messages

* lisp/startup.el (fancy-startup-tail, fancy-startup-screen)
(normal-splash-screen): Adjust for function renaming; move the
storage permissions notice to the top of the splash screen.

* lisp/term/android-win.el (android-after-splash-screen): Rename
from android-before-splash-screen and adjust layout lightly.

* src/android.c (android_wc_lookup_string): Terminate character
composition after a character is returned, whether it contain a
Unicode character or not.

(cherry picked from commit 1a35eb86b8cb75ce390525dd3394a52376b622a6)

13 months agosyncdoc-type-hierarchy.el: Adjust to changes in `cl-preloaded.el`
Stefan Monnier [Mon, 4 Mar 2024 18:24:34 +0000 (13:24 -0500)]
syncdoc-type-hierarchy.el: Adjust to changes in `cl-preloaded.el`

* admin/syncdoc-type-hierarchy.el (syncdoc-lispref-dir):
Use `macroexp-file-name`.
(syncdoc-hierarchy): New var.
(syncdoc-insert-dot-content, syncdoc-make-type-table): Use it.
(syncdoc-update-type-hierarchy): Don't crash if `dot` is absent.

(cherry picked from commit b06916cb218b133a4ebc9d7fa87b370fc2c2ed02)

13 months agoadmin/syncdoc-type-hierarchy.el: Move from `etc`
Stefan Monnier [Mon, 4 Mar 2024 17:02:45 +0000 (12:02 -0500)]
admin/syncdoc-type-hierarchy.el: Move from `etc`

AFAICT `admin` is where we keep these kinds of files.

(cherry picked from commit 167c17c1ad740b35ed1c875b57817784655851d9)

13 months agoRevert "Update some native comp tests"
Stefan Monnier [Mon, 4 Mar 2024 16:19:08 +0000 (11:19 -0500)]
Revert "Update some native comp tests"

This reverts commit 4a0d430bdc3650ca3dfd8bdd14781764fbcbdc7e.

AFAICT that commit was made to accomodate regressions introduced
in the new `cl-preloaded.el` code and these have been fixed.

(cherry picked from commit 94632c611e6ba5607a1039a8939d5ab173ee5bfb)

13 months agotramp-androidsu.el code cleanup
Michael Albinus [Mon, 4 Mar 2024 14:44:24 +0000 (15:44 +0100)]
tramp-androidsu.el code cleanup

* lisp/net/tramp-androidsu.el (tramp-androidsu-generate-wrapper):
Prefer #' notation for function names.
(tramp-androidsu-handle-copy-file)
(tramp-androidsu-handle-file-local-copy)
(tramp-androidsu-handle-make-symbolic-link)
(tramp-androidsu-handle-rename-file)
(tramp-androidsu-handle-write-region): Don't use a wrapper.
(tramp-adb-connection-local-default-ps-profile): Don't initialize,
this happens in tramp-db.el.

(cherry picked from commit 5b49a38d1b37707bbbc8c069ed20ce7cd18fb2ac)

13 months agoRevert "Replace XSETSYMBOL with make_lisp_symbol"
Mattias Engdegård [Mon, 4 Mar 2024 13:14:05 +0000 (14:14 +0100)]
Revert "Replace XSETSYMBOL with make_lisp_symbol"

This reverts commit de6b1e1efb1a36c69e7a6e09297e1de5b1477121.

While it did simplify code, there aren't much in the way of technical
benefits the change at this time, and there were protest against the
unwarranted style change.

(cherry picked from commit 11ffb4656d768b09e1f7dfacc091d85eef4a403a)

13 months agoRepair miscompilation of single-arg `apply` (bug#69533)
Mattias Engdegård [Mon, 4 Mar 2024 09:44:19 +0000 (10:44 +0100)]
Repair miscompilation of single-arg `apply` (bug#69533)

* lisp/emacs-lisp/byte-opt.el (byte-optimize-apply):
Don't optimise single-argument `apply`; it's a legacy construct.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.

(cherry picked from commit b9e8474a4470f71c30a4b89651fd3c5f2ef92ba2)

13 months ago; * lisp/vc/diff-mode.el (diff--refine-hunk): Escape literal `+`.
Mattias Engdegård [Sun, 3 Mar 2024 14:55:30 +0000 (15:55 +0100)]
; * lisp/vc/diff-mode.el (diff--refine-hunk): Escape literal `+`.

(cherry picked from commit 2c2a15bd171ecbf87fdac4405c7ea5f567fcf38a)

13 months ago; * etc/NEWS: add missing definite article
Mattias Engdegård [Tue, 27 Feb 2024 11:31:57 +0000 (12:31 +0100)]
; * etc/NEWS: add missing definite article

(cherry picked from commit 3b7cb55e5bec692fc1055e0b70a95afb4fac107f)

13 months agoAvoid crashes due to base-less indirect buffer
Eli Zaretskii [Mon, 4 Mar 2024 12:59:27 +0000 (14:59 +0200)]
Avoid crashes due to base-less indirect buffer

* src/buffer.c (Fkill_buffer): Prevent killing a buffer if its
indirect buffer refuses to be killed.  (Bug#69529)

(cherry picked from commit 0df3dc3d46fe7848aabb3ca5ff7085ca59799f43)

13 months agoFix 'set-window-configuration' and 'window-state-put'
Martin Rudalics [Mon, 4 Mar 2024 09:33:49 +0000 (10:33 +0100)]
Fix 'set-window-configuration' and 'window-state-put'

Fix some bugs with 'window-state-put' (Bug#69093).  Add new
hook 'window-kept-windows-functions' (Bug#68235).

* doc/lispref/windows.texi (Window Configurations): Mention
'window-kept-windows-functions'.
(Window Hooks): Describe new abnormal hook
'window-kept-windows-functions'.
* src/marker.c (Fmarker_last_position): New function to return
the last position of a marker even if its buffer is now dead.
* src/window.c (Fset_window_configuration): If
'window-kept-windows-functions' is non-nil, do not delete any
window whose buffer is now dead but remember all such windows in
a list to pass to 'window-kept-windows-functions'.  Run
'window-kept-windows-functions' if it is non-nil.
(Vwindow_kept_windows_functions): New abnormal hook run by
Fset_window_configuration and 'window-state-put' with two
arguments - the frame whose configuration is restored and a list
of entries for each window whose buffer was found dead during
restoration.  Each entry is a list of four elements, the window,
the dead buffer, and the last know positions of the start and
point of that window.
* lisp/window.el (window-state-put-kept-windows)
(window-state-put-selected-window): New variables.
(window--state-put-2): Make sure buffer is live before restoring
its state.  Set 'window-state-put-selected-window' to state's
selected window.  If 'window-kept-windows-functions' is non-nil,
do not delete any windows whose buffer is found dead but
remember all such windows in a list to pass to
'window-kept-windows-functions'.
(window-state-put): Run 'window-kept-windows-functions' if it is
non-nil.  Select window recorded in
'window-state-put-selected-window'.

(cherry picked from commit 912e37b811107768e0cb3bc95184177f817dbdb2)

13 months ago; Fix last major-mode-remap-defaults change.
Basil L. Contovounesios [Mon, 4 Mar 2024 06:19:22 +0000 (07:19 +0100)]
; Fix last major-mode-remap-defaults change.

(cherry picked from commit 6dacb60bb135dbb002c2ce1c70f70430c5d1bbff)