]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 months agoAddress a common pitfall in tree-sitter's manual section (bug#71048)
Yuan Fu [Wed, 22 May 2024 05:40:32 +0000 (22:40 -0700)]
Address a common pitfall in tree-sitter's manual section (bug#71048)

* doc/lispref/parsing.texi (Multiple Languages): Add example for
treesit-language-at-point-function.

(cherry picked from commit e947e63b066680bbc7e027f73c9e68e26a47d0dd)

11 months agoetags-regen-program: Use more robust default value
Dmitry Gutov [Tue, 21 May 2024 23:51:51 +0000 (02:51 +0300)]
etags-regen-program: Use more robust default value

* lisp/progmodes/etags-regen.el (etags-regen-program):
Default to the value of the variable etags-program-name.

(cherry picked from commit 63d914e377f7cc37056de2503bfbeea831875037)

11 months agoUse read-from-minibuffer instead of read-string for dired-do-touch
Juri Linkov [Tue, 21 May 2024 17:22:31 +0000 (20:22 +0300)]
Use read-from-minibuffer instead of read-string for dired-do-touch

* lisp/dired-aux.el (dired-mark-read-string): Use read-from-minibuffer
instead of read-string when op-symbol is 'touch', since it's more clear
when read-from-minibuffer returns an empty string for RET,
and it was used in dired-mark-read-string initially (bug#70725).

(cherry picked from commit ce8e292bca84f29cea540e3e23e88ec7a5d1674e)

11 months agoFix some Tramp oddities
Michael Albinus [Tue, 21 May 2024 16:13:40 +0000 (18:13 +0200)]
Fix some Tramp oddities

* lisp/net/tramp-container.el: Move connection-local settings
where they belong to.

* lisp/net/tramp-sshfs.el (tramp-connection-properties): Do not
set connection property "direct-async-process".
(tramp-direct-async-process): Set connection-local value.

* test/lisp/net/tramp-tests.el (comp-warn-primitives): Declare.
(tramp-test18-file-attributes): Use it.

(cherry picked from commit 9aeb4872d473695b75a27184b7e90868c15242c9)

11 months ago; Avoid byte-compiler warning in todo-mode.el differently
Stephen Berman [Tue, 21 May 2024 13:04:43 +0000 (15:04 +0200)]
; Avoid byte-compiler warning in todo-mode.el differently

* lisp/calendar/todo-mode.el (todo-mode-map): Define it without a
value before its use in 'todo-insert-item--next-param' to pacify
the byte-compiler.
(todo-insert-item--next-param): Move back to its previous location
to keep it under the outline heading with related code.

(cherry picked from commit c8b34046d93ab28b3e56aa04ce4526b4c76d5581)

11 months ago; Avoid byte-compiler warning in todo-mode.el
Eli Zaretskii [Tue, 21 May 2024 11:17:24 +0000 (14:17 +0300)]
; Avoid byte-compiler warning in todo-mode.el

* lisp/calendar/todo-mode.el (todo-insert-item--next-param): Move
to after the definition of 'todo-mode-map', which this function
uses.  This avoids byte-compiler warning.

(cherry picked from commit 003eddc1dc31a8b3c8ab2c0d7a8d05dcb83487b2)

11 months agoFix todo-mode item insertion bug (bug#70937)
Stephen Berman [Tue, 21 May 2024 09:04:17 +0000 (11:04 +0200)]
Fix todo-mode item insertion bug (bug#70937)

* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
Initially assign each key in todo-mode-map a function identifying
it as invalid for item insertion, thus preventing mistakenly
pressing a key from executing an unwanted different todo-mode
command; the actual item insertion keys are redefined when looping
over the item insertion parameters.

(cherry picked from commit 7f80070232a5c010ae18de9fd8803a66623c074b)

11 months agoUse read-string instead of completing-read for dired-do-touch
Juri Linkov [Tue, 21 May 2024 06:20:01 +0000 (09:20 +0300)]
Use read-string instead of completing-read for dired-do-touch

* lisp/dired-aux.el (dired-mark-read-string): Use read-string
when op-symbol is 'touch' (bug#70725).

(cherry picked from commit d00eb1c90253d2a353d3e9730df37fdd81c2a3d2)

11 months agoFix for 'vc-default-patch-addressee' recently added to .dir-locals.el
Juri Linkov [Tue, 21 May 2024 06:16:18 +0000 (09:16 +0300)]
Fix for 'vc-default-patch-addressee' recently added to .dir-locals.el

* lisp/vc/vc.el: Add autoloaded setting of 'safe-local-variable' property
for 'vc-default-patch-addressee' exactly like it's already done
for 'vc-prepare-patches-separately'.

(cherry picked from commit 1845eede3077d77a7808fd4c0b9d669a3739f1d8)

11 months agoDo not message for repeated enable/disable of tab-line-mode
Jared Finder [Tue, 21 May 2024 02:21:29 +0000 (19:21 -0700)]
Do not message for repeated enable/disable of tab-line-mode

tab-line-mode should not inform the user of an unexpected change
when enabling the mode if already enabled.  For example, when
running (tab-line-mode 1) repeatedly (bug#68765).

* lisp/tab-line.el (tab-line-mode): Modify case when user is informed.

(cherry picked from commit 70e7620843a22128de86e494cfe09d8e8c63f42f)

11 months ago; * lisp/eshell/em-unix.el (eshell-grep): Fix "plain grep" behavior.
Jim Porter [Tue, 21 May 2024 00:38:00 +0000 (17:38 -0700)]
; * lisp/eshell/em-unix.el (eshell-grep): Fix "plain grep" behavior.

(cherry picked from commit eedb959441578f9b4e62b78e1a772328bffe9466)

11 months agoSupport text overlays for thingatpt provider helpers
Jim Porter [Mon, 20 May 2024 19:45:13 +0000 (12:45 -0700)]
Support text overlays for thingatpt provider helpers

* lisp/thingatpt.el (thing-at-point-for-text-property)
(forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): Rename to...
(thing-at-point-for-char-property)
(forward-thing-for-char-property)
(bounds-of-thing-at-point-for-char-property): ... and add overlay
support.  Update callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): Test
overlays too.

* test/lisp/progmodes/bug-reference-tests.el (test-thing-at-point): Test
'bounds-of-thing-at-point' and 'forward-point'.

* etc/NEWS: Update function names in announcement.

(cherry picked from commit 77ece5709a1d38df8cec33432e77044c308b1d6b)

11 months agoImprove implementation of 'forward-thing' using custom providers
Jim Porter [Mon, 20 May 2024 19:37:22 +0000 (12:37 -0700)]
Improve implementation of 'forward-thing' using custom providers

Now, call all the custom providers for each step, using the provider
that moves point the smallest non-zero amount.  This allows multiple
providers for a given "thing" to work nicely together.

* lisp/thingatpt.el (forward-thing-provider-alist): Update docstring.
(forward-thing): New implementation to call each provider N times.
(forward-thing-for-text-property): Take BACKWARD instead of N.  Update
callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers): Add more checks.
(consecutive-things-at-point): New test.

(cherry picked from commit f6c60f16a231802104f53f3953b7fdc363944316)

11 months agoSync m4/byteswap.m4 from Gnulib
Paul Eggert [Mon, 20 May 2024 17:12:56 +0000 (10:12 -0700)]
Sync m4/byteswap.m4 from Gnulib

* m4/byteswap.m4: Copy from Gnulib.  This fixes a configure
glitch on macOS reported by Mattias Engdegård

(cherry picked from commit 642fd607b83c56847914a8a46d6c297a74529610)

11 months agoTramp code cleanup
Michael Albinus [Mon, 20 May 2024 14:22:17 +0000 (16:22 +0200)]
Tramp code cleanup

* lisp/net/tramp-sh.el (tramp-find-shell, tramp-find-inline-compress)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
Use `tramp-warning'.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "kubernetes", "run0" and "nspawn".
(tramp--test-toolbox-p): New defun.
(tramp-test45-asynchronous-requests): Use it.
(tramp--test-check-files): Adapt regexp.

(cherry picked from commit 3c238f7c50427942a200d38738bd92dad98a3928)

11 months agoAdapt last change to Android
Po Lu [Mon, 20 May 2024 13:13:44 +0000 (21:13 +0800)]
Adapt last change to Android

* src/sfntfont.c (sfnt_parse_style): Replace unrepresentable
characters in DESC->adstyle with ` '.

(cherry picked from commit 9db24de481b8785b04600ff4b349a2a0d761d53b)

11 months agoCircumvent bug#70989
Po Lu [Mon, 20 May 2024 12:59:32 +0000 (20:59 +0800)]
Circumvent bug#70989

* src/ftfont.c (get_adstyle_property): Substitute a space for
unrepresentable adstyle characters.  (bug#70989)

(cherry picked from commit 5957e570800d495522fff688b6d68f34ce557e14)

11 months agoFix visiting zip archives inside tar archives
Eli Zaretskii [Mon, 20 May 2024 12:29:39 +0000 (15:29 +0300)]
Fix visiting zip archives inside tar archives

* lisp/tar-mode.el (tar-archive-from-tar): New local variable.
(tar-extract): Set it non-nil for an extracted member that happens
to be arc-mode archive.
* lisp/arc-mode.el (tar-archive-from-tar): Defvar it.
(archive-unique-fname): Make sure FNAME can be created in DIR,
even if FNAME is provided as an absolute file name (this happens
if the archive is a member of a Tar archive, for example).
(archive-extract): Set 'archive-remote' for archives that were
extracted from Tar archives.  (Bug#70987)

(cherry picked from commit 45916eadaed1b7f3a02df62a25bc851a838b6309)

11 months ago; * .dir-locals.el: Set 'vc-default-patch-addressee'
Philip Kaludercic [Tue, 13 Feb 2024 09:52:24 +0000 (10:52 +0100)]
; * .dir-locals.el: Set 'vc-default-patch-addressee'

(cherry picked from commit 18457c64b064e3853511d20a6d1d5d3c0f136733)

11 months agoNew tests for nested archives (bug#70987)
Juri Linkov [Mon, 20 May 2024 06:22:10 +0000 (09:22 +0300)]
New tests for nested archives (bug#70987)

* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz):
* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-tar-and-gz):
New tests.
* test/data/decompress/tzg.tar.gz:
* test/data/decompress/ztg.zip:
New data files to test decompressing of different combinations
of nested tar and zip archives.

(cherry picked from commit 91e02dde5fefbba87dc4736df40cfaeec2c088c1)

11 months agoTell direction in prompts for '(previous|next)-matching-history-element'
Jim Porter [Sat, 11 May 2024 18:41:11 +0000 (11:41 -0700)]
Tell direction in prompts for '(previous|next)-matching-history-element'

Previously, this always said "Previous" for
'previous-matching-history-element' (likewise "Next").  Now, the prompt
accounts for a negative prefix argument changing the search direction
(bug#70882).

* lisp/simple.el (previous-matching-history-element)
(next-matching-history-element): Consult numeric prefix argument to
determine the prompt string.

(cherry picked from commit 44d1687f1f6bc3d261aa2344a714b1f3397b3039)

11 months agoAllow defining custom providers for more "thingatpt" functions
Jim Porter [Mon, 29 Apr 2024 04:19:53 +0000 (21:19 -0700)]
Allow defining custom providers for more "thingatpt" functions

This also fixes an issue in EWW and bug-reference-mode where
(thing-at-point 'url) at the end of a URL would return nil.

See <https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00200.html>.

* lisp/thingatpt.el (forward-thing-provider-alist)
(bounds-of-thing-at-point-provider-alist): New variables...
(forward-thing, bounds-of-thing-at-point): ... use them.
(text-property-search-forward, text-property-search-backward)
(prop-match-beginning, prop-match-end): Declare.
(thing-at-point-for-text-property, forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): New functions.

* lisp/net/eww.el (eww--url-at-point): Use
'thing-at-point-for-text-property'.
(eww--bounds-of-url-at-point, eww--forward-url): New functions...
(eww-mode): ... use them.

* lisp/progmodes/bug-reference.el (bug-reference--url-at-point): Use
'thing-at-point-for-text-property'.
(bug-reference--bounds-of-url-at-point, bug-reference--forward-url): New
functions...
(bug-reference--init): ... use them.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): New
tests.

* etc/NEWS: Announce this change.

(cherry picked from commit ae9045a8bd8d3917feb570adfab0b929b120a8e5)

11 months ago; Stylistic adjustments to sfnt.c
Po Lu [Mon, 20 May 2024 01:10:57 +0000 (09:10 +0800)]
; Stylistic adjustments to sfnt.c

* src/sfnt.c (sfnt_map_table, sfnt_read_table): Adapt to coding
style of another project using this module.

(cherry picked from commit a1b24ebc83e3df67d2e12870b4bea941b21cebda)

11 months agoTweak STORE_NUMBER arg type
Paul Eggert [Sun, 19 May 2024 15:48:52 +0000 (08:48 -0700)]
Tweak STORE_NUMBER arg type

* src/regex-emacs.c (STORE_NUMBER): Make the arg int, not int16_t.
There’s no need for the caller to convert to int16_t, and using
int makes the machine code a bit smaller (and presumably a bit
faster) on x86-64 with GCC 14.

(cherry picked from commit 98b83bdc9f4af7798e3314ad8df6ab78efd60f8a)

11 months agoPort knuth_hash to odd platforms
Paul Eggert [Sun, 19 May 2024 15:42:57 +0000 (08:42 -0700)]
Port knuth_hash to odd platforms

* src/lisp.h (hash_hash_t, knuth_hash): Use unsigned int and
unsigned long long int rather than uint32_t and uint64_t, as POSIX
does not guarantee the presence of uint64_t, and uint32_t and
uint64_t both in theory have problems with undefined behavior on
integer overflow.  This doesn’t affect behavior (or even machine
code) on typical platforms.

(cherry picked from commit 9bcd644408367b1d57e62a7f73b4ef4a3cd366b4)

11 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sun, 19 May 2024 02:12:55 +0000 (19:12 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit c07160b8df4e9f795dd73f08a3399ccef465c898)

11 months agoPacify -Wanalyzer-null-dereference in sfnt.c
Paul Eggert [Sat, 18 May 2024 20:18:32 +0000 (13:18 -0700)]
Pacify -Wanalyzer-null-dereference in sfnt.c

* src/sfnt.c (sfnt_map_table, sfnt_read_table)
(sfnt_read_cvar_table): Pacify GCC -Wanalyzer-null-dereference.
The change to sfnt_read_cvar_table fixes what appears to be
an actual null-dereference bug.

(cherry picked from commit 370a386633b081107d30a00463dd0fe8d81b7e0f)

11 months ago; * lisp/menu-bar.el (kill-this-buffer): Fix typo.
Eli Zaretskii [Sun, 19 May 2024 13:40:42 +0000 (16:40 +0300)]
; * lisp/menu-bar.el (kill-this-buffer): Fix typo.

(cherry picked from commit 1c14ccfee599d13ea78b141fc3aec149a4d45a24)

11 months agoFix kill-this-buffer's detection of minibuffer frames
Po Lu [Sun, 19 May 2024 12:57:09 +0000 (12:57 +0000)]
Fix kill-this-buffer's detection of minibuffer frames

* lisp/menu-bar.el (kill-this-buffer): Don't test against
menu-updating-frame, because this variable is only meaningful
during menu bar updates.

(cherry picked from commit 627d60910b82d35bb5f19fa139de7878cccf082e)

11 months agoSilence 3 warnings for non sqlite builds
Andrea Corallo [Sun, 19 May 2024 12:50:39 +0000 (14:50 +0200)]
Silence 3 warnings for non sqlite builds

* lisp/emacs-lisp/multisession.el (sqlite-commit)
(sqlite-transaction, sqlite-rollback): Declare.

(cherry picked from commit 931663f1236fafce18022455b4e4e7a0c7f22c2c)

11 months agoAdd connection-local variable `tramp-direct-async-process'
Michael Albinus [Sun, 19 May 2024 12:13:03 +0000 (14:13 +0200)]
Add connection-local variable `tramp-direct-async-process'

* doc/misc/tramp.texi (Predefined connection information):
Remove "direct-async-process".
(Remote processes): Explain connection-local variable
tramp-direct-async-process.

* etc/NEWS: Add connection-local variable 'tramp-direct-async-process'.

* lisp/net/tramp-compat.el (tramp-compat-connection-local-p): Sync with
Emacs source.
(tramp-compat-connection-local-value): New defalias.

* lisp/net/tramp-message.el (tramp-warning): New defsubst.

* lisp/net/tramp.el (tramp-direct-async-process): New defvar.
(tramp-direct-async-process-p): Use connection-local variable for
check.  (Bug#70959)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process):
Use connection-local-variable `tramp-direct-async-process'.

(cherry picked from commit c4cc905d6b01eb049b8d9400da2722d7f818d623)

11 months agoAdd convenience binding for html-paragraph to mhtml-mode
Stefan Kangas [Sun, 19 May 2024 08:43:59 +0000 (10:43 +0200)]
Add convenience binding for html-paragraph to mhtml-mode

* lisp/textmodes/sgml-mode.el (html-mode-map): Bind 'C-c C-c p' to
'html-paragraph'.  (Bug#70533)

(cherry picked from commit 92cd24f405ca15e453238cae4f2e1922667220f0)

11 months ago; * lisp/color.el (color-oklab-to-xyz): Doc fix.
Eli Zaretskii [Sun, 19 May 2024 08:23:19 +0000 (11:23 +0300)]
; * lisp/color.el (color-oklab-to-xyz): Doc fix.

(cherry picked from commit dbd50ccd8e0f32054944f3016323f8e847ad167b)

11 months ago; * etc/NEWS: Announce Oklab support.
Eli Zaretskii [Sun, 19 May 2024 08:21:22 +0000 (11:21 +0300)]
; * etc/NEWS: Announce Oklab support.

(cherry picked from commit f917c3b45dc182a20d5e5d5954fae914fc5303be)

11 months agoAdd Oklab color space utility functions in color.el.
Robert Church [Tue, 14 May 2024 00:28:28 +0000 (17:28 -0700)]
Add Oklab color space utility functions in color.el.

* lisp/color.el (color-oklab-to-xyz, color-oklab-to-srgb)
(color-srgb-to-oklab): New functions.  (Bug#70963)

* test/lisp/color-tests.el (color-tests-oklab-to-xyz)
(color-tests-xyz-to-oklab, color-tests-srgb-to-oklab)
(color-tests-oklab-to-srgb): New tests.

(cherry picked from commit c5e5940ba40b801270bbe02b92576eac36f73222)

11 months ago* lisp/window.el (fit-window-to-buffer): Fix width calculation
Morgan Smith [Sun, 12 May 2024 13:19:30 +0000 (09:19 -0400)]
* lisp/window.el (fit-window-to-buffer): Fix width calculation

When PIXELWISE is nil, we still calculate width in pixels and
then convert it to columns.  However, part of the calculation
was using columns where it should have used pixels.  (Bug#70894)

(cherry picked from commit 42d444114d8df0ffddf1e80891a386c0edcbd976)

11 months agoFix MinGW build with GCC 14 and later
Eli Zaretskii [Sun, 19 May 2024 07:58:52 +0000 (10:58 +0300)]
Fix MinGW build with GCC 14 and later

* configure.ac [mingw]: Add -Wno-error=implicit-function-declaration
to GCC_TEST_OPTIONS.  (Bug#70889)

(cherry picked from commit 5216903ae6c3f91ebefb1152af40753f723cbc39)

11 months agoFix byte compiler warnings in window-tool-bar.el
Jared Finder [Sun, 19 May 2024 03:51:09 +0000 (20:51 -0700)]
Fix byte compiler warnings in window-tool-bar.el

* lisp/window-tool-bar.el (window-tool-bar--static-if)
(window-tool-bar--ignored-event-types): Avoid byte compiler
seeing variables obsolete in Emacs 30 and up.  (Bug#68765)

(cherry picked from commit b80a2cbdb677a8954f00f3394c2f8050ed511ad4)

11 months agoFix the DJGPP build
Po Lu [Sun, 19 May 2024 01:46:26 +0000 (09:46 +0800)]
Fix the DJGPP build

* config.bat: Generate stdbit.in-h from stdbit.in.h.

* msdos/sedlibmk.inp (GL_STDC_...): Enable generation
of ISO C2x features.
(STDBIT_H): Define to stdbit.h.
(GL_GENERATE_STDBIT_H_CONDITION): Define to 1.

(cherry picked from commit 48563687f28b900c5d2044403c6576fbbc4cfa01)

11 months agoFix Android 2.2 build
Po Lu [Sun, 19 May 2024 01:38:50 +0000 (09:38 +0800)]
Fix Android 2.2 build

* src/android.h: Include sys/select.h.

(cherry picked from commit cf80d9831c62a8d0bfa98aec912862e7412a99c4)

11 months agoFix Android build
Po Lu [Sun, 19 May 2024 01:16:59 +0000 (09:16 +0800)]
Fix Android build

* src/androidfns.c: Include stdlib.h.

(cherry picked from commit 3c2c6ab733623433150b3bc82598c4bf2563ec87)

11 months ago* lisp/play/doctor.el: Add a few more word meanings.
Stefan Kangas [Sat, 18 May 2024 23:10:50 +0000 (01:10 +0200)]
* lisp/play/doctor.el: Add a few more word meanings.

(cherry picked from commit 9ec124e59ad3306a732749669f81aa4a870ce936)

11 months agoReconcile erc-stamp--date-stamps when merging buffers
F. Jason Park [Thu, 9 May 2024 02:03:58 +0000 (19:03 -0700)]
Reconcile erc-stamp--date-stamps when merging buffers

* etc/ERC-NEWS: Mention new face `erc-information'.
* lisp/erc/erc-button.el (erc-button-add-buttons): Skip buttonization
when the "msg prop" `erc--skip' is present and contains the symbol
`button'.  Set `alist' to nil in the same guard condition as a
roundabout way of suppressing further processing.
* lisp/erc/erc-networks.el (erc--insert-admin-message): Forward
declaration.
(erc-networks--insert-transplanted-content)
(erc-networks--transplant-buffer-content): Replace former with latter.
Change signature to take source and destination buffers as parameters.
(erc-networks--transplant-target-buffer-function): New function-valued
variable.
(erc-networks--target-transplant-in-progress-p): New variable, a flag
for downstream code to detect when a transplant is underway.
(erc-networks--reclaim-orphaned-target-buffers): Defer to
`erc-networks--transplant-target-buffer-function' to handle the actual
transplant business.  Crucially, kill the buffer afterwards instead of
beforehand.  If new buffer-association bugs emerge related to the
combining of old or renamed target buffers, this reordering may be at
fault.
(erc-networks--copy-over-server-buffer-contents): Pass old and new
buffers to `erc-networks--insert-transplanted-content'.
* lisp/erc/erc-stamp.el
(erc-stamp--defer-date-insertion-on-post-modify): Set `fn' slot of
`erc-stamp--date' instance to `ignore' when running the actual
callback in order to conserve a little space.
(erc-stamp--date-mode): Add and remove hook members for
`erc-networks--copy-server-buffer-functions' and
`erc-networks--transplant-target-buffer-function'.
(erc-insert-timestamp-left-and-right): Always clear
`erc-timestamp-last-inserted-right' to ensure a right stamp
accompanies every date stamp.
(erc-stamp--dedupe-date-stamps)
(erc-stamp--dedupe-date-stamps-from-buffer)
(erc-stamp--dedupe-date-stamps-from-target-buffer): New functions.
Date stamp behavior was revamped as part of bug#60936.
* lisp/erc/erc.el (erc-informational): New face.
(erc--insert-admin-message): New function to hide some "msg prop"
complexity from "upstream" libraries, like `erc-networks', and thus
avoid more forward-declarations.  A less smelly approach would be to
devise a general interface owned by such libraries, or erc-common,
that `erc-mode' could then hook into on init.
(erc-display-message-highlight): Make face matching more limber to
accommodate the convention of face names lacking a "-face" suffix.
(erc-message-english-graft): New variable.
(erc-kill-channel): Inhibit execution of hook when
`erc-networks--target-transplant-in-progress-p' is non-nil.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--no-existing--orphan)
(erc-networks--rename-server-buffer--existing--reuse)
(erc-networks--rename-server-buffer--local-match)
(erc-networks--rename-server-buffer--local-nomatch): Use helper to
initialize markers.
* test/lisp/erc/erc-stamp-tests.el (erc-stamp--dedupe-date-stamps):
New test.  (Bug#70928)

(cherry picked from commit fee637468b5e72fd6fcd2c96c42622455db5fb16)

11 months agoDon't kill server buffer with erc-kill-buffer-on-part
F. Jason Park [Wed, 15 May 2024 04:09:55 +0000 (21:09 -0700)]
Don't kill server buffer with erc-kill-buffer-on-part

* etc/ERC-NEWS: Mention new flag `erc-killing-buffer-on-part-p' and
the renaming of `erc-kill-channel'.
* lisp/erc/erc-backend.el (erc-server-PART): Only kill a buffer on
behalf of `erc-kill-buffer-on-part' when the buffer hasn't already
been killed, and bind `erc-killing-buffer-on-part-p' to t when doing
so.
* lisp/erc/erc-log.el (erc-conditional-save-buffer): Don't save logs
when the buffer parameter is nil because that causes the server buffer
to be saved out.  It's possible that user code relying on this
longstanding bug will be affected, however, by default, the server
buffer will also be saved out independently at designated junctures.
* lisp/erc/erc.el (erc-part-hook): Redo doc string.
(erc-killing-buffer-on-part-p): New variable, a flag to prevent
redundant execution of `erc-kill-channel-hook' members concerned with
parted channels.
(erc-kill-buffer-on-part): Tweak doc string.
(erc-kill-channel-hook): Use new name for `erc-kill-channel',
`erc-part-channel-on-kill'.
(erc-kill-channel, erc-part-channel-on-kill): Rename former to latter,
and inhibit execution when `erc-killing-buffer-on-part-p' is non-nil.
* test/lisp/erc/erc-scenarios-base-kill-on-part.el: New file.
(Bug#70840)

(cherry picked from commit cf7cc4c630a2cd71c52069237053cb1476104572)

11 months agocomint.el: Add applicable modes to 'interactive' forms
Augusto Stoffel [Wed, 24 Apr 2024 16:13:36 +0000 (18:13 +0200)]
comint.el: Add applicable modes to 'interactive' forms

* lisp/comint.el (comint-dynamic-list-input-ring-select)
(comint-dynamic-list-input-ring, comint-restore-input)
(comint-previous-input, comint-next-input)
(comint-previous-matching-input, comint-next-matching-input)
(comint-previous-matching-input-from-input)
(comint-next-matching-input-from-input)
(comint-replace-by-expanded-history, comint-magic-space)
(comint-history-isearch-backward)
(comint-history-isearch-backward-regexp, comint-send-input)
(comint-truncate-buffer, comint-strip-ctrl-m)
(comint-show-maximum-output, comint-copy-old-input, comint-bol)
(comint-send-invisible, comint-delete-output, comint-write-output)
(comint-append-output-to-file, comint-show-output)
(comint-clear-buffer, comint-interrupt-subjob, comint-kill-subjob)
(comint-quit-subjob, comint-stop-subjob, comint-continue-subjob)
(comint-kill-input, comint-delchar-or-maybe-eof, comint-send-eof)
(comint-backward-matching-input, comint-forward-matching-input)
(comint-next-prompt, comint-previous-prompt)
(comint-insert-previous-argument, comint-kill-whole-line)
(comint-kill-region, comint-dynamic-complete-filename)
(comint-replace-by-expanded-filename)
(comint-dynamic-list-filename-completions)
(comint-get-next-from-history, comint-accumulate)
(comint-goto-process-mark, comint-bol-or-process-mark)
(comint-set-process-mark, comint-redirect-cleanup)
(comint-redirect-send-command)
(comint-redirect-send-command-to-process, comint-fontify-input-mode):
Add mode to interactive form.  (Bug#70555)

(cherry picked from commit e8feb04cc68f24d60d12390cef28064727d75669)

11 months agoeglot: Add blueprint language server (Bug#70015)
nibon7 [Tue, 26 Mar 2024 09:24:33 +0000 (17:24 +0800)]
eglot: Add blueprint language server (Bug#70015)

* lisp/progmodes/eglot.el (eglot-server-programs): Add
blueprint-compiler.

(cherry picked from commit d1d031aea69b3ab45034716048a2592fcbfd7358)

11 months agoImprove fontification of Python assignments with type hints
kobarity [Sat, 24 Feb 2024 14:11:02 +0000 (23:11 +0900)]
Improve fontification of Python assignments with type hints

* lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration):
Fontify type hints of assignment statement.  (Bug#69357)
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-11)
(python-font-lock-assignment-statement-12)
(python-font-lock-assignment-statement-13)
(python-font-lock-assignment-statement-18): Add fontification of type
hints.
(python-font-lock-assignment-statement-19): New test.

(cherry picked from commit c97e7a2da2e5707fc94c2c5e2ddd5f2395cdb80b)

11 months ago* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table): Clean-up quote.
Andrea Corallo [Sat, 18 May 2024 20:17:58 +0000 (22:17 +0200)]
* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table): Clean-up quote.

(cherry picked from commit bbb3038ad9feb1f37e4bef7151b2bc6f18c4123d)

11 months ago; * etc/NEWS: Announce last change.
Stefan Kangas [Sat, 18 May 2024 19:28:49 +0000 (21:28 +0200)]
; * etc/NEWS: Announce last change.

(cherry picked from commit e75921a1dcd8f4742e5bfbee7ca9b11016836e9e)

11 months agonxml-mode: Add schemas for Mono/.NET related files
Jostein Kjønigsen [Thu, 15 Feb 2024 20:54:14 +0000 (21:54 +0100)]
nxml-mode: Add schemas for Mono/.NET related files

* etc/schema/dotnet-appconfig.rnc:
* etc/schema/dotnet-packages-config.rnc:
* etc/schema/dotnet-packages-props.rnc:
* etc/schema/dotnet-resx.rnc:
* etc/schema/msbuild.rnc:
* etc/schema/nuget.rnc:
* etc/schema/nuspec.rnc: New files.
* etc/schema/README: Document copyright status of above new files.
* etc/schema/schemas.xml: Use above new files to support Mono/.NET
development related XML files.

This change was discussed in:
https://lists.gnu.org/r/emacs-devel/2024-02/msg00638.html

(cherry picked from commit e74eedaa2e34d7fd1c3ba9bd2632468bf36d5774)

11 months agocompletion-preview.el: adapt to new '(set-)window-cursor-type'
Eshel Yaron [Thu, 23 May 2024 06:13:49 +0000 (08:13 +0200)]
completion-preview.el: adapt to new '(set-)window-cursor-type'

11 months agoImprove file name sorting by history position
Eshel Yaron [Wed, 22 May 2024 20:29:53 +0000 (22:29 +0200)]
Improve file name sorting by history position

11 months agofind-func.el: Multi commands
Eshel Yaron [Wed, 22 May 2024 20:26:46 +0000 (22:26 +0200)]
find-func.el: Multi commands

11 months ago; Fix typo (Bug#71043)
Stefan Kangas [Sat, 18 May 2024 18:33:16 +0000 (20:33 +0200)]
; Fix typo (Bug#71043)

(cherry picked from commit bffa00bcbcf027e152b7cdd4cbcadfd600f87ea9)

11 months agoFix double periods in `doctor-symptoms`
Stefan Kangas [Sat, 18 May 2024 17:23:11 +0000 (19:23 +0200)]
Fix double periods in `doctor-symptoms`

* lisp/play/doctor.el (doctor-symptoms): Don't produce double periods.

(cherry picked from commit 96f64c156c6b76ba02232179ad76ace04a92ed06)

11 months agoSimplify 32-bit Android bit fiddling
Paul Eggert [Sun, 12 May 2024 21:26:32 +0000 (14:26 -0700)]
Simplify 32-bit Android bit fiddling

* src/sfnt.c: Include stdbit.h.
(sfnt_count_leading_zero_bits) [!INT64_MAX]: Remove this function,
which was confusingly named as it actually returned 31 minus the
number of leading zero bits.
(sfnt_multiply_divide_2) [!INT64_MAX]: Use stdc_leading_zeros instead.

(cherry picked from commit 21ed391440ec9c227f3d18cc222aab2d3d0f9e14)

11 months agoPrefer stdbit.h to count-one-bits.h etc
Paul Eggert [Sun, 12 May 2024 21:22:58 +0000 (14:22 -0700)]
Prefer stdbit.h to count-one-bits.h etc

C23's <stdbit.h> in the long run should be better supported than
Gnulib's count-one-bits.h and similar headers, so switch to the
C23 primitives, with a Gnulib fallback for platforms lacking C23.
* admin/merge-gnulib (GNULIB_MODULES): Remove count-leading-zeros,
count-one-bits, count-trailing-zeros.  Add stdc_bit_width,
stdc_count_ones, stdc_trailing_zeros.
* lib/count-leading-zeros.c, lib/count-leading-zeros.h:
* lib/count-one-bits.c, lib/count-one-bits.h:
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h: Remove.
* lib/stdbit.c, lib/stdbit.in.h, lib/stdc_bit_width.c:
* lib/stdc_count_ones.c, lib/stdc_leading_zeros.c:
* lib/stdc_trailing_zeros.c, m4/stdbit_h.m4:
New files, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/data.c: Do not include count-one-bits.h, count-trailing-zeros.h.
Instead, rely on lisp.h including stdbit.h.
(Flogcount, Fbool_vector_count_population)
(Fbool_vector_count_consecutive): Use stdbit.h macros instead of
count-one-bits.h and count-trailing-zeros.h macros.
(shift_right_ull, count_one_bits_word, pre_value)
(count_trailing_zero_bits): Remove; no longer needed.
* src/lisp.h: Include stdbit.h instead of count-leading-zeros.h.
(elogb): Use stdbit.h macro instead of count-leading-zeros.h macro.

(cherry picked from commit 88b0bb4db9aaecff8b01e81726b911fa5d02b2fb)

11 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 18 May 2024 16:33:03 +0000 (09:33 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 08550d058f028e0819ba6a72e9a53c0bc789257e)

11 months agoList Andrea Corallo as co-maintainer in ack.texi
Stefan Kangas [Sat, 18 May 2024 17:14:21 +0000 (19:14 +0200)]
List Andrea Corallo as co-maintainer in ack.texi

* doc/emacs/ack.texi (Acknowledgments): List Andrea Corallo as
co-maintainer from 29.3 onwards.

(cherry picked from commit c9af2fab9221d3793e0b9cd4dd376f9f16099a26)

11 months agoNew functions '(set-)window-cursor-type'
Eshel Yaron [Sat, 27 Apr 2024 18:47:34 +0000 (20:47 +0200)]
New functions '(set-)window-cursor-type'

* src/window.h (struct window): Add 'cursor_type' slot.
(wset_cursor_type): New inline function.
* src/xdisp.c (get_window_cursor_type): Consult 'cursor_type'.
* src/window.c (make_window): Initialize 'cursor_type' to t.
(Fset_window_cursor_type, Fwindow_cursor_type): New functions.
(syms_of_window): List their symbols.
* doc/lispref/windows.texi (Window Point): Document them.
* doc/lispref/frames.texi (Cursor Parameters): Mention
new 'set-window-cursor-type'.
* etc/NEWS: Announce new functions.  (Bug#70622)

(cherry picked from commit 3b890bf2bd2fec54433f35d61e30542b3dadb612)

11 months agoRevert "New window parameter 'cursor-type'"
Eshel Yaron [Sat, 18 May 2024 19:12:00 +0000 (21:12 +0200)]
Revert "New window parameter 'cursor-type'"

This reverts commit bab56b25149d5f86ac82272a3646893dfb58c41e.

11 months agominibuffer-completion-help: Fix earlier mistake
Dmitry Gutov [Sat, 18 May 2024 13:30:23 +0000 (16:30 +0300)]
minibuffer-completion-help: Fix earlier mistake

* lisp/minibuffer.el (minibuffer-completion-help): Fix earlier
mistake.  Instead of altering a variable whose value is
immutable (and already captured in a saved list), move the
reference to said list to a lexical binding and alter that
list's second element instead.

https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00875.html
(cherry picked from commit 6badb1260a5e5107887d244507a7289fa1a30a91)

11 months agoHousekeeping around androidselect.c
Po Lu [Sat, 18 May 2024 12:45:35 +0000 (20:45 +0800)]
Housekeeping around androidselect.c

* java/org/gnu/emacs/EmacsClipboard.java (setClipboard)
(getClipboard):

* java/org/gnu/emacs/EmacsSdk11Clipboard.java (setClipboard)
(getClipboard):

* java/org/gnu/emacs/EmacsSdk8Clipboard.java (setClipboard)
(getClipboard): Save and return Strings rather than byte arrays.

* src/androidselect.c (android_init_emacs_clipboard)
(Fandroid_set_clipboard, Fandroid_get_clipboard): Adjust to
match.

(cherry picked from commit 8dc00dc22250b383e7692fc761cbca25b014aa8a)

11 months ago; * doc/lispintro/emacs-lisp-intro.texi (nthcdr): Whitespace (bug#71033).
Eli Zaretskii [Sat, 18 May 2024 11:38:29 +0000 (14:38 +0300)]
; * doc/lispintro/emacs-lisp-intro.texi (nthcdr): Whitespace (bug#71033).

(cherry picked from commit a4828155d8f2b5dc379dd20f17cb478b63425b64)

11 months agoAdd support for Rust compilation messages
Ergus [Wed, 15 May 2024 13:10:02 +0000 (15:10 +0200)]
Add support for Rust compilation messages

* etc/compilation.txt (Rust): Add Rust/cargo examples.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add rust/cargo error and
warning patterns.  (Bug#70794)

(cherry picked from commit 2e862f81a355435fb7e837ffebee2f657c26ff23)

11 months agouse-package: Add ':ignored-files' support to ':vc' keyword
Tony Zorman [Sun, 15 Oct 2023 14:51:00 +0000 (16:51 +0200)]
use-package: Add ':ignored-files' support to ':vc' keyword

* lisp/use-package/use-package-core.el (use-package-split-when):
New utility function to split a list whenever a specified
predicate returns t.
(use-package-vc-valid-keywords): A new defconst to gather all
allowed keywords.
(use-package-normalize--vc-arg): Properly normalize the
':ignored-files' keyword, in that the following are all valid
ways of entering files:
  :ignored-files "a"
  :ignored-files ("a")
  :ignored-files "a" "b" "c"
  :ignored-files ("a" "b" "c")
(use-package-normalize/:vc): Adjust normalization, now that we
do not necessarily receive a valid plist as an input.  (Bug#66567)

* test/lisp/use-package/use-package-tests.el
(use-package-test-normalize/:vc): Add tests for ':ignored-files'
keyword.

(cherry picked from commit a019d2bd56818046854345922ad805f3212cd116)

11 months agouse-package: Update list of valid :vc keywords
Tony Zorman [Sun, 15 Oct 2023 14:50:00 +0000 (16:50 +0200)]
use-package: Update list of valid :vc keywords

* lisp/use-package/use-package-core.el: Add ':shell-command'
and ':make' to valid keywords.  (Bug#66567)

(cherry picked from commit 426176c75e5337762b185818942c439a93e3d9ef)

11 months agoFix printing the result by 'eval-print-last-sexp'
Eli Zaretskii [Sat, 18 May 2024 09:55:34 +0000 (12:55 +0300)]
Fix printing the result by 'eval-print-last-sexp'

* lisp/progmodes/elisp-mode.el (elisp--eval-last-sexp): Record the
desired output stream before evaluating the expression.
(Bug#70931)

(cherry picked from commit 82a31e27e6ceed17a116286d2f0f9810be2e1772)

11 months agoAdding window-tool-bar package (bug#68765).
Jared Finder [Fri, 26 Jan 2024 23:44:12 +0000 (15:44 -0800)]
Adding window-tool-bar package (bug#68765).

* lisp/window-tool-bar.el: New file.

(cherry picked from commit be03dda5b0fc55e989bfa707c73f1cc990e24c3b)

11 months agoAdd user option to only display default tool bar
Jared Finder [Fri, 26 Jan 2024 18:08:30 +0000 (10:08 -0800)]
Add user option to only display default tool bar

This works well with `window-tool-bar-mode', to be added in upcoming
commit.  Then the default tool bar is displayed frame-wide and
mode-specific tool bars are displayed in the window that mode is
active in.

* lisp/tool-bar.el (tool-bar-always-show-default): New user option.
(tool-bar--cache-key, tool-bar-make-keymap-1): Return default tool bar
when option is set.

(cherry picked from commit da325ff7b29b0becdd1356021428fa100d240ec4)

11 months agoInform user when tab-line-mode command makes no change
Jared Finder [Mon, 13 May 2024 03:35:50 +0000 (20:35 -0700)]
Inform user when tab-line-mode command makes no change

* lisp/tab-line.el (tab-line-mode): Display message when command is
run on already altered tab-line-format.

(cherry picked from commit fd3ab22a3eec5c3151b0791fc768e555b66e267c)

11 months agoDocument :box attribute caveats when used on display strings
Eli Zaretskii [Sat, 18 May 2024 09:15:21 +0000 (12:15 +0300)]
Document :box attribute caveats when used on display strings

* doc/lispref/display.texi (Replacing Specs, Face Attributes):
Mention special considerations when a display string has a
':box' face attribute identical to the surrounding buffer text.
Suggested by JD Smith <jdtsmith@gmail.com>.  (Bug#70637)

(cherry picked from commit df1a9e42ba483f2a0e3747abc7edb16818993f13)

11 months agoMake 'vtable-insert-object' more versatile
Joost Kremers [Tue, 7 May 2024 09:52:27 +0000 (11:52 +0200)]
Make 'vtable-insert-object' more versatile

* lisp/emacs-lisp/vtable.el (vtable-insert-object): Rename
argument AFTER-OBJECT to LOCATION; allow use of index to
refer to the insertion position; add argument BEFORE.
(Bug#70664).

* etc/NEWS:
* doc/misc/vtable.texi (Interface Functions): Document the
change.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable-insert-object): New test.

(cherry picked from commit 4f27d763bbe3312b6039fa59f2874bd8e002d201)

11 months ago* Work around GCC bug affecting Garbage Collection (bug#65727).
Andrea Corallo [Sat, 18 May 2024 06:59:17 +0000 (08:59 +0200)]
* Work around GCC bug affecting Garbage Collection (bug#65727).

* src/lisp.h (flush_stack_call_func): Prevent GCC sibling call
optimization to run with an asm inline.

(cherry picked from commit 19c983ddedf083f82008472c13dfd08ec94b615f)

11 months agoImprove documentation of 'movemail'
Eli Zaretskii [Sat, 18 May 2024 06:12:54 +0000 (09:12 +0300)]
Improve documentation of 'movemail'

* doc/emacs/rmail.texi (Movemail): Fix the name of the Mailutils
manual in the printed version.  Add index entries.  Move the
description of remote mailboxes to...
(Remote Mailboxes): ...here, to avoid duplication.

(cherry picked from commit ca17bc8dd0b51b6dbacd6e63a97d81488d45ec71)

11 months agoReplace incorrect link in Rmail chapter of Emacs manual
Jakub Ječmínek [Fri, 17 May 2024 20:07:33 +0000 (22:07 +0200)]
Replace incorrect link in Rmail chapter of Emacs manual

* doc/emacs/rmail.texi (Movemail): Fix cross-reference to a node
in the Mailutils manual.  (Bug#71018)

(cherry picked from commit d47aa33bcdbd24283f680285f17736bd758ccba9)

11 months agoFix project-find-regexp in remote projects
Dmitry Gutov [Sat, 18 May 2024 00:24:56 +0000 (03:24 +0300)]
Fix project-find-regexp in remote projects

* lisp/progmodes/xref.el (xref--hits-file-prefix):
New variable.  Something to prepend to each file name (bug#69233).
(xref--convert-hits): Use it to also store the "default directory"
part of the filename conditionally on whether it's remote.
(xref--collect-matches): Use the new variable here.

(cherry picked from commit db039399cccd38b767bf6a30ba6c5da593eb69cf)

11 months agoxref--group-name-for-display: Undo most of the latest change
Dmitry Gutov [Sat, 18 May 2024 00:00:29 +0000 (03:00 +0300)]
xref--group-name-for-display: Undo most of the latest change

* lisp/progmodes/xref.el (xref--group-name-for-display):
Remove the DD-SUFFIX parameter, returning the function more like
to how it was (bug#69233).
(xref--analyze, xref--add-log-current-defun):
Revert the previous change accordingly.

* test/lisp/progmodes/xref-tests.el: Undo the last change.

(cherry picked from commit 646b8da4a5ec8b4b4a8e461683ff0786a95d1f85)

11 months ago; * doc/lispref/parsing.texi (Parsing Program Source): Improve indexing.
Eli Zaretskii [Fri, 17 May 2024 16:03:39 +0000 (19:03 +0300)]
; * doc/lispref/parsing.texi (Parsing Program Source): Improve indexing.

(cherry picked from commit 35138b90dd24cb967a124481ae06f8df14821c04)

11 months agoPort to certain Android environments with no GUI
Po Lu [Fri, 17 May 2024 11:21:05 +0000 (19:21 +0800)]
Port to certain Android environments with no GUI

* configure.ac (USER_FULL_NAME): Define to
android_user_full_name only when a GUI system is being built.
Otherwise, set to pw->pw_gecos or NULL consistently with the
presence of pw->pw_gecos.

* src/editfns.c (Fuser_full_name): Adjust to match.  Accept NULL
values from USER_FULL_NAME.

(cherry picked from commit 1f08984a67c94e957bec7f8c59818b627a67427b)

11 months ago; Improve documentation of 'set-fontset-font'
Eli Zaretskii [Fri, 17 May 2024 07:18:35 +0000 (10:18 +0300)]
; Improve documentation of 'set-fontset-font'

* doc/lispref/display.texi (Fontsets):
* src/fontset.c (Fset_fontset_font): Doc fix (bug#70993).

(cherry picked from commit 3dd09516c9a87f663fefde77befb7d569cbed9f0)

11 months ago; Avoid compiler warning in w32term.c
Eli Zaretskii [Fri, 17 May 2024 06:43:20 +0000 (09:43 +0300)]
; Avoid compiler warning in w32term.c

* src/w32term.c (w32_draw_glyphless_glyph_string_foreground):
Avoid GCC 14 warning about storing address of local variable.

(cherry picked from commit 6ca3a60db3427bc6aef08144c1524920ff3d9c4d)

11 months agoAdd new Eshell built-in command 'funcall'
Jim Porter [Fri, 17 May 2024 03:33:18 +0000 (20:33 -0700)]
Add new Eshell built-in command 'funcall'

* lisp/eshell/esh-cmd.el (eshell/funcall): New function...

* test/lisp/eshell/em-glob-tests.el (em-glob-test/expand/splice-results)
(em-glob-test/expand/no-splice-results)
(em-glob-test/expand/explicitly-splice-results)
(em-glob-test/expand/explicitly-listify-results):
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/quoted-interp-lisp-indices)
(esh-var-test/quoted-interp-cmd-indices)
(esh-var-test/interp-convert-quoted-var-number)
(esh-var-test/quoted-interp-convert-var-number)
(esh-var-test/quoted-interp-convert-quoted-var-number)
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-result-var-split-indices)
(esh-var-test/last-arg-var-split-indices): ... use it in tests.

* doc/misc/eshell.texi (List of Built-ins): Describe this command.

(cherry picked from commit 2f7d011d180b1e8d8dc6784cd9b48cf5690b7c62)

11 months ago; Fix search in remote project with relative file names
Dmitry Gutov [Thu, 16 May 2024 22:05:17 +0000 (01:05 +0300)]
; Fix search in remote project with relative file names

(cherry picked from commit 113bd2082c982df933df9b12c3994d6d582c8268)

11 months ago; cperl-mode.el: prevent Emacs from "freezing" (Bug#70948)
Harald Jörg [Thu, 16 May 2024 20:22:37 +0000 (22:22 +0200)]
; cperl-mode.el: prevent Emacs from "freezing" (Bug#70948)

* cperl-mode.el (defconst): Replace the rx expression for
`cperl--basic-identifier-rx' with its actual macro expansion.
This makes it efficient under Emacs 29.3, where the expansion
by rx.el could make Emacs freeze with a crafted Perl source
(Bug#70948).

(cherry picked from commit 54a7268763138fdc63bf81feca99013b01337872)

11 months ago;cperl-mode.el: Allow running under Emacs >=27
Harald Jörg [Thu, 16 May 2024 19:55:07 +0000 (21:55 +0200)]
;cperl-mode.el: Allow running under Emacs >=27

I would like to advertise cperl-mode.el from the repository as a
workaround for bug#70948.  This can be achieved by safeguarding
the call to derived-mode-add-parents with a version check.

* lisp/progmodes/cperl-mode.el: Call derived-mode-add-parents only
if it is available.

(cherry picked from commit 96269209a3e22707635239d057be4feac217b4bc)

11 months ago; Fix wrong-type-argument in 'rcirc-handler-INVITE'
Philip Kaludercic [Thu, 16 May 2024 17:51:11 +0000 (19:51 +0200)]
; Fix wrong-type-argument in 'rcirc-handler-INVITE'

* lisp/net/rcirc.el (rcirc-handler-INVITE): Use
'with-rcirc-process-buffer' instead of passing a process to
'buffer-local-value'.

(cherry picked from commit 650ee9e071eea2ff8504e056131efa9f6ac894e9)

11 months ago; * doc/emacs/search.texi (Word Search): Add index entry.
Eli Zaretskii [Thu, 16 May 2024 15:42:43 +0000 (18:42 +0300)]
; * doc/emacs/search.texi (Word Search): Add index entry.

(cherry picked from commit 042b58b5ff4ac4c17e03b25fd2c367c1cf869a99)

11 months ago(describe-package-1): Handle (nil . "string") in `:maintainer`
Stefan Monnier [Thu, 16 May 2024 15:01:11 +0000 (11:01 -0400)]
(describe-package-1): Handle (nil . "string") in `:maintainer`

* lisp/emacs-lisp/package.el (describe-package-1): Refine the
check to distinguish the old single-maintainer format from the
new multi-maintainer format.  (bug#69712)

(cherry picked from commit acfb2c6163b60507801fb8666129925e793394c9)

11 months ago* lisp/loadup.el: Add workaround for occasional "bootstrap" failure
Stefan Monnier [Thu, 16 May 2024 13:50:39 +0000 (09:50 -0400)]
* lisp/loadup.el: Add workaround for occasional "bootstrap" failure

(cherry picked from commit ee3ef57c24fe3435cd896e1f096aadff5f9372a0)

11 months agoAdd multi/unibyte string tests for key-description
Robert Pluim [Tue, 14 May 2024 15:41:57 +0000 (17:41 +0200)]
Add multi/unibyte string tests for key-description

* test/src/keymap-tests.el (keymap--key-description): Add multi/unibyte
tests.

This is to check the fix for Bug#59305.

(cherry picked from commit cdf49336cd06c433d2aa7795672aebe413c92f54)

11 months ago* doc/emacs/mule.texi (Unibyte Mode): Mention iso-transl-set-language
Robert Pluim [Tue, 14 May 2024 15:35:04 +0000 (17:35 +0200)]
* doc/emacs/mule.texi (Unibyte Mode): Mention iso-transl-set-language

(cherry picked from commit c22b91fd9ca7625a7a4f2d817552f19cc56ee310)

11 months ago; * src/window.c (Fwindow_scroll_bars): Doc fix.
Eli Zaretskii [Mon, 13 May 2024 05:00:38 +0000 (08:00 +0300)]
; * src/window.c (Fwindow_scroll_bars): Doc fix.

(cherry picked from commit 60b1768dc50c33a6788a626351f9d902a859b622)

11 months agoStrip 'display' text property from completion candidates
Eshel Yaron [Sat, 18 May 2024 18:47:01 +0000 (20:47 +0200)]
Strip 'display' text property from completion candidates

This fixes choosing multiline candidates in 'yank-pop'.

11 months ago* Fix bootstrap with checking enabled
Andrea Corallo [Thu, 16 May 2024 05:42:14 +0000 (07:42 +0200)]
* Fix bootstrap with checking enabled

* lisp/emacs-lisp/comp.el (comp--limplify-top-level): Set function
safety.

(cherry picked from commit 1b622ff66e32e09fb679b4d371c3be951bf7f000)

11 months ago; * lisp/eshell/esh-ext.el (eshell-remote-command): Improve last change.
Jim Porter [Thu, 16 May 2024 05:22:56 +0000 (22:22 -0700)]
; * lisp/eshell/esh-ext.el (eshell-remote-command): Improve last change.

(cherry picked from commit 59b889885d1f18b9325bd0db3458d3537e6b5f2a)

11 months agoUse "/local:" prefix in Eshell to run local commands when cwd is remote
Jim Porter [Fri, 10 May 2024 19:22:52 +0000 (12:22 -0700)]
Use "/local:" prefix in Eshell to run local commands when cwd is remote

* lisp/eshell/esh-ext.el (eshell-explicit-remote-commands)
(eshell-explicit-command): Update docstrings.
(eshell--local-prefix): New constant.
(eshell-handle-remote-command): Remove.
(eshell-quoted-file-command): New function...
(eshell-ext-initialize): ... add it as a hook.
(eshell-remote-command): Support running commands on localhost.
(eshell-connection-local-command): Rename from
'eshell-external-command'.
(eshell-external-command): New implementation calling
'eshell-remote-command' or 'eshell-connection-local-command' as
appropriate.

* test/lisp/eshell/esh-ext-tests.el
(esh-ext-test/explicitly-local-command): Update test.

* doc/misc/eshell.texi (Remote Access): Update documentation.

* etc/NEWS: Update announcement.

(cherry picked from commit e260bf1be7b03c21988a2090cde31970bd6bbfc9)

11 months ago(eglot--managed-mode): Avoid calling track-changes unregistered
Sean Whitton [Wed, 15 May 2024 18:50:18 +0000 (14:50 -0400)]
(eglot--managed-mode): Avoid calling track-changes unregistered

* lisp/progmodes/eglot.el (eglot--managed-mode): Unregister from
track-changes after `eglot-shutdown` since that function may
call `eglot--signal-textDocument/didChange`.  (bug#70927)

(cherry picked from commit c85294a6132e57bc0d24e39589b2c6163c11ca87)

11 months agovc-git-root-log-format: Explicitly match periods
Sean Whitton [Wed, 15 May 2024 18:04:03 +0000 (19:04 +0100)]
vc-git-root-log-format: Explicitly match periods

* lisp/vc/vc-git.el (vc-git-root-log-format): Explicity match
periods, rather than matching them only because '.' matches any
chars.

(cherry picked from commit 5900cf92ea27f56bd0e35b818332d9d415f4d6fc)

11 months agocontrol.texi: Be a bit more explicit about the behavior of `pcase-let`
Stefan Monnier [Wed, 15 May 2024 17:57:11 +0000 (13:57 -0400)]
control.texi: Be a bit more explicit about the behavior of `pcase-let`

* doc/lispref/control.texi (Destructuring with pcase Patterns):
Clarify the kind of "unspecified" behavior that can occur when
the destructing pattern does not match the value.

(cherry picked from commit fea8d54c48094c528527e91c1598f9d115967812)