]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 months agoImprove elixir-ts--thing-settings.
Juri Linkov [Thu, 1 May 2025 18:03:34 +0000 (21:03 +0300)]
Improve elixir-ts--thing-settings.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--thing-settings):
Add extra grouping "keywords" to named sexp nodes.
Add "," to anonymous sexp nodes.  Use bos/eos.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Use bos/eos for anonymous sexp nodes for better disambiguation.

* test/lisp/progmodes/heex-ts-mode-tests.el
(heex-ts-mode-test-indentation): Skip the test when 'elixir' is
missing since 'heex-ts-mode' depends on the 'elixir' grammar.

(cherry picked from commit cd557d6f6480cae81c39a451b2a2aaee720ba985)

2 months ago; * lisp/international/mule.el (define-coding-system): Doc fix.
Eli Zaretskii [Thu, 1 May 2025 18:02:39 +0000 (21:02 +0300)]
; * lisp/international/mule.el (define-coding-system): Doc fix.

(cherry picked from commit 7d02ffe87b401048fe10958cdc463f3bf7676ffd)

2 months agoAvoid adding duplicate items to 'treesit-language-source-alist'.
Juri Linkov [Thu, 1 May 2025 17:55:33 +0000 (20:55 +0300)]
Avoid adding duplicate items to 'treesit-language-source-alist'.

* lisp/textmodes/mhtml-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
Use 'add-to-list' on items in language-source-alist
that should check for duplicate items.

* test/infra/Dockerfile.emba: Move multi-language mhtml-ts-mode and
php-ts-mode to the end to give their dependent grammars a lower priority.

* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
Skip the test when 'jsdoc' is missing since 'js-ts-mode' depends
on the 'jsdoc' grammar.

(cherry picked from commit 5684a3808677fb701833c83325cd3bc8de475561)

2 months ago; Skip commit 311ea96ccfae813f5cb55a5bc9a13be19c0a4127
Eshel Yaron [Sat, 10 May 2025 06:54:37 +0000 (08:54 +0200)]
; Skip commit 311ea96ccfae813f5cb55a5bc9a13be19c0a4127

2 months agoImplement C23 features:
Alan Mackenzie [Thu, 1 May 2025 16:12:18 +0000 (16:12 +0000)]
Implement C23 features:

Improve the handling of #error and #warning in C and C++ Modes.

* lisp/progmodes/cc-engine.el (c-looking-at-c++-attribute)
(c-enclosing-c++-attribute, c-forward-sws, c-backward-sws):
Handle attributes in C as they have been handled in C++.
(c-forward-align-clause-throw-if-invalid): New macro.
(c-forward-type): Handle alignas, alignof, and _BitInt, putting
a catch block around most of the function to catch invalid uses
of these new keywords.
(c-in-id-arglist): New function.
(c-forward-decl-or-cast-1): Recognize a "maybe" type identifier
as a type in arglists when there is no parameter identifier
associated with it.

* lisp/progmodes/cc-fonts.el (c-font-lock-cpp-messages): New
function.
(c-cpp-matchers): Move the handling of "invalid" comment
delimiters outside of the block handling CPP directives.
Remove the inline handling of #error and #warning, using the
new function c-font-lock-cpp-messages instead.
(c-get-fontification-context): Handle alignof, alignas,
_BitInt.
(c-font-lock-declarations): Adapt fontification of K&R
parameters to the C23 nameless parameter scheme.

* lisp/progmodes/cc-langs.el (c-has-quoted-numbers)
(c-stmt-boundary-skip-chars)
(c-recognize-post-brace-list-type-p, c-modifier-kwds)
(c-constant-kwds): Handle C the same as the existing C++
handling.
(c-cpp-message-directives-re, noncontinued-line-end)
(c-cpp-messages-re, c-cpp-message-match-no): New
c-lang-consts/vars.
(c-cpp-include-directives): New directive embed.
(c-cpp-expr-directives): New directives elifdef, elifndef.
(c-primitive-type-kwds): New types, _Decimal*, bool, char*_t,
nullptr_t.
(c-typeof-kwds): New keyword typeof_unqual.
(c-type-with-paren-kwds, c-type-with-paren-key): New
c-lang-const/vars.
(c-type-modifier-with-parens-kwds)
(c-type-modifier-with-parens-key, c-type-internal-paren-kwds)
(c-type-internal-paren-key): New c-lang-const/vars.
(c-type-modifier-prefix-kwds, c-type-start-kwds): Amend with
the above new c-lang-consts.
(c-no-type-with-equals-kwds, c-no-type-with-equals-key): New
c-lang-const/vars.
(c-modifier-kwds): Add constexpr, auto, and thread_local to the
C value.
(c-paren-nontype-kwds): Add static_assert to the C value.
(c-constant-kwds): Add nullptr to the C value.
(c-regular-keywords-regexp): Include c-type-with-paren-kwds.
(c-recognize-nameless-type-decls): New c-lang-const/var.

* lisp/progmodes/cc-mode.el (c-leave-cc-mode-mode): Also clear
c-digit-separator properties.

(cherry picked from commit 8ddb8b0e45f150a5866c86af8ed2054b792761ff)

2 months ago; Fix last change
Michael Albinus [Thu, 1 May 2025 14:49:35 +0000 (16:49 +0200)]
; Fix last change

(cherry picked from commit b589fa9e23d896ce76b64016e0a5750f2131c393)

2 months ago; Fix wording of recently added documentation
Eli Zaretskii [Thu, 1 May 2025 14:42:12 +0000 (17:42 +0300)]
; Fix wording of recently added documentation

* lisp/window.el (display-buffer):
* doc/lispref/windows.texi (Buffer Display Action Alists): Fix wording.

(cherry picked from commit 75870a7ad184be7a8fe0a8e0497665a3b04cd6fa)

2 months ago; Fix sectioning of recent changes in the Emacs user manual
Eli Zaretskii [Thu, 1 May 2025 14:35:47 +0000 (17:35 +0300)]
; Fix sectioning of recent changes in the Emacs user manual

* doc/emacs/maintaining.texi (VC-Aware Project Backend):
* doc/emacs/emacs.texi (Top): Fix recent changes.

(cherry picked from commit 5cdcebc2ad0e55fa7b7e938a6860505a13f408bf)

2 months agoNew this-command buffer display action alist entry
Sean Whitton [Thu, 1 May 2025 12:55:56 +0000 (20:55 +0800)]
New this-command buffer display action alist entry

* lisp/subr.el (buffer-match-p): New this-command cons cell
condition to implement new this-command buffer display action
alist entry (bug#78082).
* lisp/window.el (display-buffer):
* doc/lispref/windows.texi (Buffer Display Action Alists):
* etc/NEWS: Document the new buffer display action alist entry.

(cherry picked from commit 343f0c44f35c41b93c66f67da0ddeceb98bbdb93)

2 months ago; Skip commit 7ae86074231159647d9bcb579dc5ea5a569acf0d
Eshel Yaron [Sat, 10 May 2025 06:53:28 +0000 (08:53 +0200)]
; Skip commit 7ae86074231159647d9bcb579dc5ea5a569acf0d

2 months agoImprove treesitter tests on emba
Michael Albinus [Thu, 1 May 2025 10:47:44 +0000 (12:47 +0200)]
Improve treesitter tests on emba

* test/infra/Dockerfile.emba (emacs-tree-sitter): Print language
versions.

* test/infra/gitlab-ci.yml (.job-template): Pass ${http_proxy},
${https_proxy} and ${no_proxy} to the docker call.
(.tree-sitter-template): Add some dependencies.

(cherry picked from commit ab67f684e92489da84bc6bb559e0d2dc0456d949)

2 months ago; Skip commit b9632a9049d07de3a0d6f0ae005a28b38825ff82
Eshel Yaron [Sat, 10 May 2025 06:53:15 +0000 (08:53 +0200)]
; Skip commit b9632a9049d07de3a0d6f0ae005a28b38825ff82

2 months agoImprove python-ts-mode fontification (bug#78129)
Jostein Kjønigsen [Thu, 20 Mar 2025 09:39:31 +0000 (10:39 +0100)]
Improve python-ts-mode fontification (bug#78129)

Fontification based on selectors & code-conventions:

- Lambda parameters: variable declarations
- For in statements: variable declarations
- Import statements: variable declerations
- Constants: All upper case alphanumerical identifiers
- Types: CamelCase alphanumerical identifiers
- Enums: Enum-values as constants.

* lisp/progmodes/python.el:
(python--treesit-settings): Improve queries.

(cherry picked from commit 2964d51c9cd9b55e60901069c378d0e8277d60f9)

2 months agoImprove csharp-ts-mode fontification (bug#78130)
Jostein Kjønigsen [Tue, 29 Apr 2025 12:23:56 +0000 (14:23 +0200)]
Improve csharp-ts-mode fontification (bug#78130)

Improves:
- fontification of generic types with namespace-prefixes
- function-call parameters
- variable use in string interpolation
- implicitly typed parameters in lambda-expressions
- index-expressions
- variables used in return-statements
- variables used in binary expressions

* lisp/progmodes/csharp-mode.el:
(csharp-ts-mode--font-lock-settings): Improve queries.

(cherry picked from commit 6c35ae082770c1bb875e870f83c3eff4a3197283)

2 months ago; Skip commit 15e77fe03a816e839a6af326cb7837518de0fd23
Eshel Yaron [Sat, 10 May 2025 06:52:56 +0000 (08:52 +0200)]
; Skip commit 15e77fe03a816e839a6af326cb7837518de0fd23

2 months agoFix compilation-mode matches for csharp-mode (bug#78128)
Jostein Kjønigsen [Fri, 25 Apr 2025 13:29:31 +0000 (15:29 +0200)]
Fix compilation-mode matches for csharp-mode (bug#78128)

* lisp/progmodes/csharp-mode.el:
(csharp-compilation-re-dotnet-error):
(csharp-compilation-re-dotnet-warning): Ignore leading whitespace.

(cherry picked from commit ebeaa728b66d0674fa499bf0bf2ae573ec9984aa)

2 months ago; Skip commit 1acb6454329ab66ef9f4b3f4a1937a7ab38121f7
Eshel Yaron [Sat, 10 May 2025 06:52:41 +0000 (08:52 +0200)]
; Skip commit 1acb6454329ab66ef9f4b3f4a1937a7ab38121f7

2 months ago; Skip commit eb6a50d3e3f3c348a7fbdb2dfcbf87425ca6e5cd
Eshel Yaron [Sat, 10 May 2025 06:52:11 +0000 (08:52 +0200)]
; Skip commit eb6a50d3e3f3c348a7fbdb2dfcbf87425ca6e5cd

2 months ago; Skip commit e1e052501b38e486343fc04fb5f5a6e29b3bcd11
Eshel Yaron [Sat, 10 May 2025 06:52:08 +0000 (08:52 +0200)]
; Skip commit e1e052501b38e486343fc04fb5f5a6e29b3bcd11

2 months ago(cl-types-of): Speed up by caching more of its work
David Ponce [Tue, 29 Apr 2025 14:48:37 +0000 (10:48 -0400)]
(cl-types-of): Speed up by caching more of its work

* lisp/emacs-lisp/cl-types.el (cl--type-parents): Make it a proper function.
(cl--type-children): Use `cl--class-children` and make it a `defsubst`.
(cl--type-dag): η-reduce and make it a `defsubst`.
(cl--type-undefine): Also reset `cl--type-error`.
(cl--type-deftype): Modify `cl--type-list` atomically so we never need
to restore it upon error.  Don't test bogus parent here.
(cl-deftype2): Test bogus parent here instead.  Also, better preserve
the declarations for the lambda.
(cl-types-of): Do less uncached work.

(cherry picked from commit 4323ff209f2f73ca4e6d389de69eb310988c0b1f)

2 months agolisp/emacs-lisp/cl-types.el: New file
Stefan Monnier [Mon, 28 Apr 2025 19:47:46 +0000 (15:47 -0400)]
lisp/emacs-lisp/cl-types.el: New file

* test/lisp/emacs-lisp/cl-types-tests.el: Also, new file.

(cherry picked from commit dfbeb7478ecd817f888927154858c380fb60390f)

2 months agoMinor cleanups
Eshel Yaron [Sat, 10 May 2025 06:50:13 +0000 (08:50 +0200)]
Minor cleanups

2 months agoEglot: tweak previous change (clear Flymake 'Wait' state)
João Távora [Wed, 30 Apr 2025 21:44:56 +0000 (22:44 +0100)]
Eglot: tweak previous change (clear Flymake 'Wait' state)

When we don't have anything to give to Flymake, we still want to
signal we're alive so the mode-line doesn't show a confusing
'Wait'.

* lisp/progmodes/eglot.el (eglot--report-to-flymake): Clear 'Wait'
state.

(cherry picked from commit dd5ae0f3ba56e762ae1265b0cb0fe9f2a28281ec)

2 months ago; Skip commit d6755ff1e146979731689585dc25a6e61fb4000e
Eshel Yaron [Thu, 1 May 2025 08:32:38 +0000 (10:32 +0200)]
; Skip commit d6755ff1e146979731689585dc25a6e61fb4000e

2 months ago; Skip commit ef5c7ec4990a603ff476e2266c31ea055ac0b609
Eshel Yaron [Thu, 1 May 2025 08:32:37 +0000 (10:32 +0200)]
; Skip commit ef5c7ec4990a603ff476e2266c31ea055ac0b609

2 months ago; Skip commit 4226eb2b20408ba49787195bbc59bb0066c9c9e4
Eshel Yaron [Thu, 1 May 2025 08:32:35 +0000 (10:32 +0200)]
; Skip commit 4226eb2b20408ba49787195bbc59bb0066c9c9e4

2 months ago; Skip commit b81f937e60b2fb499820e708d1ff4ba349df5f1a
Eshel Yaron [Thu, 1 May 2025 08:32:31 +0000 (10:32 +0200)]
; Skip commit b81f937e60b2fb499820e708d1ff4ba349df5f1a

2 months agoFix typo in bug#19867 correction (CC Mode indentation bugs)
Alan Mackenzie [Wed, 30 Apr 2025 18:51:37 +0000 (18:51 +0000)]
Fix typo in bug#19867 correction (CC Mode indentation bugs)

* lisp/progmodes/cc-align.el (c-lineup-item-after-paren-at-boi):
Replace an erroneous skip-syntax-backward with
skip-chars-backward.

(cherry picked from commit 766adfa8a731683c221630c3fee5aa5ace22428e)

2 months agoFix the match data in elisp-outline-search.
Juri Linkov [Wed, 30 Apr 2025 17:34:52 +0000 (20:34 +0300)]
Fix the match data in elisp-outline-search.

* lisp/progmodes/elisp-mode.el (elisp-outline-search):
Add 'save-match-data' since 'syntax-ppss' garbles the match data.

(cherry picked from commit b06046edcfceb6ba426880444894373f21ea4a79)

2 months ago* test/infra/Dockerfile.emba: Avoid duplication of tree-sitter data.
Juri Linkov [Wed, 30 Apr 2025 17:30:14 +0000 (20:30 +0300)]
* test/infra/Dockerfile.emba: Avoid duplication of tree-sitter data.

Require ts-mode files in order to add their tree-sitter grammar sources
to 'treesit-language-source-alist'.

(cherry picked from commit 85cd476a1408d2d87714d076144f9ad11cf3f31c)

2 months agoAdd python tree-sitter grammar data to 'treesit-language-source-alist'.
Juri Linkov [Wed, 30 Apr 2025 17:28:05 +0000 (20:28 +0300)]
Add python tree-sitter grammar data to 'treesit-language-source-alist'.

* lisp/progmodes/python.el (python-ts-mode):
Use 'treesit-ensure-installed' when it's fboundp.

(cherry picked from commit dbd168823794ef2173bb6eb894174bc0c1685cd9)

2 months ago; Skip commit 1284b6f1187be768e1af013339d7a228c6a8e84d
Eshel Yaron [Thu, 1 May 2025 08:32:05 +0000 (10:32 +0200)]
; Skip commit 1284b6f1187be768e1af013339d7a228c6a8e84d

2 months ago; Skip commit 826a83112964189b6049e288dbe8344a7362f29c
Eshel Yaron [Thu, 1 May 2025 08:31:57 +0000 (10:31 +0200)]
; Skip commit 826a83112964189b6049e288dbe8344a7362f29c

2 months ago; Skip commit b2904e064d023c3a6d19af58ffd8ce21342c794c
Eshel Yaron [Thu, 1 May 2025 08:31:44 +0000 (10:31 +0200)]
; Skip commit b2904e064d023c3a6d19af58ffd8ce21342c794c

2 months ago; Skip commit c43964d27aacc05be9cd6f42a1d8295a9b661551
Eshel Yaron [Thu, 1 May 2025 08:31:36 +0000 (10:31 +0200)]
; Skip commit c43964d27aacc05be9cd6f42a1d8295a9b661551

2 months ago; Skip commit 0fc6bd5c76a5e55401cf086e3b8fc6ed8eb32b94
Eshel Yaron [Thu, 1 May 2025 08:31:28 +0000 (10:31 +0200)]
; Skip commit 0fc6bd5c76a5e55401cf086e3b8fc6ed8eb32b94

2 months ago; Skip commit 1143a5273860fd6402aaf3fb6e1df39c31a3cc41
Eshel Yaron [Thu, 1 May 2025 08:30:51 +0000 (10:30 +0200)]
; Skip commit 1143a5273860fd6402aaf3fb6e1df39c31a3cc41

2 months ago; Skip commit 3044d16b81b80e79339faf30560d4db4c59b3a97
Eshel Yaron [Thu, 1 May 2025 08:30:29 +0000 (10:30 +0200)]
; Skip commit 3044d16b81b80e79339faf30560d4db4c59b3a97

2 months ago; Skip commit 573b377e8c57d60ea4fa881641ed0f851858fe8e
Eshel Yaron [Thu, 1 May 2025 08:30:12 +0000 (10:30 +0200)]
; Skip commit 573b377e8c57d60ea4fa881641ed0f851858fe8e

2 months ago; Skip commit 215246108e1d35f5172c76549c71ffae901ab840
Eshel Yaron [Thu, 1 May 2025 08:29:05 +0000 (10:29 +0200)]
; Skip commit 215246108e1d35f5172c76549c71ffae901ab840

2 months ago; Skip commit 3bc1c13661a334fedd8967188715cf85ef2af992
Eshel Yaron [Thu, 1 May 2025 08:28:48 +0000 (10:28 +0200)]
; Skip commit 3bc1c13661a334fedd8967188715cf85ef2af992

2 months ago; Skip commit fcaec1ff0d6be18d4fa3682401ced30741be6243
Eshel Yaron [Thu, 1 May 2025 08:28:43 +0000 (10:28 +0200)]
; Skip commit fcaec1ff0d6be18d4fa3682401ced30741be6243

2 months ago; Skip commit 44069711e87c3a56f36a917ee46d673f77e0c733
Eshel Yaron [Thu, 1 May 2025 08:28:30 +0000 (10:28 +0200)]
; Skip commit 44069711e87c3a56f36a917ee46d673f77e0c733

2 months ago; Skip commit 30b9694f2af20ccb25b4994a71b805f597448630
Eshel Yaron [Thu, 1 May 2025 08:27:51 +0000 (10:27 +0200)]
; Skip commit 30b9694f2af20ccb25b4994a71b805f597448630

2 months ago; Skip commit e760e580191dd82890f8653f5538a2a7378ff26d
Eshel Yaron [Thu, 1 May 2025 08:27:03 +0000 (10:27 +0200)]
; Skip commit e760e580191dd82890f8653f5538a2a7378ff26d

2 months ago; Improve last change
Eli Zaretskii [Wed, 30 Apr 2025 13:08:15 +0000 (16:08 +0300)]
; Improve last change

* lisp/international/fontset.el (script-representative-chars):
Improve last change by adding more representative chars.

(cherry picked from commit cb701f95c61e95298fb7d06f9f98f017dadfbcfe)

2 months agoImprove support for Avestan, Old Turkic, and Chakma
Werner Lemberg [Wed, 30 Apr 2025 12:31:31 +0000 (14:31 +0200)]
Improve support for Avestan, Old Turkic, and Chakma

* lisp/international/fontset.el (script-representative-chars,
  setup-default-fontset): Add support for Avestan, Old Turkic, and Chakma.

(cherry picked from commit 9c98b6cbd37fb3d73424702b8a175e5f323b1c2d)

2 months agoFix compilation errors in emacsclient.c with MinGW GCC 15
Eli Zaretskii [Wed, 30 Apr 2025 11:06:44 +0000 (14:06 +0300)]
Fix compilation errors in emacsclient.c with MinGW GCC 15

* lib-src/emacsclient.c (set_fg, get_wc): Declare using actual
function signatures.
(w32_give_focus): Cast return value of 'GetProcAddress' to correct
pointer types.  (Bug#78160)

(cherry picked from commit 6c2aaedfcebb310e0c948d6972f90cc7d96193f9)

2 months agocperl-mode-map: Don't bind C-j
Sean Whitton [Wed, 30 Apr 2025 09:28:04 +0000 (17:28 +0800)]
cperl-mode-map: Don't bind C-j

* lisp/progmodes/cperl-mode.el (cperl-mode-map): Don't bind C-j.
The default global mode bindings will DTRT depending on whether
or not electric-indent-mode is on.

(cherry picked from commit 606e7b73bacb282d3de0d626c9c62281cde4ea57)

2 months ago; * etc/DEBUG: Add link to GCC bug #78685.
Sean Whitton [Wed, 30 Apr 2025 09:12:50 +0000 (17:12 +0800)]
; * etc/DEBUG: Add link to GCC bug #78685.

(cherry picked from commit d56e5ba97ee49bc7d82ad21e35ac8fbc21a0b0e1)

2 months agoFix custom type of 'flymake-show-diagnostics-at-end-of-line'
Robert Pluim [Wed, 30 Apr 2025 08:52:28 +0000 (10:52 +0200)]
Fix custom type of 'flymake-show-diagnostics-at-end-of-line'

*
lisp/progmodes/flymake.el (flymake-show-diagnostics-at-end-of-line):
Add 'fancy' value to custom type.

* etc/NEWS: "variable" -> "user option".

(Bug#78148)

(cherry picked from commit 9b560a54c3b5c04c683124db44b53ae005b36729)

2 months ago; Fix key notation in Introduction to Emacs Lisp
Eli Zaretskii [Wed, 30 Apr 2025 06:03:17 +0000 (09:03 +0300)]
; Fix key notation in Introduction to Emacs Lisp

* doc/lispintro/emacs-lisp-intro.texi (Typing Lists)
(Note for Novices): Fix notation of 'M-C-\'.  (Bug#78153)

(cherry picked from commit 80cbd1e31cc360ee26d462e62a253f8b54807a65)

2 months ago; Skip commit b1407b41a16c4a3ec15c88be91ba0ae1e65c212e
Eshel Yaron [Thu, 1 May 2025 08:26:00 +0000 (10:26 +0200)]
; Skip commit b1407b41a16c4a3ec15c88be91ba0ae1e65c212e

2 months ago* doc/misc/efaq-w32.texi (Location of init file): Fix typo.
Eshel Yaron [Thu, 1 May 2025 08:24:24 +0000 (10:24 +0200)]
* doc/misc/efaq-w32.texi (Location of init file): Fix typo.

2 months ago; * lisp/files.el (revert-buffer-restore-functions): Doc fix (bug#78124).
Eli Zaretskii [Tue, 29 Apr 2025 18:28:01 +0000 (21:28 +0300)]
; * lisp/files.el (revert-buffer-restore-functions): Doc fix (bug#78124).

(cherry picked from commit 1224e5fd961ba53a5d6aba46e3c92a2fd047a165)

2 months agoIgnore parens in strings for outline headings in emacs-lisp-mode.
Juri Linkov [Tue, 29 Apr 2025 16:55:48 +0000 (19:55 +0300)]
Ignore parens in strings for outline headings in emacs-lisp-mode.

* lisp/outline.el (outline-font-lock-keywords): For non-nil
outline-search-function return a lambda that calls the function,
then sets the match data to the end of the line that is equivalent
to adding ".*" in the regexp.  Then search functions don't need to
match ".*" themselves.

* lisp/progmodes/elisp-mode.el (elisp-outline-search):
New function to skip leading parens in strings when searching
for outline headings.
(emacs-lisp-mode): Set buffer-local 'outline-search-function' to
'elisp-outline-search'.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00934.html

(cherry picked from commit 746a3cb3143194436c4a1a63d26aac890c1a705f)

2 months agoFix invalid search bound in 'search-within-boundaries'.
Juri Linkov [Tue, 29 Apr 2025 16:41:44 +0000 (19:41 +0300)]
Fix invalid search bound in 'search-within-boundaries'.

* lisp/isearch.el (search-within-boundaries): Don't go over BOUND.

* test/lisp/isearch-tests.el (isearch--test-search-within-boundaries):
Test with the BOUND arg as well (bug#78116).

(cherry picked from commit 9d0595d8795fbd604c6429317daff4d6445f8904)

2 months agoRespect point when changing direction after isearch scrolling.
Juri Linkov [Tue, 29 Apr 2025 16:35:30 +0000 (19:35 +0300)]
Respect point when changing direction after isearch scrolling.

* lisp/isearch.el (isearch-repeat): Don't go to isearch-other-end
on changing direction after scrolling (bug#78074).

(cherry picked from commit 622825995204b7aae70b836c8e5e5d44385c401b)

2 months agoFlymake: promptly delete eol overlay if source overlay changed
João Távora [Tue, 29 Apr 2025 11:34:10 +0000 (12:34 +0100)]
Flymake: promptly delete eol overlay if source overlay changed

In the vast majority of cases, changing the source overlay
invalidates the content of the end-of-line overlay, so best to
delete it asap.

* lisp/progmodes/flymake.el (flymake--delete-overlay): Use
'flymake--eol-ov'
(flymake--highlight-line): Use some overlay modification hooks.

(cherry picked from commit 825ea052ad5638c056037c4cac92c9e666dc3820)

2 months agoEglot: improve diagnostic-reporting performance
João Távora [Tue, 29 Apr 2025 11:20:51 +0000 (12:20 +0100)]
Eglot: improve diagnostic-reporting performance

After a change in the buffer has occured, it is often the case
that Flymake is quicker to ask for diagnostics than the server
is to supply them to us.  If we're still stuck with old outdated
diagnostics, don't forward them to Flymake, even if it eagerly
asks us for them.

* etc/EGLOT-NEWS (Changes in upcoming Eglot): Announce changes.

* lisp/progmodes/eglot.el
(eglot--diagnostics): Rework.
(eglot--report-to-flymake): Also take version.
(eglot-handle-notification textDocument/publishDiagnostics)
(eglot--managed-mode)
(eglot-flymake-backend): Tweak call to eglot--report-to-flymake.

(cherry picked from commit 7ae275f04c46e1724fafd8c8aa2f3eed5771df1c)

2 months ago; Improve documentation of 'format-time-string'
Eli Zaretskii [Tue, 29 Apr 2025 08:19:19 +0000 (11:19 +0300)]
; Improve documentation of 'format-time-string'

* doc/lispref/os.texi (Time Parsing): Fix documentation of week
numbers for %U, %V and %W.  (Bug#78096)

(cherry picked from commit 79e7eeb32964ba79f0d0ef06c9c0d7c16c542f37)

2 months ago; * lisp/textmodes/text-mode.el (text-mode-variant): Fix last change.
Eli Zaretskii [Tue, 29 Apr 2025 07:47:35 +0000 (10:47 +0300)]
; * lisp/textmodes/text-mode.el (text-mode-variant): Fix last change.

(cherry picked from commit 2838b64fc8b71d2a534fcf01e02a20066d99e2b3)

2 months ago; Improve obsolescence of 'text-mode-variant'
Eli Zaretskii [Tue, 29 Apr 2025 07:09:54 +0000 (10:09 +0300)]
; Improve obsolescence of 'text-mode-variant'

* lisp/textmodes/text-mode.el (text-mode-variant): Improve
obsolescence announcement text.

* doc/lispref/modes.texi (Example Major Modes): Update example.
(Bug#78125).

(cherry picked from commit 9adb05422eaaa290a6a0542ba8862b806b34fe7c)

2 months ago; * lisp/files.el (revert-buffer-restore-functions): Doc fix.
Eli Zaretskii [Tue, 29 Apr 2025 06:39:34 +0000 (09:39 +0300)]
; * lisp/files.el (revert-buffer-restore-functions): Doc fix.

(cherry picked from commit 4858d81848839c9167a523e4b566dbb253e566c6)

2 months ago; Mention early-init file in Emacs FAQ for Windows
Eli Zaretskii [Tue, 29 Apr 2025 06:05:28 +0000 (09:05 +0300)]
; Mention early-init file in Emacs FAQ for Windows

* doc/misc/efaq-w32.texi (Location of init file, Init file):
Mention the early-init file.  Suggested by David Hedlund
<davidh@gnu.org>.

(cherry picked from commit 2a8e223b8d7c8e18a10ced98f5b794c4de9737e6)

2 months ago; Isearch: Fix key bindings in docstrings
Jake Forster [Mon, 28 Apr 2025 12:52:18 +0000 (22:22 +0930)]
; Isearch: Fix key bindings in docstrings

* lisp/isearch.el (isearch-allow-motion)
(isearch-motion-changes-direction): Use isearch-mode-map for
commands in docstrings (bug#78118).

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

2 months ago; (completion--file-name-table): Minor cleanup.
Eshel Yaron [Tue, 29 Apr 2025 21:11:58 +0000 (23:11 +0200)]
; (completion--file-name-table): Minor cleanup.

2 months agoUpdate tree-sitter subroutine in Fsubst_char_in_region
Yuan Fu [Sat, 15 Mar 2025 05:56:18 +0000 (22:56 -0700)]
Update tree-sitter subroutine in Fsubst_char_in_region

Some explanation: Fsubst_char_in_region used to have a branch,
one branch path calls replace_range, one branch path modifies
the buffer directly.  replace_range already calls
treesit_record_change within it, so we needed to make sure we
only call treesit_record_change in the other branch path.

After I added the call to treesit_record_change, some changes
are made to Fsubst_char_in_region, and the branch was removed.
So no wonder Stefan had the confusion and wrote the FIXME note.

Now that the branch is gone, we can indeed call
treesit_record_change in the end like signal_after_change.

* src/editfns.c (Fsubst_char_in_region): Move to end.

(cherry picked from commit 3c47139b8f602286a8c5c5ca72431b933b4f2a23)

2 months ago; * lisp/cus-edit.el: Fix a typo in a comment.
Eli Zaretskii [Tue, 29 Apr 2025 05:07:33 +0000 (08:07 +0300)]
; * lisp/cus-edit.el: Fix a typo in a comment.

(cherry picked from commit d2c7d8ff6727d160e9e3a17d3775230281f8fb2d)

2 months ago* lisp/progmodes/grep.el (grep-hello-file): Fix another typo.
Po Lu [Tue, 29 Apr 2025 04:54:50 +0000 (12:54 +0800)]
* lisp/progmodes/grep.el (grep-hello-file): Fix another typo.

(cherry picked from commit 8970c9589bfb9b89d2e302cf70374a8cb7bb6c81)

2 months ago* lisp/progmodes/grep.el (grep-hello-file): Fix typos.
Po Lu [Tue, 29 Apr 2025 04:53:51 +0000 (12:53 +0800)]
* lisp/progmodes/grep.el (grep-hello-file): Fix typos.

(cherry picked from commit ac40a65f75a132e47e0d4c68e7ca8b2247153b3c)

2 months agoNew log-edit-maybe-show-diff option for log-edit-hook
Sean Whitton [Mon, 28 Apr 2025 13:32:12 +0000 (21:32 +0800)]
New log-edit-maybe-show-diff option for log-edit-hook

* lisp/vc/log-edit.el (log-edit-maybe-show-diff): New function.
(log-edit-hook): Add it as an option.
(log-edit-diff-function):
* etc/NEWS: Document it.

(cherry picked from commit b9886bb2069b3803fbd5ddd51fa3375b0becc0f1)

2 months agolog-edit-diff-function leaves the diff-mode buffer's window selected
Sean Whitton [Mon, 28 Apr 2025 12:45:44 +0000 (20:45 +0800)]
log-edit-diff-function leaves the diff-mode buffer's window selected

This reverts the following two changesets:

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Oct 29 09:40:02 2024 +0800

      Fix window selection after log-edit-show-diff

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Apr 8 20:36:42 2025 +0800

      Fix window selection after log-edit-show-diff, again

This also replaces the following changeset:

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Oct 29 12:52:20 2024 +0800

      * lisp/vc/log-edit.el (log-edit-diff-function): Document.

* lisp/vc/log-edit.el (log-edit-diff-function): Document that
the function *should* leave the window selected when it returns.
(log-edit-diff-fileset):
* lisp/vc/vc.el (vc-modify-change-comment):
Don't use save-selected-window (bug#77946).
(vc-diff-patch-string):
Call pop-to-buffer, not display-buffer (bug#77946).

(cherry picked from commit d44c87ceb6dc7e85ccfecf47f52f8495e34c1d0b)

2 months agoPort Grep argument autodetection to Android
Po Lu [Tue, 29 Apr 2025 00:28:16 +0000 (08:28 +0800)]
Port Grep argument autodetection to Android

* lisp/progmodes/grep.el (grep-hello-file): On Android, copy
sample text to a real directory.

(cherry picked from commit 3279194bf2c859e76c95045c80a033fc54094f07)

2 months agoImprove env var handling in read-file-name
Spencer Baugh [Mon, 14 Apr 2025 20:01:38 +0000 (16:01 -0400)]
Improve env var handling in read-file-name

Fix various bugs, including bug#77718, by rewriting the way file
name completion handles environment variable expansion.  Instead
of using completion-table-with-quoting to manipulate the string
being completed on, simply make the completion table itself
understand substitute-in-file-name.

Tests are updated: partial-completion now preserves unexpanded
environment variables.  However, partial-completion no longer
works across environment variables containing delimiters; that's
an acceptable sacrifice.

* lisp/minibuffer.el (completion--sifn-boundaries): Add.
(completion--file-name-table): Rewrite to use
substitute-in-file-name explicitly. (bug#77718)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Update.

(cherry picked from commit 509cbe1c35b3dd005a53ac041f9c87ee53b8e115)

2 months agoDon't escape "." in `prin1' when followed by a letter
Spencer Baugh [Tue, 4 Jun 2024 14:35:10 +0000 (10:35 -0400)]
Don't escape "." in `prin1' when followed by a letter

Among other users, let-alist widely uses symbols which start with a ".".
Make those symbols print more nicely by tweaking the escaping rules in
print_object to not escape a leading "." followed by a letter.  This is
a conservative change to avoid constraining future lexer changes.

This is a followup to 637dde4aba921435f78d0de769ad74c4f3230aa6, which
removed some unnecessary escaping of "." and "?" when printing symbols
in prin1.  (Actually, if we always escaped "?" (which was the case
before 637dde4aba92) then "." only ever needs to be escaped when
string_to_number returns non-nil.  So 637dde4aba92 could have just
dropped the escaping of "." with no other changes, if it didn't also
remove escaping of "?")

* src/print.c (print_object): Don't escape "." as the first
character in a symbol if followed by a letter. (bug#77656).
* test/src/print-tests.el (test-dots): Update for new behavior.

(cherry picked from commit 21e340494a5a832453999d3853839db5d8a4d865)

2 months ago(Custom-dirlocals-mode): Let `define-derived-mode` do its job
Stefan Monnier [Mon, 28 Apr 2025 17:35:09 +0000 (13:35 -0400)]
(Custom-dirlocals-mode): Let `define-derived-mode` do its job

* lisp/cus-edit.el (Custom-dirlocals-mode-map): Rename from
`custom-dirlocals-map`.
(Custom-dirlocals-menu): Adjust accordingly.
(Custom-dirlocals-mode): Let `define-derived-mode` do its job.
Use `run-mode-hooks`.

(cherry picked from commit a0f26f3eaf1ccde728806003932dc9e44ef07e9d)

2 months ago; Fix previous change
Michael Albinus [Mon, 28 Apr 2025 06:22:09 +0000 (08:22 +0200)]
; Fix previous change

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-handling): Rename.

(cherry picked from commit c801856820c17247416846ac565b81268b4aca16)

2 months agourl-parse.el: correct code for Windows paths (bug#76982)
Sebastián Monía [Mon, 28 Apr 2025 06:19:06 +0000 (08:19 +0200)]
url-parse.el: correct code for Windows paths (bug#76982)

* lisp/url/url-parse.el (url-recreate-url): Handle empty filenames
without errors.

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-hanlding): Add one
more test for the scenario above.

(cherry picked from commit bc5afe421b47ec31ce94ad8dc02912acd93c3319)

2 months ago; project-vc-include-unregistered: Add FIXME about renaming.
Sean Whitton [Mon, 28 Apr 2025 02:46:48 +0000 (10:46 +0800)]
; project-vc-include-unregistered: Add FIXME about renaming.

(cherry picked from commit c0491a8b807b6b2dae27fd4749c101915bd04e53)

2 months ago; * doc/emacs/maintaining.texi (VC-Aware Project Backend): Copyedit.
Sean Whitton [Mon, 28 Apr 2025 02:46:10 +0000 (10:46 +0800)]
; * doc/emacs/maintaining.texi (VC-Aware Project Backend): Copyedit.

(cherry picked from commit 56baa23e1afedd4c1f2ead47b28d39b646f4275a)

2 months agoFix ruby lint output regexps
Tim Landscheidt [Mon, 28 Apr 2025 00:05:22 +0000 (03:05 +0300)]
Fix ruby lint output regexps

* doc/misc/flymake.texi (An annotated example backend):
Fix regexp.

* lisp/progmodes/ruby-mode.el (ruby-flymake-simple)
(ruby-flymake-rubocop): Fix regexp
(https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00851.html).

(cherry picked from commit 4765a3b3f2b83e6a2ba4e63f78bec16dc8ca737f)

2 months ago* doc/emacs/maintaining.texi (VC-Aware Project Backend):
Dmitry Gutov [Sun, 27 Apr 2025 22:41:40 +0000 (01:41 +0300)]
* doc/emacs/maintaining.texi (VC-Aware Project Backend):

* doc/emacs/maintaining.texi (VC-Aware Project Backend):
New node (bug#77974).
(Projects): Use "backend" instead of "back-end".

(cherry picked from commit 568a4894a8d7cc61c7a4cf416939e01fb78f0ead)

2 months agoFix the Android build
Po Lu [Sun, 27 Apr 2025 13:08:48 +0000 (21:08 +0800)]
Fix the Android build

* java/README.res: Move from java/res/README, as the AAPT does
not permit non-resource files in resource directories.

(cherry picked from commit aa1b55d5210f4c8ad83a0e8c2367e8691d785fa7)

2 months ago; Skip commit d394cd73d1b21bd1f6d1679c2fcbb10433477092
Eshel Yaron [Tue, 29 Apr 2025 07:32:15 +0000 (09:32 +0200)]
; Skip commit d394cd73d1b21bd1f6d1679c2fcbb10433477092

2 months ago; * doc/misc/ert.texi (Introduction): Be more Lisp-specific.
Sean Whitton [Sun, 27 Apr 2025 03:59:17 +0000 (11:59 +0800)]
; * doc/misc/ert.texi (Introduction): Be more Lisp-specific.

(cherry picked from commit b5967dda32dd9091389e30d8aaa46bdf8319d3e8)

2 months agoInclude additional version metadata during Windows install
Sean Bright [Wed, 2 Apr 2025 17:52:06 +0000 (13:52 -0400)]
Include additional version metadata during Windows install

* admin/nt/dist-build/emacs.nsi: Add DisplayIcon, DisplayVersion, and
  Publisher values to the Uninstall registry key.

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

2 months agoSimplify (if COND nil BODY) to (unless COND BODY)
Eshel Yaron [Tue, 29 Apr 2025 07:27:46 +0000 (09:27 +0200)]
Simplify (if COND nil BODY) to (unless COND BODY)

2 months agoscope.el: Recognize 'add/remove/get-variable-watcher(s)'.
Eshel Yaron [Tue, 29 Apr 2025 07:26:05 +0000 (09:26 +0200)]
scope.el: Recognize 'add/remove/get-variable-watcher(s)'.

2 months ago(mm-display-inline-fontify): Set trust after major mode.
Eshel Yaron [Sun, 27 Apr 2025 19:26:11 +0000 (21:26 +0200)]
(mm-display-inline-fontify): Set trust after major mode.

2 months agoDrop Viper
Eshel Yaron [Sun, 27 Apr 2025 19:25:22 +0000 (21:25 +0200)]
Drop Viper

2 months agoFlymake: Experimental 'fancy' flymake-show-diagnostics-at-end-of-line
João Távora [Sun, 27 Apr 2025 12:00:28 +0000 (13:00 +0100)]
Flymake: Experimental 'fancy' flymake-show-diagnostics-at-end-of-line

* doc/misc/flymake.texi (Customizable variables): Describe new
flymake-show-diagnostics-at-end-of-line.

* etc/NEWS: Mention 'flymake-show-diagnostics-at-end-of-line'.

* lisp/progmodes/flymake.el
(flymake-show-diagnostics-at-end-of-line): Update docstring.

* lisp/progmodes/flymake.el (flymake--eol-overlay-summary):
Rework.  Move to separate section.
(flymake--update-eol-overlays): Rework.  Use 'display'.  Move to
separate section.
(flymake--eol-draw-fancy-1, flymake--eol-draw-fancy): New helpers.
(flymake-end-of-line-diagnostics-face): Remove box.

(cherry picked from commit 0262e3e158e35770f864d3131baf8f1793a20e58)

2 months agoFix use-package :custom-face to set face-defface-spec (bug#77928)
Michael Shields [Sat, 19 Apr 2025 19:58:26 +0000 (12:58 -0700)]
Fix use-package :custom-face to set face-defface-spec (bug#77928)

By default, `face-set-spec' sets the override face spec, so face
attributes are combined with defaults rather than replacing them.
This was a behavior change that was an apparently unintended
consequence of commit 6b344a9.

Also set the `face-modified' property, which causes Customize to
flag the face as changed outside Customize.

* doc/misc/use-package.texi (Faces): Document the behavior.
* lisp/use-package/use-package-core.el (use-package-handler/:custom-face):
(use-package): Improve docstring to reflect implementation.
* test/lisp/use-package/use-package-tests.el
(use-package-test/:custom-face-1): (use-package-test/:custom-face-2):
(use-package-test/:custom-face-3): (use-package-test/:custom-face-4):
Add tests.

(cherry picked from commit ebcde0f90f67852d485a36941b0661cfd1b892eb)

2 months agoImprove documentation of 'insert-kbd-macro'
Adam Sjøgren [Sun, 20 Apr 2025 16:44:16 +0000 (18:44 +0200)]
Improve documentation of 'insert-kbd-macro'

* lisp/macros.el (insert-kbd-macro): Update documentation
of what happens when no macro name is supplied.

* doc/emacs/kmacro.texi (Save Keyboard Macro): Document
saving 'last-kbd-macro'.  (Bug#77317)

(cherry picked from commit 0c55cd0e176cc73178e8f18d959d5a6f9bf632de)

2 months ago; Skip commit 925ac2ef7043a1cf5356f8fa1f15ae43529319bc
Eshel Yaron [Sun, 27 Apr 2025 13:29:52 +0000 (15:29 +0200)]
; Skip commit 925ac2ef7043a1cf5356f8fa1f15ae43529319bc

2 months agoImprove syncing VC buffers before generating diffs
Sean Whitton [Sun, 27 Apr 2025 03:45:54 +0000 (11:45 +0800)]
Improve syncing VC buffers before generating diffs

* lisp/vc/vc.el (vc-maybe-buffer-sync): Delete.  Correct
handling of indirect buffers is now implicitly achieved by
vc-buffer-sync-fileset.
(vc-buffer-sync-fileset): Make NOT-ESSENTIAL argument optional,
new MISSING-IN-DIRS optional argument.  Rewrite to handle
directories named in the fileset, not only files.
(vc-ediff): Replace call to vc-maybe-buffer-sync with a call to
vc-buffer-sync-fileset.
(vc-root-diff): Similarly replace call to vc-maybe-buffer-sync.
This means the user is prompted to save additional buffers, that
they likely want to save before generating the diffs.
* test/lisp/vc/vc-misc-tests.el: New file.

(cherry picked from commit 07c2b169edc2c5aaad1c8f494663a8198b2d4ca2)

2 months agovc-diff: Delete redundant call to vc-maybe-buffer-sync
Sean Whitton [Sat, 26 Apr 2025 05:15:55 +0000 (13:15 +0800)]
vc-diff: Delete redundant call to vc-maybe-buffer-sync

This call is redundant with the subsequent call to
vc-buffer-sync-fileset.  I believe this call to
vc-maybe-buffer-sync was reintroduced by accident -- the
changeset adding the call to vc-buffer-sync-fileset deleted a
call to vc-sync-fileset in the same place.

* lisp/vc/vc.el (vc-diff): Delete redundant call to
vc-maybe-buffer-sync.
* lisp/files.el (find-buffer-visiting): Note in docstring that
this function only ever returns base buffers.

(cherry picked from commit d047a89e769f3c8429c43a40d5f251a895590d3a)

2 months agoRename vc-buffer-sync's argument to NOT-ESSENTIAL
Sean Whitton [Sat, 26 Apr 2025 04:55:56 +0000 (12:55 +0800)]
Rename vc-buffer-sync's argument to NOT-ESSENTIAL

* lisp/vc/vc-dispatcher.el (vc-buffer-sync):
* lisp/vc/vc.el (vc-maybe-buffer-sync, vc-diff)
(vc-buffer-sync-fileset, vc-ediff, vc-root-diff):
Rename argument from NOT-URGENT to NOT-ESSENTIAL.

(cherry picked from commit 6b204c2d164a53ff85e132d4a77bd7afbb0fc42e)

2 months ago; Fix compilation warning in string-edit.el
Eli Zaretskii [Sat, 26 Apr 2025 15:01:42 +0000 (18:01 +0300)]
; Fix compilation warning in string-edit.el

* lisp/textmodes/string-edit.el (string-edit): Avoid shadowing the
global 'major-mode'.

(cherry picked from commit 191b4cd9a76aa31ff9711370842394f37955c06a)

2 months agoFix 'kill-ring-deindent-mode'
Eli Zaretskii [Sat, 26 Apr 2025 14:30:20 +0000 (17:30 +0300)]
Fix 'kill-ring-deindent-mode'

* lisp/indent-aux.el
(kill-ring-deindent-buffer-substring-function): Fix deindenting
for modes which set 'indent-tab-mode' to nil.  (Bug#77981)

(cherry picked from commit 1c7fe501fedb41aaf5b22d82dab5a365f86e4c85)