]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 weeks agoelisp-mode.el: Fix handling of deleted files main
Eshel Yaron [Sun, 29 Jun 2025 08:29:45 +0000 (10:29 +0200)]
elisp-mode.el: Fix handling of deleted files

2 weeks agoDrop printing.el
Eshel Yaron [Sun, 29 Jun 2025 08:29:27 +0000 (10:29 +0200)]
Drop printing.el

2 weeks agoDrop ERC
Eshel Yaron [Fri, 27 Jun 2025 20:46:39 +0000 (22:46 +0200)]
Drop ERC

2 weeks agoUpdate lisp/ldefs-boot.el
Eshel Yaron [Thu, 26 Jun 2025 12:20:01 +0000 (14:20 +0200)]
Update lisp/ldefs-boot.el

2 weeks agoSupport 's' in 'C-h m' help buffers
Eshel Yaron [Thu, 26 Jun 2025 12:17:09 +0000 (14:17 +0200)]
Support 's' in 'C-h m' help buffers

2 weeks agoDrop pcvs-*.el
Eshel Yaron [Wed, 25 Jun 2025 17:44:18 +0000 (19:44 +0200)]
Drop pcvs-*.el

2 weeks agoscope.el: Handle 'autoload'
Eshel Yaron [Wed, 25 Jun 2025 15:45:05 +0000 (17:45 +0200)]
scope.el: Handle 'autoload'

2 weeks agoWhen navigating to anchor targets in EWW, retain 'eww-data' properties
Jim Porter [Sat, 21 Jun 2025 19:10:59 +0000 (12:10 -0700)]
When navigating to anchor targets in EWW, retain 'eww-data' properties

Previously, navigating to an in-page anchor target would clear
'eww-data', removing many important properties like the original source
and the DOM.  Among other things, this prevented enabling/disabling
readable mode.

* lisp/net/eww.el (eww-follow-link): Copy previous 'eww-data'.

(cherry picked from commit e5ad9ae10090ab34a4d71139e6f928c11f0c029c)

2 weeks agoTramp: Cache also `file-executable-p' in `file-name-all-completions'
Michael Albinus [Sun, 22 Jun 2025 15:29:52 +0000 (17:29 +0200)]
Tramp: Cache also `file-executable-p' in `file-name-all-completions'

* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Fix comment.

* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Cache also `file-executable-p'.  Suggested by <mail@knazarov.com>.
(tramp-shell-file-name-all-completions): New script.
(tramp-bundle-read-file-names): Fix for special characters.  Cache
also `file-executable-p'.
(tramp-sh-handle-file-name-all-completions): Unify different cases.

* lisp/net/tramp.el (with-tramp-suspended-timers, without-remote-files):
Fix debug spec.

(cherry picked from commit 87fc539a0b4d7f84d1697e8479158b30c09b4e49)

2 weeks agoFix 'c-ts-mode' indentation when the style is defined as a function
Eli Zaretskii [Sun, 22 Jun 2025 08:16:53 +0000 (11:16 +0300)]
Fix 'c-ts-mode' indentation when the style is defined as a function

* lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Handle the
case where 'c-ts-mode-indent-style' is a function.  (Bug#78814)

(cherry picked from commit 081c1aae992549bc9ef6f0f85c4d4cf6a8fe84cb)

2 weeks ago; Skip commit e66428a0d2d5acf13c659b127bb0ace79122dc1a
Eshel Yaron [Tue, 24 Jun 2025 06:29:07 +0000 (08:29 +0200)]
; Skip commit e66428a0d2d5acf13c659b127bb0ace79122dc1a

2 weeks ago; Skip commit be0b44e4ed972de3b761da16ee571f928579841f
Eshel Yaron [Tue, 24 Jun 2025 06:29:05 +0000 (08:29 +0200)]
; Skip commit be0b44e4ed972de3b761da16ee571f928579841f

2 weeks ago(refactor-apply-edits-dtrt): New function.
Eshel Yaron [Tue, 24 Jun 2025 06:27:46 +0000 (08:27 +0200)]
(refactor-apply-edits-dtrt): New function.

3 weeks agoelisp-mode.el: Support renaming symbol across project.
Eshel Yaron [Mon, 23 Jun 2025 17:42:23 +0000 (19:42 +0200)]
elisp-mode.el: Support renaming symbol across project.

3 weeks ago; * lisp/vc/vc.el (vc-checkin): Fix thinko.
Sean Whitton [Sat, 21 Jun 2025 18:03:54 +0000 (19:03 +0100)]
; * lisp/vc/vc.el (vc-checkin): Fix thinko.

(cherry picked from commit c916f816e0f12f876868f9ffa1be4b070933bb6f)

3 weeks ago* test/infra/gitlab-ci.yml (test-eglot): Fix EMACS_EXTRAOPT.
Michael Albinus [Sat, 21 Jun 2025 14:27:46 +0000 (16:27 +0200)]
* test/infra/gitlab-ci.yml (test-eglot): Fix EMACS_EXTRAOPT.

(cherry picked from commit c98a74cd87652daf30204816d9e602f0965cd91b)

3 weeks ago; * lisp/progmodes/python.el (treesit-thing-settings): Defvar.
Eli Zaretskii [Sat, 21 Jun 2025 10:23:51 +0000 (06:23 -0400)]
; * lisp/progmodes/python.el (treesit-thing-settings): Defvar.

(cherry picked from commit f1696c3c27e92d889e6f8c816b8f15bd308d8c77)

3 weeks agoAvoid rebuilding a static alist inside a loop
Manuel Giraud [Fri, 13 Jun 2025 09:25:15 +0000 (11:25 +0200)]
Avoid rebuilding a static alist inside a loop

* lisp/calendar/diary-lib.el (diary-mark-entries-1): Build
months-alist outside of the loop.  (Bug#78779)

(cherry picked from commit d7e55558759dc7be0c38a8c8d508be1909b20aa4)

3 weeks ago; Skip commit 1406e583fe63c6d0731a731cf67e574be0d8d4d8
Eshel Yaron [Sun, 22 Jun 2025 08:10:58 +0000 (10:10 +0200)]
; Skip commit 1406e583fe63c6d0731a731cf67e574be0d8d4d8

3 weeks ago; Skip commit 60fbeda771639ded68ffd0666df340c7a06cafcf
Eshel Yaron [Sun, 22 Jun 2025 08:10:43 +0000 (10:10 +0200)]
; Skip commit 60fbeda771639ded68ffd0666df340c7a06cafcf

3 weeks agoFix setting custom 'c++-ts-mode' indent style
Eli Zaretskii [Sat, 21 Jun 2025 09:10:54 +0000 (12:10 +0300)]
Fix setting custom 'c++-ts-mode' indent style

* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-style): Fix a typo.
(Bug#78814)

(cherry picked from commit e379f14193982ef500d8806386e26155ff780290)

3 weeks agoAvoid segfault when profiling Lisp programs with threads
Eli Zaretskii [Sat, 21 Jun 2025 08:53:24 +0000 (11:53 +0300)]
Avoid segfault when profiling Lisp programs with threads

* src/eval.c (backtrace_top): Don't segfault if current_thread is
NULL.  (Bug#76970)

(cherry picked from commit dd95447b05eb2e86e0500d953f43213df028c19a)

3 weeks agoFix byte-compilation of defalias with a constant macro cons pair
Zach Shaftel [Sun, 15 Jun 2025 00:57:21 +0000 (20:57 -0400)]
Fix byte-compilation of defalias with a constant macro cons pair

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias):
Quote the function name in '(macro . function-name), since we eval
it later.
* test/lisp/emacs-lisp/bytecomp-tests.el
(test-eager-load-macro-expand-defalias): New test.
(Bug#78792)

(cherry picked from commit 075ebed98fea274b363d4d015b32edb0a12a9a89)

3 weeks agopython-ts-mode: Improve fontification
Jostein Kjønigsen [Thu, 20 Mar 2025 09:39:31 +0000 (10:39 +0100)]
python-ts-mode: Improve fontification

python--treesit-settings: Fontification based on selectors & code-conventions

- Constructor: Fontified as type, not function-call.
- Typed default parameters
- Fontify kwargs in function calls as property-use. Differentiate from
  variable-use (passed in arguments)

(cherry picked from commit 39721a4d79a6056e09f4d0996f1942eee8e34934)

3 weeks agoFix bold or underline of underscores (bug#78839)
Manuel Giraud [Thu, 19 Jun 2025 14:42:57 +0000 (16:42 +0200)]
Fix bold or underline of underscores (bug#78839)

* lisp/man.el (Man-fontify-manpage): Fix the "_\b_" case.

(cherry picked from commit 00b8d11ac8682749f15ac7125f54f357b8825d86)

3 weeks agoFix 'split-string' when TRIM is used
Eli Zaretskii [Sat, 21 Jun 2025 08:08:05 +0000 (11:08 +0300)]
Fix 'split-string' when TRIM is used

* lisp/subr.el (split-string): Support the case where STRING
begins with a match for SEPARATORS, and a match for SEPARATORS
also matches TRIM.  Doc fix.  (Bug#78690)

* test/lisp/subr-tests.el (subr-test-split-string): New test.

(cherry picked from commit 4607d3e426115ded71f0d8c19e7187ed45c19734)

3 weeks ago; * src/xfaces.c (init_xfaces) <face_attr_sym>: Add :family (bug#78813).
Eli Zaretskii [Sat, 21 Jun 2025 06:44:12 +0000 (09:44 +0300)]
; * src/xfaces.c (init_xfaces) <face_attr_sym>: Add :family (bug#78813).

(cherry picked from commit 8201e7e7a765e2c74076cdddb4fdbe854e672438)

3 weeks ago(peg--merge-error) <guard>: Add missing method
Stefan Monnier [Fri, 20 Jun 2025 23:59:54 +0000 (19:59 -0400)]
(peg--merge-error) <guard>: Add missing method

Also clarify that the package requires at least Emacs-25.

* lisp/progmodes/peg.el (peg--merge-error) <guard>: Add missing method.

(cherry picked from commit df86d10316e0e67c4c49161980b54907ed518f32)

3 weeks agoUse keyword :commit with full hashes for treesit-language-source-alist.
Juri Linkov [Fri, 20 Jun 2025 16:56:01 +0000 (19:56 +0300)]
Use keyword :commit with full hashes for treesit-language-source-alist.

* lisp/treesit.el (treesit-language-source-alist):
Document the format that uses keywords.
(treesit--install-language-grammar-1): Remove args
'revision', 'source-dir', 'cc', 'c++', 'commit'.
Use 'args' to process the keywords, and use the remaining
list as the previous list of arguments.
(treesit--install-language-grammar-1): Let-bind
'treesit--install-language-grammar-full-clone' and
'treesit--install-language-grammar-blobless' to t
when 'commit' is non-nil (bug#78542).

* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/typescript-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/html-ts-mode.el:
* lisp/textmodes/markdown-ts-mode.el:
* lisp/textmodes/toml-ts-mode.el:
* lisp/textmodes/yaml-ts-mode.el:
Use the keyword :commit with full hashes instead of tags
in 'treesit-language-source-alist'.

* lisp/treesit-x.el (define-treesit-generic-mode):
Simplify the keyword :copy-queries.
(gitattributes-generic-ts-mode, liquid-generic-ts-mode):
Add keywords :commit and :copy-queries to :source.

* admin/tree-sitter/treesit-admin.el
(treesit-admin--unversioned-treesit-language-source-alist):
Handle :revision and :commit as well.
(treesit-admin--find-latest-compatible-revision):
Process the keywords in the recipe.

(cherry picked from commit 1a76b527ac35de179530249f5defc6646c96129e)

3 weeks agoImprove eglot tests on emba
Michael Albinus [Fri, 20 Jun 2025 16:38:27 +0000 (18:38 +0200)]
Improve eglot tests on emba

* test/infra/gitlab-ci.yml (test-eglot): Use packages company and
yasnippet.

* test/lisp/progmodes/eglot-tests.el (eglot--call-with-timeout):
Skip on emba in case of timeout.  (Bug#78730)

(cherry picked from commit e3660a32c78885b9341531cd1b6a8b7e3e163255)

3 weeks agoRevert "Avoid excessively large backtraces in ert-tests (bug#71988)"
Pip Cet [Fri, 20 Jun 2025 14:03:40 +0000 (14:03 +0000)]
Revert "Avoid excessively large backtraces in ert-tests (bug#71988)"

This reverts commit 0264ab11181b1d49d8f07186599396d503f24d1f.

(cherry picked from commit 1bc86b17768231afcf14e9df08629088dbded428)

3 weeks agoMake tls tests use random port
Robert Pluim [Fri, 20 Jun 2025 10:09:14 +0000 (12:09 +0200)]
Make tls tests use random port

* test/lisp/net/network-stream-tests.el (server-process-filter):
Remove 'message' call.
(make-tls-server): Try random ports until we find one that's
unused and use it.  Adjust all callers.

(cherry picked from commit 1560e9bf66597b3bf7f389ed22ad4524ca89d4e2)

3 weeks ago; Improve previous change
Robert Pluim [Fri, 20 Jun 2025 10:01:59 +0000 (12:01 +0200)]
; Improve previous change

* test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): Resolve addresses once not
twice.

(cherry picked from commit 04a1a53de19e74e06aba5c05f73aa6b1fdccae4f)

3 weeks agoFix echo-server-with-dns for really broken systems
Robert Pluim [Fri, 20 Jun 2025 09:57:41 +0000 (11:57 +0200)]
Fix echo-server-with-dns for really broken systems

*test/lisp/net/network-stream-tests.el
(network-test--resolve-system-name): Check to see if we get any
address result at all (looking at you macOS).

(cherry picked from commit dcead54ed54d14420f5cee10b0e4a24bba244722)

3 weeks agoFix echo-server-with-dns test
Robert Pluim [Fri, 20 Jun 2025 09:43:13 +0000 (11:43 +0200)]
Fix echo-server-with-dns test

This test wasn't being run because the check for DNS was
inverted.

* test/lisp/net/network-stream-tests.el (echo-server-with-dns):
Use 'skip-when' instead of 'ert-skip'.

(cherry picked from commit 1c168e166df90e830dfdd780accc09630653d92f)

3 weeks agoAvoid excessively large backtraces in ert-tests (bug#71988)
Pip Cet [Mon, 8 Jul 2024 19:50:16 +0000 (19:50 +0000)]
Avoid excessively large backtraces in ert-tests (bug#71988)

* test/lisp/emacs-lisp/ert-tests.el (ert-test-run-tests-batch-expensive):
Temporarily make `cl-print-object' not print out vectors while running
the test.

(cherry picked from commit 0264ab11181b1d49d8f07186599396d503f24d1f)

3 weeks agoHave 'split-window' forget previous window height (Bug#78835)
Martin Rudalics [Fri, 20 Jun 2025 06:51:58 +0000 (08:51 +0200)]
Have 'split-window' forget previous window height (Bug#78835)

* lisp/window.el (split-window): When WINDOW has a
'quit-restore' parameter that specifies a previous height to
restore, remove that when splitting vertically.  It does more
harm than good now (Bug#78835).

(cherry picked from commit 60a567af8697dba07b59969196faa0e368a9764b)

3 weeks agoMake cl-random behave consistently for unusual arguments (bug#75105)
Pip Cet [Fri, 20 Jun 2025 06:01:41 +0000 (06:01 +0000)]
Make cl-random behave consistently for unusual arguments (bug#75105)

The old behavior was for (cl-random -1.0e+INF) to return NaN in about
one in eight million calls, and -1.0e+INF otherwise.  Other unusual
arguments were handled inconsistently as well.

* lisp/emacs-lisp/cl-extra.el (cl-random): Handle positive finite
arguments consistently, error for nonpositive or infinite arguments.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-random): New
test.

(cherry picked from commit b6cf7c094293589c6180fe5cee7405285d9a545d)

3 weeks agoEliminate redundant variable treesit-admin--builtin-language-sources
Peter Oliver [Wed, 11 Jun 2025 00:41:08 +0000 (01:41 +0100)]
Eliminate redundant variable treesit-admin--builtin-language-sources

Nowadays, each mode populates treesit-language-source-alist when the
mode is required; we do not need to duplicate the information.

* admin/tree-sitter/treesit-admin.el
(treesit-admin--builtin-language-sources)
(treesit-admin-verify-major-mode-queries)
(treesit-admin--generate-compatibility-report): Eliminate variable
treesit-admin--builtin-language-sources.
(treesit-admin--generate-compatibility-report): bash-ts-mode is “clever”
and switches back to sh-mode if it thinks the current buffer does not
contain a Bash script (bug#78747).
(treesit-admin--builtin-modes): Add missing modes.
(treesit-admin--builtin-features): New variable, telling us which
features to require to populate treesit-language-source-alist.
(treesit-admin--populated-treesit-language-source-alist): New function,
to add everything we know to treesit-language-source-alist.
(treesit-admin--unversioned-treesit-language-source-alist): Return a
copy of treesit-language-source-alist with the version requirements
removed.
* test/infra/Dockerfile.emba: Make use of
treesit-admin--populated-treesit-language-source-alist (bug#78748).

(cherry picked from commit 6181e0cec5158c5b66bf861c32e49674b2a110e9)

3 weeks ago; Skip commit e5646f7903cdc616c978988fce9609771d1e231b
Eshel Yaron [Sun, 22 Jun 2025 08:08:13 +0000 (10:08 +0200)]
; Skip commit e5646f7903cdc616c978988fce9609771d1e231b

3 weeks agoFix Bug#78797
Eshel Yaron [Sun, 22 Jun 2025 08:07:52 +0000 (10:07 +0200)]
Fix Bug#78797

3 weeks ago; * admin/MAINTAINERS: Fix whitespace.
Eli Zaretskii [Thu, 19 Jun 2025 05:02:15 +0000 (08:02 +0300)]
; * admin/MAINTAINERS: Fix whitespace.

(cherry picked from commit 564a8da53e8c674475555e10f374786724417c14)

3 weeks ago* admin/MAINTAINERS: Added myself as the vtable.el maintainer.
shipmints [Fri, 2 May 2025 15:17:00 +0000 (11:17 -0400)]
* admin/MAINTAINERS: Added myself as the vtable.el maintainer.

(cherry picked from commit 2de157f9934cb443952ad39c163eb083be20abba)

3 weeks ago; Fix last change
Michael Albinus [Wed, 18 Jun 2025 19:08:30 +0000 (21:08 +0200)]
; Fix last change

(cherry picked from commit e3e0be8786bcec162d150fa0029db45f8065b6a4)

3 weeks agoShow test name in ERT progress bar
Michael Albinus [Wed, 18 Jun 2025 18:12:55 +0000 (20:12 +0200)]
Show test name in ERT progress bar

* lisp/emacs-lisp/ert.el
(ert--results-progress-bar-button-help-echo): New defun.
(ert--results-progress-bar-button): Use it.

(cherry picked from commit 5310083ba07f1a0f97a96901846be08e98508e04)

3 weeks ago; Skip commit 318715105d05036a2e1307a57b4febcf15048912
Eshel Yaron [Sun, 22 Jun 2025 07:49:49 +0000 (09:49 +0200)]
; Skip commit 318715105d05036a2e1307a57b4febcf15048912

3 weeks agoRemove eieio's ...-list-p predicate (bug#78782)
Pip Cet [Wed, 18 Jun 2025 11:39:17 +0000 (11:39 +0000)]
Remove eieio's ...-list-p predicate (bug#78782)

There seem to be no remaining callers of this function, which has not
been working for a while.

* lisp/emacs-lisp/eieio-core.el (eieio-backward-compatibility): Don't
mention "-list-p" predicate.
(eieio-defclass-autoload): Don't autoload predicate.
(eieio-defclass-internal): Remove code to generate list-p predicate.

(cherry picked from commit af68c6e82556901b1d80600ee1cc5c785136e47b)

3 weeks ago; Fix customization and doc strings in pp.el
Eli Zaretskii [Mon, 16 Jun 2025 07:00:41 +0000 (10:00 +0300)]
; Fix customization and doc strings in pp.el

* lisp/emacs-lisp/pp.el (pp-default-function): Fix :tag's.
(pp-29, pp-28): Doc fixes.  (Bug#78801)

(cherry picked from commit a2bfce5d2a7d046a45c25364f3c69b3d8a776081)

3 weeks agoelisp-mode.el (xref-backend-definitions): Fix typo.
Eshel Yaron [Sun, 22 Jun 2025 07:47:16 +0000 (09:47 +0200)]
elisp-mode.el (xref-backend-definitions): Fix typo.

3 weeks agoUse treesit-thing-settings in python-ts-mode
Yuan Fu [Wed, 18 Jun 2025 00:44:23 +0000 (17:44 -0700)]
Use treesit-thing-settings in python-ts-mode

* lisp/progmodes/python.el (python--thing-settings): New variable.
(python-ts-mode): Setup treesit-thing-settings.

(cherry picked from commit 27a524602ff9899139e7f45e7607711c96a9b666)

3 weeks agoRemove obsolete tree-sitter type-regexp vars
Yuan Fu [Wed, 18 Jun 2025 00:33:08 +0000 (17:33 -0700)]
Remove obsolete tree-sitter type-regexp vars

* lisp/treesit.el (treesit-text-type-regexp):
(treesit-sexp-type-regexp):
(treesit-sentence-type-regexp): Remove variables.

(cherry picked from commit eb3f08935630e882abfc456440d340ae72969414)

3 weeks agoprocess-attributes uses CLOCK_BOOTTIME for uptime
Paul Eggert [Wed, 18 Jun 2025 00:07:30 +0000 (17:07 -0700)]
process-attributes uses CLOCK_BOOTTIME for uptime

* src/sysdep.c (get_host_uptime) [GNU_LINUX || CYGWIN || __ANDROID__]:
New function, replacing get_host_boot_time.
Use CLOCK_BOOTTIME instead of inspecting /proc/stat.
All callers changed.  This should be an even better way to fix Bug#63496.

(cherry picked from commit 037fb02135ab5b5d96e1167b9333d6a3a2acad11)

3 weeks agoprocess-attributes uses /proc/stat for boot time
Paul Eggert [Tue, 17 Jun 2025 19:23:41 +0000 (12:23 -0700)]
process-attributes uses /proc/stat for boot time

With a Linux kernel, use /proc/stat rather than get_boot_time
to get boot time, since when Emacs is running in a container
we want the underlying host boot time, not the container boot time.
This should be a better way to fix Bug#63496.
* src/sysdep.c: Do not include boot-time.h.
(get_host_boot_time) [GNU_LINUX || CYGWIN || __ANDROID__]:
New function.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use it instead of get_boot_time.

(cherry picked from commit 73cebbb87b72effb948f0d73e756a0dc0c55b71c)

3 weeks agoFix function arity check for noncompiled callees (bug#78685)
Mattias Engdegård [Tue, 17 Jun 2025 18:18:53 +0000 (20:18 +0200)]
Fix function arity check for noncompiled callees (bug#78685)

This fixes a regression from Emacs 29, and is the second attempt after
the later reverted 8b0f5b0597.

* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition):
Make it work for functions that aren't compiled.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--f):
(bytecomp-tests--warn-arity-noncompiled-callee): Add test.

(cherry picked from commit 3f720049614d825bd83d584e07d68e6461cf9708)

3 weeks ago* doc/lispref/functions.texi (Closures): Rewrite outdated text.
Mattias Engdegård [Tue, 17 Jun 2025 08:37:14 +0000 (10:37 +0200)]
* doc/lispref/functions.texi (Closures): Rewrite outdated text.

(cherry picked from commit eca2cc00b6688c5fde11c1ae23b0123966008938)

3 weeks agoFix regression in 'kill-this-buffer' (bug#78809)
Stephen Berman [Tue, 17 Jun 2025 14:08:32 +0000 (16:08 +0200)]
Fix regression in 'kill-this-buffer' (bug#78809)

This restores the ability to use 'kill-this-buffer' when a
keyboard event pops up the Global Menu.  Instead of raising an
error if the command was not called by a mouse event, an error is
now raised if it was not called from a menu or a tool bar.

* lisp/menu-bar.el (kill-this-buffer): Remove optional EVENT from
argument list and "e" code from interactive spec.  Adjust doc
string.  Use 'last-command-event' to determine if command was
called from a menu or a tool bar.  Use 'event--posn-at-point' in
test for frame.

* lisp/net/eudc-hotlist.el (eudc-hotlist-quit-edit):
* lisp/net/eudc.el (eudc-display-records, eudc-query-form):
* lisp/vc/pcvs.el (cvs-mode-map): Replace uses of
'kill-this-buffer' by 'kill-current-buffer'.

(cherry picked from commit 79e50ddb9ca8b9fd3c60ba324758e84d0b535e66)

3 weeks agoPrevent redisplay slowdown with non-zero vscroll
Eli Zaretskii [Tue, 17 Jun 2025 13:00:04 +0000 (16:00 +0300)]
Prevent redisplay slowdown with non-zero vscroll

* src/xdisp.c (try_scrolling): Don't loop when the
partially-visible cursor line is at the top of the window.  This
looping are pointless, and just makes redisplay slow for no reason.
(Bug#78766)

(cherry picked from commit 06b74b04cb86be6847bbee11e0060bf51c4a9ab5)

3 weeks agoMake nativecomp don't error when encountering undeclared types (bug#6573)
Andrea Corallo [Tue, 17 Jun 2025 07:06:45 +0000 (09:06 +0200)]
Make nativecomp don't error when encountering undeclared types (bug#6573)

* test/src/comp-resources/comp-test-funcs.el (comp-test-76573-1-f): New
function.
* lisp/emacs-lisp/comp-cstr.el (comp-supertypes): Don't error if 'type'
is unknown.

(cherry picked from commit f38e969e472284dbe475f6f3dbe6770d87588291)

3 weeks ago; Skip commit 376bd36f340b858a998ef0d43e5ebbd62149927a
Eshel Yaron [Wed, 18 Jun 2025 08:14:33 +0000 (10:14 +0200)]
; Skip commit 376bd36f340b858a998ef0d43e5ebbd62149927a

3 weeks agoAdd repeat map for tab-bar-history (bug#78804)
James Thomas [Mon, 16 Jun 2025 05:02:29 +0000 (10:32 +0530)]
Add repeat map for tab-bar-history (bug#78804)

Add repeat map similar to that of winner-mode (to which
tab-bar-history is an alternative).

* lisp/tab-bar.el (tab-bar-history-repeat-map): Make the change.

(cherry picked from commit a4ca0cd7f03c1cf0e7b1f3e0d49c4cf42fcacc90)

3 weeks agoprocess-attributes now uses get_boot_time
Paul Eggert [Sun, 15 Jun 2025 22:02:07 +0000 (15:02 -0700)]
process-attributes now uses get_boot_time

I noticed this issue while looking into Bug#63496.
GNU Emacs does not infer the boot time consistently on GNU/Linux
and similar platforms: android_notifications_notify_1 and
get_boot_sec use Gnulib’s boot-time module, but process-attributes
has idiosyncratic code that evidently predates that module.
The idiosyncratic code returns an unstable etime, which is a minor bug.
Simplify process-attributes by just using Gnulib.
This returns a stable etime.
It may also fix Bug#63496; if not, we can fix Gnulib later.
* src/sysdep.c: Include <boot-time.h>.
(get_up_time) [GNU_LINUX || CYGWIN || __ANDROID__]: Remove.
(system_process_attributes) [GNU_LINUX || CYGWIN || __ANDROID__]:
Use get_boot_time instead of get_up_time.

(cherry picked from commit 477112ebc3497e9529cc06b24134d85d17c642ee)

3 weeks ago* src/bytecode.c (exec_byte_code): Remove superfluous condition
Mattias Engdegård [Sun, 15 Jun 2025 14:08:26 +0000 (16:08 +0200)]
* src/bytecode.c (exec_byte_code): Remove superfluous condition

Bytecode should never be able to set anything to Qunbound because that
value is not accessible from Lisp.  Found by Pip Cet.

(cherry picked from commit ebdad09c5a0a822acb52ec58b3319d77d156f0ce)

3 weeks ago* src/fns.c (mapcar1): Less lax type checking
Mattias Engdegård [Sun, 15 Jun 2025 08:08:33 +0000 (10:08 +0200)]
* src/fns.c (mapcar1): Less lax type checking

Previously, mapcar etc would crash or return nonsense when passed a
record.  Found by Pip Cet.

(cherry picked from commit 08a7477d2205f4f4a9c6bcc184fdea060c33474b)

3 weeks agoImprove documentation of the internal Lisp_Process->status field
Steven Allen [Fri, 13 Jun 2025 14:51:37 +0000 (07:51 -0700)]
Improve documentation of the internal Lisp_Process->status field

Contrary to the existing documentation here, the value of this
field cannot be the symbols open or closed.  Furthermore, this
field is never set to "stop" for network connections.
* src/process.h (Lisp_Process): Improve/fix documentation of the
'status' field.  (Bug#78784)

(cherry picked from commit 4d88b925ba839fab9448915edcc699a6647df71c)

3 weeks ago; * src/profiler.c (export_log): Fix whitespace (bug#78762).
Eli Zaretskii [Sat, 14 Jun 2025 14:56:01 +0000 (17:56 +0300)]
; * src/profiler.c (export_log): Fix whitespace (bug#78762).

(cherry picked from commit 69254cd51a1cdf8a67f2c10421c098cf907c0125)

3 weeks agoFix segfault in profiler-cpu-log and profiler-memory-log (bug#78763)
Zach Shaftel [Wed, 11 Jun 2025 19:37:31 +0000 (15:37 -0400)]
Fix segfault in profiler-cpu-log and profiler-memory-log (bug#78763)

* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Doc fix.
* test/src/profiler-tests.el (profiler-tests-cpu-profiler)
(profiler-tests-memory-profiler): New tests.

(cherry picked from commit 009cdc8ae09ef060c030feac06578a4ba37cd8c5)

3 weeks agomailcap: Treat .ics files as text/calendar
Steven Allen [Wed, 11 Jun 2025 21:55:43 +0000 (14:55 -0700)]
mailcap: Treat .ics files as text/calendar

This ensures iCalendar attachments are always displayed correctly
(via `gnus-icalendar-mm-inline'), even when they have an incorrect
MIME type (looking at you Google Calendar).
* lisp/net/mailcap.el (mailcap-mime-extensions): Add a mapping from ".ics"
to "text/calendar".  (Bug#78764)

(cherry picked from commit e1d0ee1b6b545c82937755dd19787c3d7059eca3)

3 weeks ago; * lisp/time.el (world-clock--sort-entries): Avoid compiler warning.
Eli Zaretskii [Sat, 14 Jun 2025 14:21:18 +0000 (17:21 +0300)]
; * lisp/time.el (world-clock--sort-entries): Avoid compiler warning.

(cherry picked from commit 994f816ca8bac187e5f0d32cdf7343899acd7d7b)

3 weeks agoworld-clock: Add user option to control order of entries
Jacob S. Gordon [Tue, 3 Jun 2025 01:06:37 +0000 (21:06 -0400)]
world-clock: Add user option to control order of entries

* lisp/time.el (world-clock-sort-order): Add user option.
(world-clock--sort-entries): Add auxiliary sorting function.
(world-clock-display): Sort entries based on the new user option.
(Bug#78678)

(cherry picked from commit 9c6c7c4bb7c02d08a14fc6f5e2517f51a28e927c)

3 weeks agocalc: Allow strings with character codes above Latin-1
Jacob S. Gordon [Mon, 19 May 2025 19:05:37 +0000 (15:05 -0400)]
calc: Allow strings with character codes above Latin-1

The current behavior of the functions 'calc-display-strings',
'strings', and 'bstrings' is to skip any vector containing
integers outside the Latin-1 range (0x00-0xFF).  We introduce a
custom variable 'calc-string-maximum-character' to replace this
hard-coded maximum, and to allow vectors containing higher
character codes to be displayed as strings.  The default value
of 0xFF preserves the existing behavior.

* lisp/calc/calc.el (calc-string-maximum-character): Add custom
variable 'calc-string-maximum-character'.
* lisp/calc/calccomp.el (math-vector-is-string): Replace hard-coded
maximum with 'calc-string-maximum-character', and the 'natnump'
assertion with 'characterp'.  The latter guards against the
maximum being larger than '(max-char)', but not on invalid types of
the maximum such as strings.

* test/lisp/calc/calc-tests.el (calc-math-vector-is-string): Add
tests for 'math-vector-is-string' using different values of
'calc-string-maximum-character'.

* doc/misc/calc.texi (Quick Calculator, Strings, Customizing Calc):
Add variable definition for 'calc-string-maximum-character' and
reference thereof when discussing 'calc-display-strings'.
Generalize a comment about string display and availability of 8-bit
fonts.
(Bug#78528)

(cherry picked from commit 5bd9fa084dcf0ce8efaaf9212c24addec48d824f)

3 weeks ago; Fix warnings in MinGW builds
Eli Zaretskii [Sat, 14 Jun 2025 13:56:44 +0000 (16:56 +0300)]
; Fix warnings in MinGW builds

* src/w32fns.c (msh_mousewheel): Declare.
* src/treesit.c (treesit_debug_print_linecol): Fix format
specifiers.

* lib-src/pop.c (pfn_getaddrinfo, pfn_freeaddrinfo): Now static.

(cherry picked from commit 82766b71a45a691e19386422d3a12a3e0321b2e8)

3 weeks ago; Skip commit 1682a6b606097d24050efc318f74d738c3881fb4
Eshel Yaron [Wed, 18 Jun 2025 08:13:20 +0000 (10:13 +0200)]
; Skip commit 1682a6b606097d24050efc318f74d738c3881fb4

3 weeks agoAdd semantic linefeed support for paragraph filling
Roi Martin [Fri, 21 Mar 2025 13:22:46 +0000 (14:22 +0100)]
Add semantic linefeed support for paragraph filling

* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Add function
to fill a region using semantic linefeeds as if it were a single
paragraph.
(fill-paragraph-semlf): Add function to fill paragraph using semantic
linefeeds.
* test/lisp/textmodes/fill-tests.el
(fill-test-fill-region-as-paragraph-semlf)
(fill-test-fill-paragraph-semlf)
(fill-test-fill-paragraph-semlf-fill-paragraph-function)
(fill-test-fill-paragraph-semlf-justify)
(fill-test-fill-paragraph-semlf-sentence-end-double-space)
(fill-test-fill-paragraph-semlf-fill-column)
(fill-test-fill-paragraph-semlf-punctuation-marks)
(fill-test-fill-paragraph-semlf-twice)
(fill-test-fill-paragraph-semlf-fill-prefix)
(fill-test-fill-paragraph-semlf-indented-block)
(fill-test-fill-paragraph-semlf-revert)
(fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-fill-paragraph-semlf-c-mode)
(fill-test-fill-paragraph-semlf-org-mode)
(fill-test-fill-paragraph-semlf-markdown-mode): Add tests.
* test/lisp/textmodes/fill-resources/semlf-c-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-column.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-prefix.erts:
* test/lisp/textmodes/fill-resources/semlf-fill-region-as-paragraph.erts:
* test/lisp/textmodes/fill-resources/semlf-indented-block.erts:
* test/lisp/textmodes/fill-resources/semlf-justify.erts:
* test/lisp/textmodes/fill-resources/semlf-markdown-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-org-mode.erts:
* test/lisp/textmodes/fill-resources/semlf-punctuation-marks.erts:
* test/lisp/textmodes/fill-resources/semlf-revert.erts:
* test/lisp/textmodes/fill-resources/semlf-sentence-end-double-space.erts:
* test/lisp/textmodes/fill-resources/semlf-twice.erts:
* test/lisp/textmodes/fill-resources/semlf.erts: Add test data.  (Bug#78561)

(cherry picked from commit 24a699243e29649f1c126f56afaf4252fac95312)

3 weeks ago* doc/misc/rcirc.texi: Rephrase recent addition
Philip Kaludercic [Sat, 14 Jun 2025 13:22:06 +0000 (15:22 +0200)]
* doc/misc/rcirc.texi: Rephrase recent addition

https://lists.gnu.org/archive/html/emacs-devel/2025-06/msg00184.html
(cherry picked from commit d97ddce0aac5fc0e114e7274dd286c5909dced79)

3 weeks agoSupport 'C-g C-g C-g' "urgent quit" feature on MS-Windows
Eli Zaretskii [Sat, 14 Jun 2025 08:57:42 +0000 (11:57 +0300)]
Support 'C-g C-g C-g' "urgent quit" feature on MS-Windows

* src/w32fns.c (post_character_message): Support triple-C-g.
(Bug#78737)

(cherry picked from commit 3927402af0affcb13989a7afbacb5107badb9f80)

3 weeks ago; * doc/misc/rcirc.texi (Configuration): Fix cross-reference.
Eli Zaretskii [Sat, 14 Jun 2025 06:14:51 +0000 (09:14 +0300)]
; * doc/misc/rcirc.texi (Configuration): Fix cross-reference.

(cherry picked from commit d9aa098a32ff60f5e3cfef1b4672e2229a1725d5)

3 weeks agoNew user option: vc-allow-async-diff
Dmitry Gutov [Fri, 13 Jun 2025 03:00:17 +0000 (06:00 +0300)]
New user option: vc-allow-async-diff

Centralize the control for whether 'vc-diff' is asynchronous
across the backends, while also allowing 'vc-BACKEND-diff' to be
called asynchronously when needed.  Previously in bug#21969.

* lisp/vc/vc.el (vc-allow-async-diff): New user option.

* lisp/vc/vc.el (vc-version-diff, vc-diff, vc-diff-mergebase)
(vc-root-diff): Obey it.

* lisp/vc/log-view.el (log-view-diff-common): Same.

* lisp/vc/vc-annotate.el
(vc-annotate-show-diff-revision-at-line-internal): Same.

* lisp/vc/vc-git.el (vc-git-diff): Follow the ASYNC argument.

* lisp/vc/vc-hg.el (vc-hg-diff): Same.

* lisp/vc/vc-rcs.el (vc-rcs-diff): Same.

(cherry picked from commit bec823b107ef7d3b51b8e430ccab82c81bd63d24)

3 weeks agoAdd 'treesit-sexp-thing' to use instead of 'treesit-sexp-type-regexp'.
Juri Linkov [Thu, 12 Jun 2025 17:22:42 +0000 (20:22 +0300)]
Add 'treesit-sexp-thing' to use instead of 'treesit-sexp-type-regexp'.

* lisp/treesit.el (treesit-sexp-thing): New variable to use
instead of 'treesit-sexp-type-regexp'.
(treesit-sexp-thing-down-list): Rename from 'treesit-sexp-type-down-list'.
(treesit-sexp-thing-up-list): Rename from 'treesit-sexp-type-up-list'.
(treesit-forward-sexp, treesit--forward-list-with-default)
(treesit-down-list, treesit-up-list): Update references to the
above variables.
(treesit-cycle-sexp-thing): Rename from 'treesit-cycle-sexp-type'.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): Update same variables.

* lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Set these variables
instead of calling the function that sets them.

* lisp/progmodes/python.el (python-ts-mode): Check if variables
'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp' are bound.

https://lists.gnu.org/archive/html/emacs-devel/2025-06/msg00182.html
(cherry picked from commit 76f422da26b09a5d2646c0597871423f019a9573)

3 weeks ago; * lisp/vc/log-edit.el (log-edit-show-diff): Insert comma.
Sean Whitton [Thu, 12 Jun 2025 10:17:27 +0000 (11:17 +0100)]
; * lisp/vc/log-edit.el (log-edit-show-diff): Insert comma.

(cherry picked from commit 799cef5d94bb69d5a1b6bcc8e90819ed90edfd00)

3 weeks agovc-finish-logentry: Fix syncing buffers: include whole fileset
Sean Whitton [Thu, 12 Jun 2025 10:15:56 +0000 (11:15 +0100)]
vc-finish-logentry: Fix syncing buffers: include whole fileset

* lisp/vc/vc-dispatcher.el (log-edit-vc-backend)
(vc-buffer-sync-fileset): Declare.
(vc-finish-logentry): Call vc-buffer-sync-fileset instead of
just vc-buffer-sync.

(cherry picked from commit 651d4b11bcf227cd2f33bca0af5a5710101e9b39)

3 weeks agolog-edit-diff-fileset: Pass NOT-ESSENTIAL non-nil to vc-diff
Sean Whitton [Thu, 12 Jun 2025 10:14:49 +0000 (11:14 +0100)]
log-edit-diff-fileset: Pass NOT-ESSENTIAL non-nil to vc-diff

* lisp/vc/log-edit.el (log-edit-diff-fileset): Pass
NOT-ESSENTIAL non-nil to vc-diff.

(cherry picked from commit 28f40f79974245f6b144d09cc3df91c171834bf9)

3 weeks agoReplace vc-async-checkin-backends with a backend properties function
Sean Whitton [Thu, 12 Jun 2025 09:18:54 +0000 (10:18 +0100)]
Replace vc-async-checkin-backends with a backend properties function

* lisp/vc/vc-git.el (vc-git-async-checkins):
* lisp/vc/vc-hg.el (vc-hg-async-checkins):
* lisp/vc/vc.el (vc-default-async-checkins): New functions.
(vc-checkin): Use them.
(vc-async-checkin-backends): Delete.

(cherry picked from commit 932e413f8afb290fa38476b0f8a78c4073240ff5)

3 weeks ago; Fix char encoding in term-tests.el
Stephane Zermatten [Thu, 12 Jun 2025 08:10:05 +0000 (11:10 +0300)]
; Fix char encoding in term-tests.el

* test/lisp/term-tests.el (term-handle-osc): Fix unicode
characters using "\u" notation.  (Bug#78263)

(cherry picked from commit 3b7fc1b717321d44e283432a6942ec7109eb2093)

3 weeks ago; Fix last change.
Eli Zaretskii [Thu, 12 Jun 2025 07:04:51 +0000 (10:04 +0300)]
; Fix last change.

(cherry picked from commit 323ac96236cac34a4c63b4b9be8a7369650069a7)

3 weeks agoHandle OSC sequences in term (bug#78263)
Stephane Zermatten [Wed, 4 Jun 2025 18:00:42 +0000 (21:00 +0300)]
Handle OSC sequences in term (bug#78263)

Handlers can be registered to term-osc-handler, which by defaults,
supports OSC 0, 2, 7 and 8, using handlers defined in ansi-osc.
Unknown OSC sequences are ignored.

* lisp/term.el (term-emulate-terminal): Handle OSC sequences.
(term-osc-handler): New configuration variable.
(term-control-seq-regexp): Extended regexp.
(term--osc-max-bytes): New private constant.
* lisp/ansi-osc.el (ansi-osc-handler): Handle OSC 0 like OSC 2.
* test/lisp/term-tests.el (term-ignore-osc, term-handle-osc)
(term-call-ansi-osc-handlers): New tests.

(cherry picked from commit 6c13da2caf629b14853e9aa57e59aeeeec14e68f)

3 weeks ago; Skip commit 3939623d76baae16374937d865294577f86fc743
Eshel Yaron [Wed, 18 Jun 2025 08:11:21 +0000 (10:11 +0200)]
; Skip commit 3939623d76baae16374937d865294577f86fc743

3 weeks agoAdd simpler binds for calendar month/year navigation
Paul Nelson [Tue, 10 Jun 2025 09:33:05 +0000 (11:33 +0200)]
Add simpler binds for calendar month/year navigation

* lisp/calendar/calendar.el (calendar-mode-map): Add keybindings
'{' and '}' for month navigation, '[' and ']' for year
navigation (bug#78753).
* doc/emacs/calendar.texi (Calendar Unit Motion): Document
them.

(cherry picked from commit fbb77abc816844ccad761d246cfb833c424ae0b8)

3 weeks agoMake file-notify--call-handler more robust
Michael Albinus [Wed, 11 Jun 2025 17:20:43 +0000 (19:20 +0200)]
Make file-notify--call-handler more robust

* lisp/filenotify.el (file-notify--call-handler): Make it more
robust.  (Bug#78712)

(cherry picked from commit 81a3e4e51167be51c63eae682331210bc62f7280)

3 weeks agoNormalize URL path correctly for http
Robert Pluim [Tue, 10 Jun 2025 07:52:39 +0000 (09:52 +0200)]
Normalize URL path correctly for http

* lisp/url/url-http.el (url-http-create-request): Prepend "/" if
it's missing from the filename.  (Bug#78640)

(cherry picked from commit 7e62c2cf3aadb52397bcff8439d00084cd36afa0)

3 weeks agoInsert missing step to make use of directory tracking OSC codes
Sean Whitton [Wed, 11 Jun 2025 14:23:32 +0000 (15:23 +0100)]
Insert missing step to make use of directory tracking OSC codes

* doc/emacs/misc.texi (Interactive Shell): Say to add
comint-osc-process-output to comint-output-filter-function.

(cherry picked from commit df3fb94f09143285980348a3c6264ace913d3c73)

3 weeks ago; Skip commit 8be65cf6e02ffdc6396af61a13413c7065c832d9
Eshel Yaron [Wed, 18 Jun 2025 08:10:46 +0000 (10:10 +0200)]
; Skip commit 8be65cf6e02ffdc6396af61a13413c7065c832d9

3 weeks agoAmend CC Mode so that the test suite in XEmacs runs error free
Alan Mackenzie [Wed, 11 Jun 2025 13:43:50 +0000 (13:43 +0000)]
Amend CC Mode so that the test suite in XEmacs runs error free

* lisp/progmodes/cc-awk.el (awk-font-lock-keywords):
Reformulate this using backquote and ,@.  Only include the
entry for _" in Emacs.

* lisp/progmodes/cc-defs.el (c--mapcan, c--set-difference)
c--intersection, c--macroexpand-all, c--delete-duplicates): No
longer use the existence of cl-lib.el as the criterion for
what to expand to.
(c-min-property-position): Use c-next-single-property-change
rather than next-single-property-change.  This now works in
XEmacs.

* lisp/progmodes/cc-engine.el
(c-invalidate-sws-region-after-del)
(c-invalidate-sws-region-after-ins, c-forward-sws)
(c-backward-sws, c-find-decl-spots): Replace
next/previous-single-property-change by
c-next/previous-single-property-change to ensure functionality
in XEmacs.
(c-forward-sws, c-backward-sws): Handle NO-BREAKING-SPACE as
whitespace.  This corrects the error in hardspace.c in the test
suite.

* lisp/progmodes/cc-fonts.el (c-font-lock-ml-strings): Refactor
some nested `if's into a cond form.  Don't fontify multiline
string delimiters in XEmacs, in keeping with its string
conventions.

* lisp/progmodes/cc-langs.el (c-populate-syntax-table): Set the
syntax of NO-BREAKING-SPACE to whitespace rather than
punctuation.

* lisp/progmodes/cc-mode.el (c-before-change): Use
c-previous-single-property-change rather than
previous-single-property-change to ensure functionality in
XEmacs.

(cherry picked from commit 1468daf1d1b3ea2916384e4ae78050a9451a64d8)

3 weeks ago* lisp/keymap.el (keymap-set): Refer to 'key-description'. (Bug#78714)
Robert Pluim [Tue, 10 Jun 2025 07:48:20 +0000 (09:48 +0200)]
* lisp/keymap.el (keymap-set): Refer to 'key-description'.  (Bug#78714)

(cherry picked from commit 1bed29495836dab96fe642dbd6f4c1625c50b12a)

3 weeks agovc-next-action: Leave files unregistered if user aborts the checkin
Sean Whitton [Wed, 11 Jun 2025 10:28:24 +0000 (11:28 +0100)]
vc-next-action: Leave files unregistered if user aborts the checkin

* lisp/vc/vc.el (vc-only-files-state-and-model):
Don't call vc-register.
(vc-checkin): New REGISTER parameter.
Call vc-register when it's non-nil.
(vc-next-action): Pass new REGISTER parameter to vc-checkin.

(cherry picked from commit bf418cd836c40795ec4ee19de5c5742d3ca698ea)

3 weeks agoSupport new tree-sitter grammar filename format (bug#78754)
Yuan Fu [Wed, 11 Jun 2025 05:55:58 +0000 (22:55 -0700)]
Support new tree-sitter grammar filename format (bug#78754)

Previously Emacs only looks for filenames like
libtree-sitter-json.so.0.0.  Now Emacs also look for filenames
like libtree-sitter-json.so.15.0.

* src/treesit.c:
(treesit_load_language_push_for_each_suffix): Add versioned
candidate to candidate list too.

(cherry picked from commit 941158fc133f9722abbca8b89a0a346230b83998)

3 weeks ago* test/lisp/repeat-tests.el: Add a command for global continue.
Juri Linkov [Wed, 11 Jun 2025 06:43:45 +0000 (09:43 +0300)]
* test/lisp/repeat-tests.el: Add a command for global continue.

(repeat-tests-call-g): New command (bug#78742).
Put 'repeat-continue' with t on this symbol.
(repeat-tests-global-map): Bind it to 'C-M-g'.
(repeat-tests-continue-another): Add 'C-M-g' that should continue.

(cherry picked from commit de2daa74bd5304364931fd19ad81a94f5f7d8d09)

3 weeks agoImprove repeat-continue property handling
Paul Nelson [Tue, 10 Jun 2025 07:21:52 +0000 (09:21 +0200)]
Improve repeat-continue property handling

* lisp/repeat.el (repeat-get-map-sym): Support 'repeat-continue'
property value of t to continue any active repeat map (suggested
by Karthik Chikmagalur <karthikchikmagalur@gmail.com>).
Simplify logic so that repeat-continue does not interfere with
repeat-map activation.
(repeat-check-map): Allow commands with 'repeat-continue'
property value of t to continue without checking the key.
(repeat-mode): Update and tweak docstring.
* lisp/bind-key.el (bind-keys-form): Update handling of
':continue-only' keyword: only add keymap to 'repeat-continue'
if current value is a list.
(bind-keys): Update documentation, mirroring bind-keys-form.
* lisp/keymap.el (defvar-keymap): Update handling of ':continue'
keyword: only add keymap to 'repeat-continue' if current value
is a list.
* test/lisp/repeat-tests.el (repeat-tests-continue)
(repeat-tests-continue-another): Enable previously commented
tests that now work correctly.
* etc/NEWS: Update announcement of 'repeat-continue' (bug#78742).

(cherry picked from commit 3a0def802cf576902faafde404d15f079786a2f8)

3 weeks ago; Remove superfluous POSITION argument from 'visual-wrap--apply-to-line'
Jim Porter [Wed, 28 May 2025 17:16:02 +0000 (10:16 -0700)]
; Remove superfluous POSITION argument from 'visual-wrap--apply-to-line'

* lisp/visual-wrap.el (visual-wrap--apply-to-line): Remove POSITION and
just use point instead.  Update caller.

(cherry picked from commit 38c57855ae2b5d4245bce0bb444ee86c35dfcdc5)

3 weeks agoClean up text properties in 'visual-wrap-prefix-mode'
Jim Porter [Wed, 28 May 2025 16:44:34 +0000 (09:44 -0700)]
Clean up text properties in 'visual-wrap-prefix-mode'

Before refontifying a region, remove any text properties we care about
so that we don't end up with stray properties.  Additionally, make sure
to remove all the properties when deactivating the mode.

* lisp/emacs-lisp/subr-x.el (add-remove--display-text-property): New
function, extracted from...
(add-display-text-property): ... here.
(remove-display-text-property): New function.

* lisp/visual-wrap.el (visual-wrap--remove-properties): New function...
(visual-wrap-prefix-function, visual-wrap-prefix-mode): ... call it.

* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-test-remove-display-text-property): New test.

* test/lisp/visual-wrap-tests.el
(visual-wrap-tests/wrap-prefix-stickiness, visual-wrap-tests/cleanup):
New tests.

* doc/lispref/display.texi (Display Property): Document
'remove-display-text-property'.

* etc/NEWS: Announce 'remove-display-text-property' (bug#76018).

(cherry picked from commit 90c0c9a01ed11944c5502f809817a028a1096ee6)

3 weeks agoImprove documentation for display property functions
Jim Porter [Sat, 31 May 2025 19:11:01 +0000 (12:11 -0700)]
Improve documentation for display property functions

Specifically, use the term "display specification" more consistently to
distinguish from "display property", which is the full value of the
'display' text property.

* src/xdisp.c (find_display_property): Rename PROP to SPEC.
(Fget_display_property): Rename PROP to SPEC and improve docstring.

* lisp/emacs-lisp/subr-x.el (add-display-text-property): Rename PROP to
SPEC and improve docstring.

* doc/lispref/display.texi (Display Property): Reword documentation to
more-consistently refer to display specifications.

(cherry picked from commit 24e6cd42330c341f3525e3fdc384e4a646dec733)