Commit graph

12723 commits

Author SHA1 Message Date
Eli Zaretskii
131cde2f86 Merge from origin/emacs-30
6299eb0fe5 bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp
982938363a Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs ...
e68ad70af6 Fix 'insert-directory' in Turkish language-environment
f805f51373 Fix job control in remote shell
039ad15373 ; * doc/emacs/package.texi (Package Statuses): Clarify "n...
2025-06-28 06:57:19 -04:00
Liam Hupfer
6299eb0fe5 bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp
Align the js-ts-mode entry with the javascript-mode entries in the
default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is
not associated with .js files.

* lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp.

Fixes: 2023-01-20 6b2f85caa6 "Make tree-sitter based modes optional"
2025-06-28 13:11:01 +03:00
Stefan Monnier
68100ca656 (peg-parse): Fix bug#78884
* lisp/progmodes/peg.el (peg-parse): Be more careful when
testing if a symbol is the name of an existing rule.  Improve docstring.

test/lisp/progmodes/peg-tests.el (peg-tests--peg-parse): New test.
2025-06-27 23:12:40 -04:00
Juri Linkov
80f2f07c48 Add alternative "ruby-lsp" to eglot-server-programs.
* lisp/progmodes/eglot.el (eglot-server-programs):
Add "ruby-lsp" to eglot-alternatives for ruby-mode and ruby-ts-mode.
https://shopify.github.io/ruby-lsp/editors.html#emacs-eglot
2025-06-25 20:07:17 +03:00
Juri Linkov
f3c755129f Improve treesit settings for python-ts-mode (bug#73404).
* lisp/progmodes/python.el (python--thing-settings):
For the 'sexp' thing use all nodes except top-level
grouping nodes, comments and parens.  Add the 'list' thing.
(python-ts-mode): Use setq-local for treesit-thing-settings.
Modify 'forward-sexp-function' and 'treesit-sexp-thing'
after calling 'treesit-major-mode-setup'.
2025-06-25 19:57:05 +03:00
Elías Gabriel Pérez
6b078013f1 Allow automatically delete non-existent projects. (Bug#77566)
* etc/NEWS: Announce changes.
* lisp/progmodes/project.el (project-prune-zombie-projects): New
user option.
(project-prune-zombies-default): New function.
(project-forget-zombie-projects): Rework.
(project--ensure-read-project-list, project-prompt-project-dir)
(project-prompt-project-name): Call
'project-forget-zombie-projects' but inhibit its message.
2025-06-25 09:54:45 +03:00
Alan Mackenzie
1a8e8203a1 CC Mode: Remove workarounds for missing "\_<", "\_>" in XEmacs
Also start using `symbols' as the PAREN argument to regexp-opt.

lisp/progmodes/cc-defs.el (c-make-keywords-re): Simplify,
remove the redundant `appendable' value of the ADORN parameter,
use the `symbols' value of the PAREN argument to regexp.
(c-emacs-features): Test that "\_<" and "\_>" work in regexps
before allowing CC Mode to start.

lisp/progmodes/cc-engine.el (c-looking-at-decl-block): When
GOTO-START is set, leave point at the _last_ Java annotation,
if any.  Clarify this in the doc string.
(c-guess-basic-syntax CASE 5G): Replace a not needed t
GOTO-START argument to c-looking-at-decl-block with nil.

lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Make the
syntax of ?@ in Java Mode symbol for processing annotations.
(c-opt-identifier-concat-key, c-opt-identifier-prefix-key)
(c-opt-after-id-concat-key, c-identifier-key)
(c-cpp-message-directives-re, c-cpp-include-key, c-pack-key)
(c-brace-stack-thing-key, c-brace-stack-no-semi-key): Replace
the `appendable' value of the ADORN argument to
c-make-keywords-re with t.
(c-annotation-re): New lang const and lang var.
(c-keywords-obarray): Replace an explicit (apply 'nconc (mapcar
... )) with c--mapcan, now that the obscure bug with mapcan in
Emacs has been resolved.

lisp/progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont)
(c-lineup-java-throws, c-snug-do-while)
lisp/progmodes/cc-awk.el (c-awk-pre-exp-alphanum-kwd-re)
(c-awk-after-if-for-while-condition-p)
(c-awk-after-function-decl-param-list)
(c-awk-after-continue-token)
(c-awk-after-rbrace-or-statement-semicolon)
(awk-font-lock-keywords)
lisp/progmodes/cc-cmds.el (c-defun-name-1)
lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist, c-forward-label, c-skip-conditional)
(c-looking-at-c++-lambda-expression, c-add-stmt-syntax)
(c-guess-basic-syntax CASE 11, CASE 12, CASE 13, CASE 15)
(CASE 5C.3, CASE 5D.4, CASE 7D)
lisp/progmodes/cc-fonts.el (c-cpp-matchers)
(c-basic-matchers-before, c-font-lock-declarations)
(c-font-lock-c++-modules, c-simple-decl-matchers)
(c-complex-decl-matchers, c-basic-matchers-after)
lisp/progmodes/cc-langs.el (c-paragraph-start)
(c-stmt-block-only-keywords-regexp)
(c-type-decl-prefix-keywords-key, c-type-decl-prefix-key)
(c-type-decl-suffix-key, c-known-type-key)
(c-enum-clause-introduction-re)
lisp/progmodes/cc-menus.el (cc-imenu-c++-generic-expression)
lisp/progmodes/cc-vars.el (c-make-noise-macro-regexps)
(c-make-macro-with-semi-re): Replace explicit "\<" and "\>"
with "\_<" and "\_>".  Replace explicit specification of
non-'_' character after word end with "\_>".  Replace
concatenation of "\<" and "\>" with regexps with (regexp-opt
... 'symbols).  Use (regexp-opt ... 'symbols) in general.
2025-06-23 11:50:07 +00:00
Eli Zaretskii
081c1aae99 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)
2025-06-22 11:16:53 +03:00
Eli Zaretskii
f1696c3c27 ; * lisp/progmodes/python.el (treesit-thing-settings): Defvar. 2025-06-21 06:23:51 -04:00
Eli Zaretskii
e379f14193 Fix setting custom 'c++-ts-mode' indent style
* lisp/progmodes/c-ts-mode.el (c-ts-mode-set-style): Fix a typo.
(Bug#78814)
2025-06-21 12:10:54 +03:00
Jostein Kjønigsen
39721a4d79 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)
2025-06-21 11:17:51 +03:00
Stefan Monnier
df86d10316 (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.
2025-06-20 19:59:54 -04:00
Juri Linkov
1a76b527ac 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.
2025-06-20 19:58:28 +03:00
Yuan Fu
27a524602f
Use treesit-thing-settings in python-ts-mode
* lisp/progmodes/python.el (python--thing-settings): New variable.
(python-ts-mode): Setup treesit-thing-settings.
2025-06-17 17:44:23 -07:00
Juri Linkov
76f422da26 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
2025-06-12 20:22:42 +03:00
Alan Mackenzie
1468daf1d1 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.
2025-06-11 13:43:50 +00:00
Yuan Fu
f904ff5ca2
Add tree-sitter version of prog-fill-reindent-defun (bug#78703)
Add a tree-sitter version of prog-fill-reindent-defun that
indents the defun that encloses point, rather than the sibling
defun after point when there is one.

* lisp/progmodes/prog-mode.el:
(prog-fill-reindent-defun): Turns into a wrapper function.
(prog-fill-reindent-defun-function): New variable.
(prog-fill-reindent-defun-default): Old prog-fill-reindent-defun
becomes this function.
* lisp/treesit.el (treesit-fill-reindent-defun): New function.
(treesit-major-mode-setup): Setup
prog-fill-reindent-defun-function.
2025-06-09 22:55:09 -07:00
Yuan Fu
32bc6914e5
Extract out prog--text-at-point-p from prog-fill-reindent-defun
* lisp/progmodes/prog-mode.el (prog--text-at-point-p): New function.
(prog-fill-reindent-defun): Use new function.
2025-06-09 22:13:25 -07:00
Yuan Fu
f9487d2b28
; * lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Typo. 2025-06-09 21:54:43 -07:00
Juri Linkov
3c04806b44 * lisp/progmodes/c-ts-mode.el (c-ts-mode-menu): Add 'bound-and-true-p'.
Use 'bound-and-true-p' for the case when 'subword-mode' is not loaded.
2025-06-09 09:40:12 +03:00
Dmitry Gutov
1c465fc087 project-switch-to-buffer: Don't disambiguate too much
* lisp/progmodes/project.el (project--read-project-buffer):
Use the new function from 'uniquify' to generate buffer names that
are just unique to the current project, not globally (bug#77312).
2025-06-06 05:41:26 +03:00
Jostein Kjønigsen
61d7116520
Better command subst fontification in bash-ts-mode (bug#78567)
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings):
fontify command-substition command only.  Don't include
enclosing brackets.
2025-06-04 00:11:01 -07:00
Yuan Fu
d1fa511512
; Fix recent changes in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts--standalone-parent-p): Add a limit to the
looking-back call.
2025-06-03 22:44:13 -07:00
Stefan Monnier
a4a66d9628 lisp/progmodes/sh-script.el (sh-popup-occur-buffer): Remove unused var 2025-06-03 17:13:51 -04:00
Eli Zaretskii
9fcea4a263 ; Fix recent changes in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts--standalone-parent-p): Fix warning and punctuation
in a comment.
2025-06-03 19:32:29 +03:00
Juri Linkov
6b668c2213 Restore c-ts-common-comment-setup in js-ts-mode and typescript-ts-mode.
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Add 'c-ts-common-comment-setup' back removed in 8bccccedb6
since it does more than setting comment variables (bug#78680).
2025-06-03 18:41:01 +03:00
Yuan Fu
8d132359d1
Fix typescript-ts-mode tenary indentation (bug#77901)
Fixes indentation for nested ternary expressions:

const a = cond1 ? 1 :
  cond2 ? 2 :
  cond3 ? 3 :
  cond 4: 5;

instead of

const a = cond1 ? 1 :
  cond2 ? 2 :
    cond3 ? 3 :
      cond 4: 5;

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts--standalone-parent-p): New function.
(typescript-ts-mode):
(tsx-ts-mode): Use new function.
2025-06-01 16:14:12 -07:00
Jostein Kjønigsen
c3f4e6ca0e
Fontificatiomn improvements for typescrip-ts-mode.el (bug#78594)
- Fontify type-names for static function calls directly on types.
- Special-case "document" and "console" and constants/builtins.
- Fontify variable-use in string-interpolation expressions.
- Fontify variable-use in function-calls.
- Fontify variable-use in member-access expressions.
- Fontify variable-use in JSX-expressions.
- Fontify variable-use when using explicit nullability override.

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
(typescript-ts-mode--font-lock-settings): Improve font-lock settings.
2025-06-01 15:46:36 -07:00
Matthew Tromp
9d6a4fdd7e Add additional keybindings for flymake diagnostics modes
This adds keybindings for C-o and C-m, and changes the bindings
for n and m, in `flymake-diagnostics-buffer-mode' and
`flymake-project-diagnostics-mode' buffers.

Previously, `flymake-project-diagnostics-mode' did not use the
keybindings for `flymake-diagnostics-buffer-mode'. RET and SPC
were never bound in `flymake-project-diagnostics-mode' buffers.
This seems to have been an oversight: since the filename and
message are buttons which call `flymake-goto-diagnostic',
pressing RET still brought users to the diagnostic at point
most of the time.  This change adds a
`flymake-project-diagnostics-mode-map' which inherits from
`flymake-diagnostics-buffer-mode-map'.

C-o and C-m now show and jump to the diagnostic currently at point,
similar to how `compilation-mode' works.

n and p now show the diagnostic newly under point after moving up or
down a line, which is also intended to make behavior more similar to
`compilation-mode'.

In order that other next-error buffers do not interfere with
navigation in the diagnostics buffers, this change introduces and
uses new functions, `next-error-this-buffer-no-select' and
`previous-error-this-buffer-no-select'. If we instead used
`next-error-no-select' and `previous-error-no-select', then a user
who runs `flymake-show-diagnostics-buffer', then e.g. `compile',
then returns to the diagnostics buffer and presses 'n', would be
navigated to the next error in the compilation buffer.

* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode-map): Add
bindings.
(flymake-project-diagnostics-mode-map): Inherit bindings from
`flymake-diagnostics-buffer-mode'
* lisp/simple.el (next-error-this-buffer-no-select):
(previous-error-this-buffer-no-select): Add new commands.
(Bug#78619)

Copyright-paperwork-exempt: yes
2025-05-31 17:23:08 +03:00
Eli Zaretskii
b3a8633dba Merge from origin/emacs-30
1d2ae31b8b typescript-ts-mode: Improve function body indentation (bu...
421ecbcf6b ; * CONTRIBUTE: Explain the line-width preferences.
2025-05-31 08:29:50 -04:00
Eli Zaretskii
32d911cddf Remove unused user options in sh-script.el
* lisp/progmodes/sh-script.el (sh-indent-comment)
(sh-first-lines-indent, sh-indent-for-else): Remove variables that
are no longer obeyed.
(sh-var-list): Likewise.  (Bug#78592)
2025-05-31 15:09:42 +03:00
Dmitry Gutov
f0bec20ac5 project-remember-project: Support calling it interactively
* lisp/progmodes/project.el (project-remember-project):
Support interactive invocation (bug#78099) and react with
appropriate messages when called so, depending on the blacklist.
2025-05-29 22:27:38 +03:00
Eli Zaretskii
5883ceedc8 Fix exact matching of Ada tags by 'M-.'
* lisp/progmodes/etags.el (tag-exact-match-p): Support Ada tags
that have "/x" qualifiers appended to them.  (Bug#78489)
2025-05-27 13:50:12 +03:00
Konstantin Kharlamov
1d2ae31b8b
typescript-ts-mode: Improve function body indentation (bug#78121)
Older code was calculating body indentation depending on function
parameters alignment.  This is incorrect, because if parameters are
misaligned, so will the function body.  Instead, use offset of the
previous standalone parent.

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--indent-rules): Stop depending on function
parameters indentation for calculating body content and the closing
`}'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts:
(Function body with params misindented (bug#78121)): Add new test.
2025-05-25 20:50:41 -07:00
Eli Zaretskii
056ba8c569 Merge from origin/emacs-30
df9636f892 ; * doc/misc/use-package.texi (Hooks): Fix typo (bug#77609).
36afdd2f6f Fix documentation of use-package's ':hook' keyword
d0c90bc9bf * test/infra/gitlab-ci.yml (.job-template): Make it more ...
b8f24cbdbb ; * lisp/emacs-lisp/find-func.el (find-function): Doc fix.
e0c6f3e765 Fix todo-mode item insertion bug (bug#78506)
328b316764 Add support for Pyrefly LSP for Python
2025-05-24 06:55:24 -04:00
Vincenzo Pupillo
676f12c65f Support Rust compiler messages in compile mode (bug#70794).
* etc/compilation.txt: Add examples of Rust compiler error, warning and
note messages.
* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add Rust regexps for error,
warning and note messages.
* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add new test cases.
(compile-test-error-regexps): Increase expected errors.
2025-05-22 11:53:34 +02:00
Yuan Fu
0b2ba13c97
Eglot: always call ElDoc callbacks in correct buffer (bug#78530)
Some minor modes adds their own eldoc display function to
'eldoc-display-functions' hook buffer-locally.  So when eldoc
uses 'eldoc-display-functions' to display docs, it should use
the buffer-local value of the hook.

But that's not always the case. In 'eldoc--invoke-strategy', the
code that runs 'eldoc-display-functions' hook is wrapped in a
callback function that eventually gets passed to each
documentation function in 'eldoc-documentation-functions'. So
now it's the documentation functions' responsibility to call the
eldoc callback in the original buffer.

All the eglot documentation functions indeed do that, using
'eglot--when-buffer-window' to switch to the original buffer
when calling the eldoc callback. But
'eglot-code-action-suggestion' is the exception, the callback is
called outside of the 'eglot--when-buffer-window' form.

This patch fixes that.

This bug was originally reported on eldoc-box [1]. The user
found that eldoc-box's display function are rarely called, even
though the minor mode is turned on. This patch fixes the issue.

[1] https://github.com/casouri/eldoc-box/issues/126#issuecomment-2896611278

* lisp/progmodes/eglot.el (eglot-code-action-suggestion): Move
the funcall form into the eglot--when-buffer-window form.
2025-05-21 22:42:35 -07:00
Juri Linkov
822b6cca1e * lisp/treesit.el: New variables for 'down-list' and 'up-list'.
(treesit-sexp-type-down-list, treesit-sexp-type-up-list):
New buffer-local variables.
(treesit-down-list): Use 'treesit-sexp-type-down-list'.
(treesit-up-list): Use 'treesit-sexp-type-up-list'.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
Set 'treesit-sexp-type-down-list' and
'treesit-sexp-type-up-list' to 'list'.
2025-05-21 09:31:45 +03:00
Elijah Gabe Pérez
d8bf84f7f4 lisp/progmodes/hideshow.el (hs--get-ellipsis): Simplify
Mostly using `truncate-string-ellipsis`.
2025-05-19 18:33:39 -04:00
Jostein Kjønigsen
328b316764 Add support for Pyrefly LSP for Python
* lisp/progmodes/eglot.el (eglot-server-programs): Add config
for Pyrefly.  (Bug#78492)
2025-05-19 14:50:20 +03:00
Eli Zaretskii
6571a2d70b ; Fix a recent change in hideshow.el
* lisp/progmodes/hideshow.el (hs--get-ellipsis): Don't assume
'standard-display-table' is defined.
2025-05-17 15:14:47 +03:00
Eli Zaretskii
bd57055a58 Merge from origin/emacs-30
299d3a4401 Fix saving abbrevs by 'abbrev-edit-save-buffer'
399d05332e ; Remove confusing text from ELisp manual
feecb1fbc6 ; * doc/emacs/cmdargs.texi (General Variables): More accu...
18e1aabbea ; Improve documentation of the -L command-line option
c80fbe3f23 typescript-ts-mode: align ternary-chain branches (bug#78187)
16bfbc6fe3 ; Tramp test fixes
f0ac271da3 ; Time Stamps doc: Clearer customize recipe
49c06df224 ; * doc/lispref/variables.texi (Default Value): Update.
cbea5997c0 ; * lisp/mh-e/mh-e.el: Commentary: link to The MH-E Manual
0bf956235e Improve Tramp test
eaf01d034c * lisp/autorevert.el (auto-revert-remote-files): Adapt do...
e32bb816ad ; Improve documentation of ls-lisp.el
2d5f243470 ; * lisp/emacs-lisp/comp.el (native-compile-prune-cache):...
bb73533165 Improve Electric Pair mode documentation (bug#78021)
2025-05-17 06:52:01 -04:00
Eli Zaretskii
214c0ba3c7 ; * lisp/progmodes/hideshow.el (hs--get-ellipsis): Doc fix (bug#78234). 2025-05-17 12:11:37 +03:00
Elías Gabriel Pérez
8b6e1d8435 Prettify and improve hideshow (bug#78234)
Buttonize the ellipsis and optionally display in the ellipsis
the total number of hidden lines.
* lisp/progmodes/hideshow.el (hs-display-lines-hidden): New
user option.
(hs-ellipsis): New face.
(hs-make-overlay): Tweak.
(hs--get-ellipsis): New function.
* doc/emacs/programs.texi (Hideshow): Update documentation.
* etc/NEWS: Announce changes.
2025-05-17 12:10:03 +03:00
Konstantin Kharlamov
c80fbe3f23
typescript-ts-mode: align ternary-chain branches (bug#78187)
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode--indent-rules): Make sure each new ternary
branch is aligned with the previous one.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts:
(Chained ternary expressions): New test.
2025-05-15 20:09:26 -07:00
Sean Whitton
45627ca7cc New top-level buffer-local value functions
* src/eval.c (local_toplevel_binding)
(Fbuffer_local_toplevel_value, Fset_buffer_local_toplevel_value)
(syms_of_eval): New functions.
* doc/lispref/variables.texi (Default Value):
* lisp/subr.el (setq-local):
* etc/NEWS: Document them.
* test/lisp/emacs-lisp/lisp-tests.el
(core-elisp-tests-4-toplevel-values): New test.
* lisp/progmodes/xref.el (xref--show-xref-buffer)
(xref-show-definitions-buffer-at-bottom):
* lisp/vc/vc-dispatcher.el (vc-setup-buffer):
Use set-buffer-local-toplevel-value.
2025-05-15 13:40:04 +01:00
Juri Linkov
8bccccedb6 Use JSX comments on jsx treesit nodes in js-ts-mode and tsx-ts-mode
* lisp/progmodes/js.el (js--treesit-comment-jsx): New internal variable.
(js--treesit-comment-setup): New function.
(js-ts-mode): Set buffer-local 'comment-setup-function' to
'js--treesit-comment-setup'.

* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Set buffer-local 'comment-setup-function' to 'js--treesit-comment-setup'.
2025-05-14 09:57:40 +03:00
Eli Zaretskii
b3e280faba Eglot: Fix parsing file:// URIs on MS-Windows
* lisp/progmodes/eglot.el (eglot-uri-to-path): Remove the leading
slash in MS-Windows file names only if they begin with a slash.
This adjusts the function to the recent fix for bug#76982 in
'url-generic-parse-url', which previously would produce file names
that begin with an extra slash.  (Bug#78392)
2025-05-13 14:45:04 +03:00
Alan Mackenzie
4b4276d64f CC Mode: Fix cc-fonts.el errors for XEmacs.
* lisp/progmodes/cc-fonts.el (c-font-lock-cpp-messages): Use
c-put-font-lock-face rather than c-put-font-lock-string-face
since we don't have the double quote marks here that the latter
function corrects for.
(c-complex-decl-matchers): Replace cl-delete-duplicates with
the macro c--delete-duplicates.
2025-05-13 10:13:34 +00:00
João Távora
c69c18b732 Eglot: fix call hierarchy navigation again (bug#78367, bug#78250)
* lisp/progmodes/eglot.el (eglot--hierarchy-label): Fix again.
2025-05-11 11:14:18 +01:00