Keep indenting text when 'shr-fill-text' is nil (bug#69555)
The 'shr-fill-...' functions handle both hard-filling (adding
newlines to break long lines) and indentation. Setting
'shr-fill-text' to nil currently causes these functions to be
short-circuited completely, so e.g. blockquotes are no longer
indented, whereas the intent of this user option is only to
prevent hard-filling to let visual-line-mode reflow text.
* lisp/net/shr.el (shr-fill-lines): Document that the function
handles more than just filling; move the 'shr-fill-text' check...
(shr-fill-line): ... here, after indentation has been taken care
of.
* test/lisp/net/shr-resources/blockquote.html:
* test/lisp/net/shr-resources/blockquote.txt: New test resources.
* test/lisp/net/shr-tests.el (shr-test--rendering-check): Rename
from 'shr-test', to make the relationship with the 'rendering'
testcase clearer; prefer 'file-name-concat' to 'format'; raise
ERT failure if need be, calling (ert-fail ...) directly instead
of (should (not (list ...))).
(shr-test--rendering-extra-configs): New variable to easily check
that user customizations do not degrade rendering.
(rendering): Consult that new variable; delegate failure-raising
to reduce duplication.
Dmitry Gutov [Fri, 15 Mar 2024 02:28:45 +0000 (04:28 +0200)]
(project--value-in-dir): Ensure that the global value is still honored
* lisp/progmodes/project.el (project--value-in-dir):
Ensure that the global value of the variable is still honored,
when the variable is not in dir-locals.
Stefan Monnier [Fri, 15 Mar 2024 02:15:41 +0000 (22:15 -0400)]
(set-auto-mode): Streamline to fix bug#67795
The old code tested if the mode function is `fboundp` but in an
inconsistent way and without paying attention to
`major-mode-remap`.
* lisp/files.el (set-auto-mode-0): Return `:keep` rather than nil if
the mode was already set. And emit a warning when the mode function
doesn't exist.
(set-auto-mode): Remove checks that the mode function exists now that
`set-auto-mode-0` does it for us. Adjust to the new return values of
that function, and simplify the code using a big `or` instead of
a sequence of steps each setting&testing `done`.
(hack-local-variables--find-variables): Use `major-mode-remap`
when skipping the "mode:" entries that specify modes we don't have.
Also, when (eq handle-mode t), don't bother building a list of results
only to return a single element in the end.
Juri Linkov [Thu, 14 Mar 2024 18:11:33 +0000 (20:11 +0200)]
* lisp/textmodes/flyspell.el (flyspell-check-changes): New user option.
(flyspell--mode-on): Add flyspell-check-changes to post-command-hook
when flyspell-check-changes is non-nil.
(flyspell--mode-off): Remove flyspell-check-changes from post-command-hook.
(flyspell-check-changes): New function (bug#61874).
Juri Linkov [Thu, 14 Mar 2024 17:37:44 +0000 (19:37 +0200)]
* lisp/progmodes/project.el: Don't run modes from .dir-locals.el.
(project--value-in-dir): Use 'alist-get' on 'file-local-variables-alist'
to avoid calling 'hack-local-variables-apply' via
'hack-dir-local-variables-non-file-buffer' because it might enable
undesirable modes such as flyspell-mode in a temporary buffer (bug#69740).
Liu Hui [Mon, 26 Feb 2024 10:46:36 +0000 (18:46 +0800)]
Detect the readline support for Python shell completion
* lisp/progmodes/python.el
(python-shell-comint-watch-for-first-prompt-output-filter):
Detect the readline support.
(python-shell-readline-completer-delims): Update docstring.
(python-shell-completion-native-setup): Move the readline
detection code to ...
(python-shell-readline-detect): ... new function.
(python-shell-completion-native-turn-on-maybe): Skip if Python
has no readline support.
(python-shell-completion-at-point): Respect the delimiter of
readline completer in non-native completion.
* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1, python-completion-at-point-2)
(python-completion-at-point-pdb-1)
(python-completion-at-point-while-running-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Skip tests if
Python has no readline support.
(python-shell-completion-at-point-jedi-completer): Add test for
non-native Python shell completion. (bug#68559)
Visuwesh [Sat, 9 Mar 2024 09:47:26 +0000 (15:17 +0530)]
Add bounds-of-thing-at-point property for 'number'
* lisp/thingatpt.el (thing-at-point-decimal-regexp)
(thing-at-point-hexadecimal-regexp): Extract regexps from...
(number-at-point): ...here. Use them in 'number-at-point'.
(number): Add 'bounds-of-thing-at-point' property as
`forward-word' does not always return the right boundary,
e.g., in latex-mode buffers. (Bug#69239)
Raffael Stocker [Mon, 4 Mar 2024 18:06:07 +0000 (19:06 +0100)]
Fix resetting keyboard hook state on MS-Windows
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.
Po Lu [Thu, 14 Mar 2024 05:45:48 +0000 (13:45 +0800)]
Improve /proc/self/exe substitution on Android
* exec/configure.ac (USER_SWORD): New macro.
* exec/exec.c (format_pid): Export this function.
* exec/exec.h:
* exec/trace.c (canon_path): New function.
(handle_readlinkat, handle_openat): Test complete file name
against /proc/self/exe, and further check for /proc/pid/exe.
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.
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.
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.
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.
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)
* 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.
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/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.
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
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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)
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)
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)
* 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.
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.
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.
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>.
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.
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.
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/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`.
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.
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.
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.
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`.
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.
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).
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.
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.
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.