]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 months ago* Fix missing `comp-files-queue' update (bug#63415).
Andrea Corallo [Wed, 17 May 2023 13:28:46 +0000 (15:28 +0200)]
* Fix missing `comp-files-queue' update (bug#63415).

* lisp/emacs-lisp/comp.el (native--compile-async): Update
`comp-files-queue' for real.

(cherry picked from commit 51848e4731f3e32e5d152990bf570b08ca544a92)

13 months ago'vtable-update-object' can now be called with one argument
Adam Porter [Sat, 9 Mar 2024 05:43:14 +0000 (23:43 -0600)]
'vtable-update-object' can now be called with one argument

It's often necessary to update the representation of a single
object in a table (e.g a struct, whose identity does not change
when its slots'
values are changed).  To do so, now the function may be called
like this:

  (vtable-update-object table object)

Instead of like this:

  (vtable-update-object table object object)

This also documents the behavior of the just-discovered limitation filed
as bug#69837.
* lisp/emacs-lisp/vtable.el (vtable-update-object): Make 'old-object'
argument optional.  (Bug#69666)

* doc/misc/vtable.texi (Interface Functions): Update documentation.

* etc/NEWS: Add news entry.

(cherry picked from commit 393f58c85aeb78f814866ccaad9ae7efd3fa6766)

13 months agoClarify description of format-spec truncation
Basil L. Contovounesios [Sun, 17 Mar 2024 12:04:32 +0000 (13:04 +0100)]
Clarify description of format-spec truncation

* doc/lispref/strings.texi (Custom Format Strings): Mention that
precision specifier affects both '<' and '>' truncation (bug#69822).
* lisp/format-spec.el (format-spec, format-spec--do-flags): Use same
terminology as 'format', especially when referring to its behavior.

(cherry picked from commit 689f04a2ddfae856153bed762cc1461d66ec88de)

13 months agoMore accurate documentation of 'rmail-mail-new-frame'
Eli Zaretskii [Thu, 21 Mar 2024 08:55:59 +0000 (10:55 +0200)]
More accurate documentation of 'rmail-mail-new-frame'

* doc/emacs/rmail.texi (Rmail Reply): More accurate documentation
of the effects of 'rmail-mail-new-frame'.  (Bug#69738)

(cherry picked from commit 759dedfab07a1c4db49c1291c9dde2aee648919d)

13 months agoSpeed up display of RTL text with many character compositions
Eli Zaretskii [Thu, 21 Mar 2024 08:25:56 +0000 (10:25 +0200)]
Speed up display of RTL text with many character compositions

* src/bidi.c (bidi_level_start): New function.
* src/dispextern.h (bidi_level_start): Add prototype.
* src/xdisp.c (compute_stop_pos, set_iterator_to_next)
(get_visually_first_element, next_element_from_buffer): Call
'bidi_level_start' when looking for composed characters backwards,
to set limit of searching back, instead of looking all the way to
BOB.  (Bug#69385)

(cherry picked from commit fe24a8c3c091c1e051fe6a8c1ec4fd30ca052ca7)

13 months ago; * lisp/calendar/calendar.el: Remove extra space.
Juri Linkov [Thu, 21 Mar 2024 07:49:34 +0000 (09:49 +0200)]
; * lisp/calendar/calendar.el: Remove extra space.

(cherry picked from commit fa79de7c6b8883de4433572b2f6dc5b941f6ac66)

13 months agoAvoid recomputing the whole table in 'vtable--recompute-numerical'
Adam Porter [Thu, 21 Mar 2024 07:13:28 +0000 (02:13 -0500)]
Avoid recomputing the whole table in 'vtable--recompute-numerical'

Each element of LINE being tested is a list, the first element of
which is the value actually being represented in the table.
Previously, the 'numberp' test would always fail, because it was
being compared with the list rather than the intended value in it;
that could cause the whole table to be recomputed, sometimes
unnecessarily.
* lisp/emacs-lisp/vtable.el (vtable--recompute-numerical): Test the
car of ELEM, not ELEM itself, which is a list.  (Bug#69927)

(cherry picked from commit b3f04eb68499f285e05b5b74e9cbd67f3140fb3c)

13 months agoAndroid compatibility fixes
Po Lu [Thu, 21 Mar 2024 06:23:40 +0000 (14:23 +0800)]
Android compatibility fixes

* doc/emacs/android.texi (Android Windowing): Document
restrictions on number of windows under Android 4.4 and earlier.

* java/AndroidManifest.xml.in <EmacsActivity>
<EmacsOpenActivity, EmacsMultitaskActivity>: Assign each class
of activity a unique task affinity.

* java/org/gnu/emacs/EmacsDesktopNotification.java (display1):
Remove redundant priority assignment.

* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): Handle
file URIs when processing attachments from a mailto URI, and
check for KitKat before opening content ones.

* java/org/gnu/emacs/EmacsWindow.java <pointerMap>
(figureChange): Replace coordinate HashMap with a SparseArray.

* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow): Don't specify FLAG_ACTIVITY_NEW_DOCUMENT on
systems where it is absent.

(cherry picked from commit ad0492c5a97aaad7f784f7834772400d9af96b69)

13 months ago; * lisp/emacs-lisp/comp-run.el (comp-run-async-workers): Fix indentation.
Andrea Corallo [Wed, 20 Mar 2024 15:59:33 +0000 (16:59 +0100)]
; * lisp/emacs-lisp/comp-run.el (comp-run-async-workers): Fix indentation.

(cherry picked from commit 0df28dc00edd0db343619d02aa41999a7bfce5fb)

13 months ago; Minor copyedits of last change.
Eli Zaretskii [Wed, 20 Mar 2024 14:08:15 +0000 (16:08 +0200)]
; Minor copyedits of last change.

(cherry picked from commit ae9d8eedfdd6030a082010ac933b4aa4ddc05749)

13 months ago; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.
Andrea Corallo [Wed, 20 Mar 2024 13:49:28 +0000 (14:49 +0100)]
; * lisp/emacs-lisp/comp.el: Add a simple sanitizer usage example.

(cherry picked from commit e2fec514fd22e61c2a4e9343056aa744e93203a1)

13 months agoFix documentation of M-SPC in user manual
Eli Zaretskii [Wed, 20 Mar 2024 12:45:24 +0000 (14:45 +0200)]
Fix documentation of M-SPC in user manual

* doc/emacs/killing.texi (Deletion): Fix documentation of
'cycle-spacing'.  (Bug#69905)

(cherry picked from commit 7f6e335f4b4dba9378345625274fa477e0d38c5d)

13 months ago; Fix doc strings of recent changes
Eli Zaretskii [Wed, 20 Mar 2024 12:27:25 +0000 (14:27 +0200)]
; Fix doc strings of recent changes

* src/comp.c (syms_of_comp) <comp-sanitizer-active>:
* lisp/emacs-lisp/comp.el (comp-sanitizer-emit): Doc fixes.

(cherry picked from commit 1475e3c3b562f7604e538fccbb41f1d66b10663d)

13 months ago; * lisp/emacs-lisp/comp-cstr.el (comp--normalize-typeset0): Fix comment.
Andrea Corallo [Wed, 20 Mar 2024 10:49:32 +0000 (11:49 +0100)]
; * lisp/emacs-lisp/comp-cstr.el (comp--normalize-typeset0): Fix comment.

(cherry picked from commit e8d2bc75314262d512d367c270c6d43201ef533f)

13 months agoAdd native compiler sanitizer
Andrea Corallo [Wed, 21 Feb 2024 21:31:45 +0000 (22:31 +0100)]
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'.

(cherry picked from commit 0b0c7da8c80a1e4dc328459f3403f358736ae90d)

13 months ago; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray diff marker.
Robert Pluim [Wed, 20 Mar 2024 08:33:37 +0000 (09:33 +0100)]
; * lisp/emacs-lisp/cl-macs.el (cl-labels): Fix stray diff marker.

(cherry picked from commit 5bdc2436c649ccc897a548a8e553244f58168216)

13 months agoRespect file display names during Android drag-and-drop
Po Lu [Wed, 20 Mar 2024 02:23:42 +0000 (10:23 +0800)]
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.

(cherry picked from commit e72f17e4622fae45c9814f6ed196e5a9ed06cdd2)

13 months agoFix vc-git test when no identities are configured
Kévin Le Gouguec [Mon, 18 Mar 2024 18:47:59 +0000 (19:47 +0100)]
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.

(cherry picked from commit 014cd0040275bb2a4d08d392825b4814452275db)

13 months agoUnbreak the Cygw32 build broken by resent WTS_SESSION changes
Eli Zaretskii [Tue, 19 Mar 2024 12:45:45 +0000 (14:45 +0200)]
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)

(cherry picked from commit 88355de6022458c3e890cc6d5da60d6f35fe8868)

13 months ago* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test.
Andrea Corallo [Tue, 19 Mar 2024 09:48:18 +0000 (10:48 +0100)]
* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-93): Add test.

(cherry picked from commit f7f619779c93bb567a1658ef06199fc1816f88fb)

13 months ago* Use 'cl-type-of' in comp-cstr.el
Andrea Corallo [Tue, 19 Mar 2024 09:41:52 +0000 (10:41 +0100)]
* 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'.

(cherry picked from commit 0f76baeac074a3d8f15b29b34b873b44d551979b)

13 months agoUpdate android.texi
Po Lu [Tue, 19 Mar 2024 04:17:43 +0000 (12:17 +0800)]
Update android.texi

* doc/emacs/android.texi (Android Startup): Describe
/content/by-authority-named.

(cherry picked from commit a7cb220523d881449a2dba683e7358b3312fd482)

13 months agoRespect display names of Android content URIs
Po Lu [Tue, 19 Mar 2024 04:08:17 +0000 (12:08 +0800)]
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.

(cherry picked from commit f2e239c6a7d54ec3849a3bb783685953b6683752)

13 months ago* admin/notes/bugtracker: Minor copyedit.
Michael Albinus [Sun, 17 Mar 2024 12:25:35 +0000 (13:25 +0100)]
* admin/notes/bugtracker: Minor copyedit.

(cherry picked from commit 8014dbb2ad8c1163bedfda8c94f66d2bfa5b69ab)

13 months ago; * admin/notes/bugtracker: Minor copyedit.
Eli Zaretskii [Sun, 17 Mar 2024 08:47:41 +0000 (10:47 +0200)]
; * admin/notes/bugtracker: Minor copyedit.

(cherry picked from commit 06a991e7e87c9954f590d30e87d8710ff60ce7b8)

13 months agoTweak regexp for object initializers in csharp-mode (bug#69571)
Theodor Thornhill [Sat, 16 Mar 2024 19:28:10 +0000 (20:28 +0100)]
Tweak regexp for object initializers in csharp-mode (bug#69571)

* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Add
handling to not consider ended statements as object init openers.
* test/lisp/progmodes/csharp-mode-resources/indent.erts: New test
resources.
* test/lisp/progmodes/csharp-mode-tests.el: Add test for this particular
issue.

(cherry picked from commit c890622e1a9ae6f2ab5d083ca8b668c9228c52fa)

13 months ago`term-mode': mention the keymap to add keybindings to
Konstantin Kharlamov [Sat, 16 Mar 2024 10:24:34 +0000 (13:24 +0300)]
`term-mode': mention the keymap to add keybindings to

A user typically expects a keymap for mode `foo' to be called
`foo-mode-map'.  term-mode has `term-mode-map' too, but for
user-defined bindings to have effect they have to be put to
`term-raw-map' instead.  So let's mention that.
* lisp/term.el (term-mode) (term-mode-map) (term-raw-map): Mention
the keymaps to add keybindings to for `term-mode'.  (Bug#69786)

(cherry picked from commit f48babb1120343f211367a1b5854dc7740c3091d)

13 months ago; Skip commit 8cf05d9be12e8b5f8893cfd8a67c92e904a2aa05
Eshel Yaron [Sun, 24 Mar 2024 14:11:53 +0000 (15:11 +0100)]
; Skip commit 8cf05d9be12e8b5f8893cfd8a67c92e904a2aa05

13 months agoImprove documentation of 'edebug-print-*' variables
Eli Zaretskii [Sat, 16 Mar 2024 10:42:16 +0000 (12:42 +0200)]
Improve documentation of 'edebug-print-*' variables

* lisp/emacs-lisp/edebug.el (edebug-print-length)
(edebug-print-level): Fix doc strings and customization labels.
Suggested by Matt Trzcinski <matt@excalamus.com>.  (Bug#69745)

(cherry picked from commit d5901f3f05e0aec9bf4b6b4b6ebf27c66c7cee14)

13 months agoCease removing consecutive duplicate completion candidates
Eshel Yaron [Tue, 19 Mar 2024 12:44:05 +0000 (13:44 +0100)]
Cease removing consecutive duplicate completion candidates

13 months agoAdd current scroll position to *Completions* header line format
Eshel Yaron [Tue, 19 Mar 2024 12:42:24 +0000 (13:42 +0100)]
Add current scroll position to *Completions* header line format

13 months ago; * lisp/vc/vc-git.el (vc-git--out-str): Doc fix.
Eli Zaretskii [Mon, 18 Mar 2024 13:59:54 +0000 (15:59 +0200)]
; * lisp/vc/vc-git.el (vc-git--out-str): Doc fix.

(cherry picked from commit ce29ae32d0b05cedbc9ba65c1a347ab7c34420ad)

13 months ago* lisp/emacs-lisp/cl-preloaded.el (user-ptr): Add predicate
Stefan Monnier [Mon, 18 Mar 2024 13:38:23 +0000 (09:38 -0400)]
* lisp/emacs-lisp/cl-preloaded.el (user-ptr): Add predicate

(cherry picked from commit 70ac815ece299007ff468c09632ef4d488e69be3)

13 months agoFollowup changes to `cl-type-of`
Stefan Monnier [Thu, 14 Mar 2024 16:49:08 +0000 (12:49 -0400)]
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.

(cherry picked from commit 63e67916b01569da5bb24f6d9a354dc72897c468)

13 months ago(primitive-function): New type
Stefan Monnier [Sun, 17 Mar 2024 21:29:02 +0000 (17:29 -0400)]
(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.

(cherry picked from commit e624bc62752ceb2e60940c5fd9cb6e70611df71c)

13 months ago(cl-type-of): New function to return more precise types (bug#69739)
Stefan Monnier [Tue, 12 Mar 2024 13:26:24 +0000 (09:26 -0400)]
(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.

(cherry picked from commit 706403f2aa3a306369a0150022da0cba1802ca2b)

13 months agoMakeshift solution for X server bug
Po Lu [Mon, 18 Mar 2024 01:14:18 +0000 (09:14 +0800)]
Makeshift solution for X server bug

* src/xterm.c (x_sync_init_fences): Detect errors around
XSyncCreateFence.  (bug#69762)

(cherry picked from commit 1a8b34a503e5af32851c1aac27a3f09e2345673b)

13 months ago; Re-apply accidentally reverted commit
Kévin Le Gouguec [Mon, 12 Feb 2024 07:29:19 +0000 (08:29 +0100)]
; Re-apply accidentally reverted commit

This re-applies:

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

reverted as part of the unrelated:

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

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.

(cherry picked from commit 8d4a8b7dfd0905defac172cc58c2252dc1b39ad7)

13 months ago* lisp/tab-bar.el (tab-bar-select-restore-windows): New defcustom.
Juri Linkov [Sun, 17 Mar 2024 17:57:05 +0000 (19:57 +0200)]
* 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).

(cherry picked from commit c29b6df2273347946d5b8c88b5dee39d8d6fd202)

13 months agoUpdate source repository of the Modus themes
Protesilaos Stavrou [Sun, 17 Mar 2024 16:49:21 +0000 (18:49 +0200)]
Update source repository of the Modus themes

* admin/MAINTAINERS: Update URL and remove outdated references.

(cherry picked from commit 562d9c9db56172c754a2556a996245145ae223f5)

13 months agoUpdate modus-themes to their 4.4.0 version
Protesilaos Stavrou [Sun, 17 Mar 2024 16:46:15 +0000 (18:46 +0200)]
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/>.

(cherry picked from commit 67b0c1c09eab65c302eb02b20d87900be6367565)

13 months agoFix vc-dir when "remote" Git branch is local
Kévin Le Gouguec [Mon, 12 Feb 2024 07:29:19 +0000 (08:29 +0100)]
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.

(cherry picked from commit 21828f288ef57422d12860d71e3d4cd8b8cc97b4)

13 months agoImprove C++ standard library detection on Android
Po Lu [Sun, 17 Mar 2024 11:32:15 +0000 (19:32 +0800)]
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.

(cherry picked from commit 7a0f4de3c18cab43b5bff47fdab4944e006c68e4)

13 months agodebug.el: Prevent re-entering the debugger for the same error
Stefan Monnier [Sun, 17 Mar 2024 03:10:48 +0000 (23:10 -0400)]
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.

(cherry picked from commit 445e2499baa1b8ef21e8edcc13692b5d78912922)

13 months ago; Pacify -Wmaybe-uninitialized in coding.c.
Basil L. Contovounesios [Sat, 16 Mar 2024 13:15:25 +0000 (14:15 +0100)]
; Pacify -Wmaybe-uninitialized in coding.c.

Warning seen with GCC 13 -Og.

(cherry picked from commit ad3a3ad6e616a53ec5ae28aed02e8d3461a5ce5c)

13 months ago; Document more DND functions with limited support
Eli Zaretskii [Sat, 16 Mar 2024 10:58:33 +0000 (12:58 +0200)]
; 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)

(cherry picked from commit 685f4295f9810b4aab8ec3ba7146b17904a1c37f)

13 months ago; Fix recent changes in documentation
Eli Zaretskii [Sat, 16 Mar 2024 09:58:56 +0000 (11:58 +0200)]
; Fix recent changes in documentation

* doc/lispref/markers.texi (Information from Markers):
* etc/NEWS: Improve description of 'marker-last-position'.

(cherry picked from commit d855f1c3f9c488f48694fe63bbc49d66d775c16c)

13 months agoDocument and announce 'marker-last-position'
Martin Rudalics [Sat, 16 Mar 2024 09:46:02 +0000 (10:46 +0100)]
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.

(cherry picked from commit c12852bbf61ebb9ae124033deb427b15ce1a2ffb)

13 months agoIn window-related documentation write 'symbol' instead of 'constant'
Martin Rudalics [Sat, 16 Mar 2024 09:10:29 +0000 (10:10 +0100)]
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'.

(cherry picked from commit 899ea79310d1b8ed78c3fd8ac1784043dd732dbf)

13 months ago; * src/xterm.c (syms_of_xterm): Fix typo.
Po Lu [Sat, 16 Mar 2024 07:18:07 +0000 (15:18 +0800)]
; * src/xterm.c (syms_of_xterm): Fix typo.

(cherry picked from commit deebf74b0e178f841c8f504b002b139d13889344)

13 months agoRespond to default action from Gnus notifications
Po Lu [Sat, 16 Mar 2024 07:15:10 +0000 (15:15 +0800)]
Respond to default action from Gnus notifications

* lisp/gnus/gnus-notifications.el (gnus-notifications-action):
Consider default equivalent to read.

(cherry picked from commit 28e481bf7af873cdaf016e25855a8e0ebc424fe7)

13 months agoSupport x-*-keysym on Android
Po Lu [Sat, 16 Mar 2024 07:13:09 +0000 (15:13 +0800)]
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.

(cherry picked from commit 658529921614b8d5498c267a7ffc786c25d2d26f)

13 months agoCorrect doc strings for x-*-keysym
Po Lu [Sat, 16 Mar 2024 07:12:33 +0000 (15:12 +0800)]
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.

(cherry picked from commit 4d03f70b7f01477a8d72f827ba8b0dabba8c0a61)

13 months ago* doc/lispref/frames.texi (Window System Selections): Fix misuse of xref.
Po Lu [Sat, 16 Mar 2024 01:55:23 +0000 (09:55 +0800)]
* doc/lispref/frames.texi (Window System Selections): Fix misuse of xref.

(cherry picked from commit c77e35efd36f2c43e87066faa4257606d5c6f849)

13 months ago; Circumvent miscompilations on Sun C 5.12 (148917-07)
Po Lu [Sat, 16 Mar 2024 01:50:58 +0000 (09:50 +0800)]
; 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.

(cherry picked from commit 6461854f47d0b768e0550b46317045811a8cbe80)

13 months agoFix calc.texi for Texinfo 4.13
Po Lu [Sat, 16 Mar 2024 01:29:42 +0000 (09:29 +0800)]
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.

(cherry picked from commit bbbf1e6f2d5c93e51e62c33529d3098b1ee46616)

13 months ago; * src/eval.c (Fhandler_bind_1): Fix docstring.
Basil L. Contovounesios [Fri, 15 Mar 2024 23:23:41 +0000 (00:23 +0100)]
; * src/eval.c (Fhandler_bind_1): Fix docstring.

(cherry picked from commit 983d17309911b84199e43a83d841cf7caff47316)

13 months ago; Fix 'usage:' keyword in Ffile_name_concat doc.
Basil L. Contovounesios [Fri, 15 Mar 2024 23:19:43 +0000 (00:19 +0100)]
; Fix 'usage:' keyword in Ffile_name_concat doc.

(cherry picked from commit 3b791ebbe173fa18515558acaafbef1f88c51791)

13 months ago* lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)
Stefan Monnier [Fri, 15 Mar 2024 16:45:09 +0000 (12:45 -0400)]
* lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749)

(cherry picked from commit 7231a89524f280c51278c3c74c6ae2215a307f0f)

13 months ago* Don't install unnecessary trampolines (bug#69573)
Andrea Corallo [Fri, 15 Mar 2024 13:18:51 +0000 (14:18 +0100)]
* 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.

(cherry picked from commit 005536285585bcdf5a67a01cdfd8e1242742f953)

13 months ago* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Don't declare.
Andrea Corallo [Fri, 15 Mar 2024 11:32:06 +0000 (12:32 +0100)]
* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Don't declare.

(cherry picked from commit c393c0467972cba9dc7ed256acd72b553204c33a)

13 months ago; Fix documentation of a recent change (bug#68235)
Eli Zaretskii [Fri, 15 Mar 2024 12:22:14 +0000 (14:22 +0200)]
; 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'.

(cherry picked from commit bf3d296d24ea24fb707a9410fccd745523347d2a)

13 months ago; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.
Eli Zaretskii [Fri, 15 Mar 2024 11:29:31 +0000 (13:29 +0200)]
; * CONTRIBUTE: Ask not to use non-ASCII unless necessary.

(cherry picked from commit ed48b0d657cbf183a3e391a95672f921688e6ba8)

13 months agoFix bug with CHECK_STRUCTS introduced by last buffer.h change
Martin Rudalics [Fri, 15 Mar 2024 10:53:31 +0000 (11:53 +0100)]
Fix bug with CHECK_STRUCTS introduced by last buffer.h change

* src/pdumper.c (dump_buffer): Fix HASH_buffer_.  Assign
last_name_ field.

(cherry picked from commit 3858e4f22946dc49d2d3dde5f45a65eab83fd7aa)

13 months agoFurther adjustments for restoring killed buffer windows (Bug#68235)
Martin Rudalics [Fri, 15 Mar 2024 09:35:27 +0000 (10:35 +0100)]
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'.

(cherry picked from commit 5bba1b95b8088048808b306bf8b00eb9b342ce92)

13 months ago; * src/lread.c (maybe_swap_for_eln): Clarify warning message.
Eli Zaretskii [Thu, 14 Mar 2024 19:08:36 +0000 (21:08 +0200)]
; * src/lread.c (maybe_swap_for_eln): Clarify warning message.

(cherry picked from commit b708e639d63f488a98c7416866665c16730b9e8f)

13 months ago; Fix bibtex-biblatex-field-alist docstring typo.
Basil L. Contovounesios [Tue, 12 Mar 2024 21:47:45 +0000 (22:47 +0100)]
; Fix bibtex-biblatex-field-alist docstring typo.

(cherry picked from commit db027a06976ee1bcbe6294e281bd5954dd1052ef)

13 months ago; * doc/lispref/control.texi (Conditionals): Add missing paren (bug#69742).
Arash Esbati [Tue, 12 Mar 2024 11:53:32 +0000 (12:53 +0100)]
; * doc/lispref/control.texi (Conditionals): Add missing paren (bug#69742).

(cherry picked from commit a9be5c7ea92e7868873d6d3c721d5a0be62ee3ad)

13 months agoFix 'with-sqlite-transaction'
F. Jason Park [Mon, 11 Mar 2024 03:13:42 +0000 (20:13 -0700)]
Fix 'with-sqlite-transaction'

* lisp/sqlite.el (with-sqlite-transaction): Tuck misplaced body
of else form back into feature-test control structure whence it
escaped.  (Bug#67142)

* test/lisp/sqlite-tests.el: New file to accompany
test/src/sqlite-tests.el.

(cherry picked from commit db5915f30ba063b72b007d243fbd832e8a4e8961)

13 months ago; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).
Eli Zaretskii [Sat, 9 Mar 2024 09:40:27 +0000 (11:40 +0200)]
; * doc/emacs/files.texi (Image Mode): Fix typo (bug#69671).

(cherry picked from commit fe491173e8f839653cb22eea63a7261f4aa1dca9)

13 months agoNew completions sort order 'minibuffer-sort-by-length'
Eshel Yaron [Mon, 18 Mar 2024 15:38:18 +0000 (16:38 +0100)]
New completions sort order 'minibuffer-sort-by-length'

13 months agoSimplify 'completion-all-sorted-completions'
Eshel Yaron [Mon, 18 Mar 2024 15:37:46 +0000 (16:37 +0100)]
Simplify 'completion-all-sorted-completions'

13 months agoNew command 'minibuffer-narrow-completions-by-regexp'
Eshel Yaron [Mon, 18 Mar 2024 08:08:37 +0000 (09:08 +0100)]
New command 'minibuffer-narrow-completions-by-regexp'

13 months agoNew command 'minibuffer-toggle-completions-annotations'
Eshel Yaron [Mon, 18 Mar 2024 08:08:11 +0000 (09:08 +0100)]
New command 'minibuffer-toggle-completions-annotations'

13 months agoImprove default *Completions* header line format
Eshel Yaron [Mon, 18 Mar 2024 08:06:50 +0000 (09:06 +0100)]
Improve default *Completions* header line format

13 months ago; Fix documentation of 'flyspell-check-changes'
Eli Zaretskii [Fri, 15 Mar 2024 08:44:23 +0000 (10:44 +0200)]
; 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'.

(cherry picked from commit 1c4233b9a391ba5d5746acf6b6fd4b352b8c3a58)

13 months ago; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix.
Eli Zaretskii [Fri, 15 Mar 2024 08:29:06 +0000 (10:29 +0200)]
; * src/xwidget.c (xwidget-webkit-disable-javascript): Doc fix.

(cherry picked from commit ebd32040e06bf57761f59638b600cfdeb408cbc5)

13 months ago* lisp/vc/diff-mode.el (diff-mode-menu): Add menu item "Apply all hunks".
Juri Linkov [Fri, 15 Mar 2024 07:45:48 +0000 (09:45 +0200)]
* 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'.

(cherry picked from commit ffbf876a93c7b34c84806e43659efbac519279fa)

13 months ago; Skip commit 9dcb28d6014f72e5f52ad46d6141e9be4e11bfa5
Eshel Yaron [Fri, 15 Mar 2024 09:07:08 +0000 (10:07 +0100)]
; Skip commit 9dcb28d6014f72e5f52ad46d6141e9be4e11bfa5

13 months agoKeep indenting text when 'shr-fill-text' is nil (bug#69555)
Kévin Le Gouguec [Sun, 3 Mar 2024 16:20:56 +0000 (17:20 +0100)]
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.

(cherry picked from commit 09ab66935154ea0cc4a351b8320bc0e9276b7780)

13 months ago; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string.
Po Lu [Fri, 15 Mar 2024 03:50:27 +0000 (11:50 +0800)]
; * src/androidselect.c (Fandroid_notifications_notify): Typo in doc string.

(cherry picked from commit 1be33963f068b884d1f8cbd37372638c47a79e84)

13 months ago* src/sfntfont-android.c (init_sfntfont_android): Fix SDK check.
Po Lu [Fri, 15 Mar 2024 03:50:09 +0000 (11:50 +0800)]
* src/sfntfont-android.c (init_sfntfont_android): Fix SDK check.

(cherry picked from commit c453c82dc6af2178ce10ffddccd9f38543ea6e88)

13 months ago(project--value-in-dir): Ensure that the global value is still honored
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.

(cherry picked from commit 77a86d738eebc7a80b7d4a6357a5fa675df9de8c)

13 months agofix: project submodule detection does not work for worktrees
Patrick Bader [Mon, 4 Mar 2024 15:14:25 +0000 (16:14 +0100)]
fix: project submodule detection does not work for worktrees

(cherry picked from commit 5037b9eed711dec0ef73dd6fca1e60e0b521c13b)

13 months ago(set-auto-mode): Streamline to fix bug#67795
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.

(cherry picked from commit 9422a6737447b186ca017929da79985cef7898a8)

13 months ago; Skip commit c8c0d0a9550620adb111bf5d9e0155332498a6bf
Eshel Yaron [Fri, 15 Mar 2024 09:05:30 +0000 (10:05 +0100)]
; Skip commit c8c0d0a9550620adb111bf5d9e0155332498a6bf

13 months agoFix last change
Po Lu [Fri, 15 Mar 2024 00:36:21 +0000 (08:36 +0800)]
Fix last change

* src/xwidget.c (Fmake_xwidget): Cast boolean value to gboolean.
(syms_of_xwidget): Fix coding style and improve doc string.

(cherry picked from commit 9a2c7d865ff8df960793e19c3f854db66b40e0fb)

13 months ago* lisp/textmodes/flyspell.el (flyspell-check-changes): New user option.
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).

(cherry picked from commit f03f14165ed51148b72b431ac99c4a4829bb1a7f)

13 months ago* lisp/progmodes/project.el: Don't run modes from .dir-locals.el.
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).

(cherry picked from commit bd6b64e0a8856a735b484f0482af0e937eb585d3)

13 months agoContext menu for project (bug#69566)
Juri Linkov [Thu, 14 Mar 2024 17:29:16 +0000 (19:29 +0200)]
Context menu for project (bug#69566)

* lisp/menu-bar.el (menu-bar-project-item): New variable from
'project-menu-entry'.
(menu-bar-tools-menu): Use 'menu-bar-project-item'.

* lisp/mouse.el (context-menu-functions): Add
'context-menu-project' to choice.
(context-menu-project): New function.

* lisp/progmodes/project.el (project-menu-entry): Remove variable.
(project-mode-line-map): Use 'menu-bar-project-item' instead of
'project-menu-entry'.

(cherry picked from commit f3deaa117acfc975be3edbe8461b18fc29b4adf0)

13 months agoAdd language server for Move to eglot
Pankaj Jangid [Thu, 14 Mar 2024 11:41:43 +0000 (17:11 +0530)]
Add language server for Move to eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Added
'move-analyzer' language server.  (Bug#69796)

(cherry picked from commit eae2c73edb3f09a06a31a38edd28e9751626e761)

13 months agoDetect the readline support for Python shell completion
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)

(cherry picked from commit a7057745f5ef903a2655c6d9e7813168e361baf7)

13 months agoHandle the case where 'vtable-update-object' doesn't find old object
Adam Porter [Tue, 12 Mar 2024 21:01:57 +0000 (16:01 -0500)]
Handle the case where 'vtable-update-object' doesn't find old object

* lisp/emacs-lisp/vtable.el (vtable-update-object): If OLD-OBJECT
is not found, don't call ELT, since SEQ-POSITION may return nil.
(Bug#69664)

(cherry picked from commit c94d680f6eb46a47549633c7076fe32660b3cd42)

13 months ago; Simplify (with-current-buffer (get-buffer ...) ...)
Tim Landscheidt [Tue, 12 Mar 2024 00:21:06 +0000 (00:21 +0000)]
; Simplify (with-current-buffer (get-buffer ...) ...)

There's no need to call 'get-buffer', since 'with-current-buffer'
does that internally.
* lisp/calendar/todo-mode.el (todo-merge-category):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-error):
* lisp/emacs-lisp/debug.el (debug, debugger-record-expression):
* lisp/emacs-lisp/eieio-opt.el (eieio-browse):
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/eshell/em-unix.el (eshell-poor-mans-grep):
* lisp/gnus/gnus-group.el (gnus-add-mark):
* lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark):
* lisp/net/sieve.el (sieve-upload):
* lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers):
* lisp/obsolete/quickurl.el (quickurl-list-populate-buffer):
* lisp/org/ob-calc.el: (org-babel-execute:calc):
* lisp/org/org-agenda.el (org-agenda-use-sticky-p):
* lisp/pcomplete.el (pcomplete-show-completions):
* lisp/progmodes/bug-reference.el
(bug-reference--try-setup-gnus-article):
* lisp/progmodes/idlw-help.el
(idlwave-highlight-linked-completions):
* lisp/progmodes/verilog-mode.el (verilog-preprocess):
* lisp/replace.el (occur-1):
* lisp/term.el (term-dynamic-list-completions):
* lisp/time.el (world-clock-update):
* lisp/url/url-cache.el (url-store-in-cache):
* lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news):
* lisp/vc/vc-rcs.el (vc-rcs-system-release):
* lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news):
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export):
* test/lisp/erc/erc-dcc-tests.el
(pcomplete/erc-mode/DCC--get-1flag)
(pcomplete/erc-mode/DCC--get-2flags)
(pcomplete/erc-mode/DCC--get-2flags-reverse):
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--existing--noreuse):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-tests.el (erc--refresh-prompt):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).

(cherry picked from commit 6d1c1fca0aa7c5a1ff0254af3f89a34d5309ea0d)

13 months agobug#69685: Add language server for Fennel to eglot
Phil Hagelberg [Sat, 9 Mar 2024 23:36:11 +0000 (15:36 -0800)]
bug#69685: Add language server for Fennel to eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Add
fennel-ls language server.

Copyright-paperwork-exempt: yes
(cherry picked from commit 3807f380b3334205bfcbba88003ff96507c86fc4)

13 months agoffap.el: Exclude angle brackets from file names in XML
StrawberryTea [Sat, 9 Mar 2024 21:37:44 +0000 (15:37 -0600)]
ffap.el: Exclude angle brackets from file names in XML

* lisp/ffap.el (ffap-string-at-point-mode-alist): Add elements for
XML, to better recognize file names in XML buffers.

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

13 months agoAdd bounds-of-thing-at-point property for 'number'
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)

(cherry picked from commit cb9ee24ea69be4a70f68cb2d564b23a55cb84216)

13 months ago; Fix last change (bug#68604)
Eli Zaretskii [Thu, 14 Mar 2024 09:32:00 +0000 (11:32 +0200)]
; Fix last change (bug#68604)

* lisp/xwidget.el (xwidget-webkit-disable-javascript): Move from
here...
* lisp/cus-start.el (standard): ...to here.

* src/xwidget.c (syms_of_xwidget)
<xwidget-webkit-disable-javascript>: Doc fix.

* doc/emacs/misc.texi (Embedded WebKit Widgets): Fix wording.

(cherry picked from commit a60804ab954e0de73a80a217f677142176678465)

13 months agoAdd user option to disable JavaScript in xwidget webview
Noé Lopez [Fri, 19 Jan 2024 22:40:53 +0000 (23:40 +0100)]
Add user option to disable JavaScript in xwidget webview

* src/xwidget.c: Add the 'xwidget-webkit-disable-javascript'
variable to disable JavaScript in WebKit sessions.  (Bug#68604)

* etc/NEWS:
* doc/emacs/misc.texi (Embedded Webkit Widgets): Document
the change.

(cherry picked from commit f6a27bc32d19727dfcbee65fb9894b53aec46c65)

13 months ago* lisp/emacs-lisp/vtable.el (vtable-update-object): Fix.
Adam Porter [Sat, 9 Mar 2024 04:28:52 +0000 (22:28 -0600)]
* lisp/emacs-lisp/vtable.el (vtable-update-object): Fix.

The order of the arguments to 'seq-position' was wrong, and it did not
compare the correct values.  (Bug#69664)

(cherry picked from commit 013114664ef4923872ffad26a97f4d314c9a84bf)