1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00
Commit graph

1085 commits

Author SHA1 Message Date
kobarity
3d8fbb0716 Fix Python PDB tracking for remote inferior Python
* lisp/progmodes/python.el (python-shell-local-prefix): New
constant.
(python-shell--convert-file-name-to-send): New function to
add/remove prefix.
(python-shell-send-string, python-shell-send-file): Changed to
use 'python-shell--convert-file-name-to-send'.
(python-pdbtrack-set-tracked-buffer): Changed to add/remove
prefix.
* test/lisp/progmodes/python-tests.el
(python-shell--convert-file-name-to-send-1): New test.
(Bug#79036)
2025-08-07 16:06:28 +03:00
Jakub Ječmínek
e52ed1b5d1 Improve region deletion handling in python.el
* lisp/progmodes/python.el (python-indent-dedent-line-backspace):
Delete the text in the region if Transient Mark mode is enabled,
the mark is active, and prefix arg is 1.  (Bug#48695)

* test/lisp/progmodes/python-tests.el
(python-indent-dedent-line-backspace-4): Add new test.
2025-08-02 17:14:50 +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
Eli Zaretskii
f1696c3c27 ; * lisp/progmodes/python.el (treesit-thing-settings): Defvar. 2025-06-21 06:23:51 -04: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
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
Jostein Kjønigsen
9261d353cc Fix test-regressions in python-ts-mode
* lisp/progmodes/python.el (python--treesit-settings): Use more
specific selectors for constants.

* test/lisp/progmodes/python-tests.el
(python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1)
(python-ts-mode-union-types-face-2): None is now a constant.
2025-05-05 09:45:36 +02:00
Jostein Kjønigsen
2964d51c9c
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.
2025-05-01 00:54:33 -07:00
Juri Linkov
dbd1688237 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.
2025-04-30 20:28:05 +03:00
Liu Hui
46776cae05 Fix filename completion in Python shell (bug#77853)
'comint-filename-completion' may complete the filename at
wrong locations.  Users who want proper filename completion
should use specialized completion backends (e.g. Jedi).
* lisp/progmodes/python.el (inferior-python-mode): Remove
'comint-filename-completion' in 'comint-dynamic-complete-functions'.
2025-04-26 14:59:48 +03:00
kobarity
9ae82726d8 Add cache to Python block navigation functions
* lisp/progmodes/python.el (python-nav-cache)
(python-nav-cache-tick): New variables.
(python-nav-cache-get, python-nav-cache-set)
(python-nav-with-cache): New functions.
(python-nav-beginning-of-block, python-nav-end-of-block): New
wrapper functions.
(python-nav--beginning-of-block): Renamed from
'python-nav-beginning-of-block'.
(python-nav--end-of-block): Renamed from
'python-nav-end-of-block'.  (Bug#77620)
2025-04-26 14:20:31 +03:00
kobarity
d753c88494 Performance optimization of 'python-info-statement-ends-block-p'
* lisp/progmodes/python.el (python-info-statement-ends-block-p):
Add a comparison of the indentation of the next statement with
the indentation of the current statement.  (Bug#77620)
2025-04-26 14:19:17 +03:00
kobarity
55cf15e163 Fix Python block end predicates (bug#77941)
* lisp/progmodes/python.el (python-info-statement-ends-block-p)
(python-info-end-of-block-p): Add consideration of comments.
* test/lisp/progmodes/python-tests.el
(python-info-statement-ends-block-p-3)
(python-info-end-of-block-p-3): New tests.
2025-04-26 14:17:31 +03:00
kobarity
4c5c20ddc2 Disable echo back instead of setting tty to raw in Inferior Python
* lisp/progmodes/python.el (python-shell-setup-code): Change the
Python setup code.  (Bug#76943)
2025-04-17 14:56:49 +02:00
Paul Nelson
67c89a675d Add repeat-map for Python indentation commands
* lisp/progmodes/python.el (python-indent-repeat-map): New
keymap for repeating Python indentation commands when using
'repeat-mode' (bug#77417).
2025-04-04 09:42:43 +03:00
Stefan Monnier
468c2aebae Replace uses of replace-buffer-contents
* lisp/vc/vc.el (vc-diff-restore-buffer):
* lisp/progmodes/python.el (python--do-isort):
* lisp/progmodes/eglot.el (eglot--apply-text-edits):
* lisp/files.el (revert-buffer-insert-file-contents-delicately):
* lisp/json.el (json-pretty-print): Use `replace-region-contents`.
2025-03-29 17:49:49 -04:00
James Cherti
1aebb02611 ElDoc: Add more commands using 'eldoc-add-command-completions'
Add more commands to 'eldoc-add-command-completions' to fix
disappearing ElDoc help in the minibuffer for the following
cases:
- All modes: Added "comment-indent-new-line".
- All modes: Added "delete-char" for handling when the user presses delete.
- Python mode: Added "python-indent-dedent-line-backspace" for handling
  when the user presses backspace.
* lisp/emacs-lisp/eldoc.el (eldoc-remove-command-completions):
* lisp/progmodes/python.el (python-base-mode): Add more commands
to 'eldoc-add-command-completions'.

Copyright-paperwork-exempt: yes
2025-03-22 13:55:09 +02:00
Stefan Kangas
672df0288b Bump python.el package version to 0.30
* lisp/progmodes/python.el: Bump package version to 0.30.
2025-03-11 01:15:41 +01:00
Stefan Kangas
46f9ebaec3 Make python.el compatible with Emacs 29.1
* lisp/progmodes/python.el (python--treesit-fontify-string): Don't
call treesit--compute-font-lock-level unless it is
fboundp.  (Bug#76873)
2025-03-11 01:14:35 +01:00
Eli Zaretskii
bcfa9692f0 Merge from origin/emacs-30
af8017b23f Explicitly document read-string return value
cf03c2b609 Improve docstrings of python.el import management
01bcc6961a ; Improve doc strings of Speedbar
bd9c76ab17 Avoid warnings about 'image-scaling-factor' in builds --w...
2025-03-09 07:33:13 -04:00
kobarity
cf03c2b609 Improve docstrings of python.el import management
Added notes that when adding import statements for a file that
does not belong to a project, it may take some time to find
candidate import statements in the default directory.

* lisp/progmodes/python.el (python-add-import)
(python-fix-imports): Improve docstring.  (Bug#74894)
2025-03-07 16:52:09 +02:00
Stefan Monnier
2dea3a0d34 (python-base-mode-map): Use it!
Rather than use `copy-keymap` between `python-mode-map` and
`python-ts-mode-map`, move the shared bindings to `python-base-mode-map`.

* lisp/progmodes/python.el (python-base-mode-map): Define it explicitly.
Move all the bindings of `python-mode-map` to it.
(python-mode-map, python-ts-mode-map): Inherit from it.
2025-03-06 23:23:08 -05:00
Stefan Kangas
1b77e94bcc ; Move python.el Maintainer header further up
This is more consistent with our common practices.
2025-03-02 18:53:27 +01:00
Stefan Kangas
538ab57dc5 Bump python.el package version to 0.29
* lisp/progmodes/python.el: Bump package version to 0.29.
2025-03-02 18:53:09 +01:00
Stefan Kangas
0cff855690 Bump python.el requirement to Emacs 29.1
* lisp/progmodes/python.el: Require Emacs 26.3, flymake 1.0 and
project 0.1.  (Bug#75526)
2025-03-02 18:49:37 +01:00
Stefan Kangas
eff5a3e43b Bump python.el requirement to Emacs 26.3
* lisp/progmodes/python.el: Require Emacs 26.3, flymake 1.0 and
project 0.1.  (Bug#75526)
2025-03-02 05:40:27 +01:00
Stefan Kangas
702cb123fa ; Fix typos 2025-02-22 14:48:29 +01:00
kobarity
4509662236 Add python-ts-mode to ffap-alist
* lisp/progmodes/python.el (ffap-alist): Add
python-ts-mode.  (Bug#76364)
2025-02-19 03:07:34 +01:00
Liu Hui
db8af88222 Disable PyREPL in Python shell
The new default REPL (PyREPL) in Python 3.13 is incompatible
with Python shell and displays a warning message when reverting
to the old basic REPL.

* lisp/progmodes/python.el
(python-shell--calculate-process-environment): Use the basic
REPL.  (Bug#76205)
2025-02-18 20:04:17 +01:00
kobarity
a75f4449fa Improve completion in IPython/Python 3.13
IPython/Python 3.13 indirectly imports rlcompleter, and the
completer is set up to reference rlcompleter.__main__.
However, this rlcompleter.__main__ is different from the
__main__ in the REPL execution.  Therefore, this completer
cannot correctly complete the REPL globals.  To address this
issue, we override rlcompleter.__main__ with __main__ only in
the case of IPython.

* lisp/progmodes/python.el (python-shell-completion-native-setup):
Modify __PYTHON_EL_native_completion_setup().  (Bug#76205)
2025-02-18 20:04:16 +01:00
kobarity
6491fee366 Fix string end search in python-nav-end-of-statement
* lisp/progmodes/python.el (python-nav-end-of-statement):
Change to look for string delimiter characters and check
syntax, instead of looking for string-delimiter syntax.
* test/lisp/progmodes/python-tests.el
(python-nav-end-of-statement-5): New test.  (Bug#75387)
2025-02-15 13:24:59 +02:00
kobarity
999d054dc1 Make it configurable to highlight Python 2 builtins
By default, Python 2-only builtins are not highlighted.

* lisp/progmodes/python.el (python-2-support): New defcustom.
(python-font-lock-builtin-types)
(python-font-lock-builtins-python3)
(python-font-lock-builtins-python2)
(python-font-lock-builtins)
(python-font-lock-special-attributes)
(python-font-lock-builtin-exceptions-python3)
(python-font-lock-builtin-exceptions-python2)
(python-font-lock-builtin-exceptions): New variables.
(python-font-lock-keywords-level-2)
(python-font-lock-keywords-maximum-decoration)
(python--treesit-builtin-types)
(python--treesit-builtins)
(python--treesit-special-attributes)
(python--treesit-exceptions): Use new variables.

Co-authored-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Co-authored-by: Stefan Kangas <stefankangas@gmail.com>
2025-02-04 23:28:00 +01:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
Eli Zaretskii
f2e97338eb ; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare. 2025-01-30 14:03:20 +02:00
Yuan Fu
c81b50aaf5
Add back tree-sitter declare-function for python.el (bug#75526)
treesit-declare-unavailable-functions is not available for old
emacs versions, but python.el is a core package available on
ELPA.

Remove the treesit-declare-unavailable-functions until compat.el
releases a new version that contains it.

* lisp/progmodes/python.el: Remove
treesit-declare-unavailable-functions and add back
declare-function forms.
2025-01-29 21:25:32 -08:00
Konstantin Kharlamov
0514619b2c python-mode: add 'exit' and 'quit' to the list of block-enders
'exit()' and 'quit()' end the current codeflow, there can't be
any code past it, similarly to 'return', 'continue', etc.  So
when calculating indentation for the line next to 'exit()',
'os.exit()', 'os._exit()', 'sys.exit()' and 'quit()', decrease
the indentation level.
* /lisp/progmodes/python.el (python-rx): Add 'exit()', 'os.exit()',
'os._exit()', 'sys.exit()', 'quit' to the list of block-enders.
(Bug#75729)
2025-01-25 12:51:27 +02:00
Stefan Kangas
7fa975adbc Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-02 18:39:42 +01:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Stefan Kangas
3d3c109460 Make font-lock face variables obsolete
Using these variables as "another mechanism for changing face
appearance" never really worked, since mode authors were free to use the
face instead of the variable (i.e. quoting the symbol).  This means that
when users customized the variables, it would change its appearance only
in some cases, which is a rather surprising interface.

Indeed, it turns out that some modes have not always been consistent,
and mixed using the variable and the face, increasing the confusion even
further.  Thus, the only thing users could rely on to always work was to
leave the variables at their default value, and to customize the face.

We now recommend customizing the face, and are obsoleting these
variables.  This will lead to some minor code-churn, but it is believed
that it will be ultimately worth it.  To fix existing Lisp code, you
should typically only need to quote the symbol, as this commit shows.

It might be the case that we will have to keep the obsolete variables,
that have been with us since Emacs 19, around for a longer time-period
than normal, to allow package authors to adapt.

* lisp/font-lock.el (font-lock-comment-face)
(font-lock-comment-delimiter-face, font-lock-string-face)
(font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face)
(font-lock-builtin-face, font-lock-function-name-face)
(font-lock-variable-name-face, font-lock-type-face)
(font-lock-constant-face, font-lock-warning-face)
(font-lock-negation-char-face, font-lock-preprocessor-face): Make face
variables obsolete in favor of customizing the faces directly
instead.  (Bug#71469)

* doc/lispref/modes.texi (Faces for Font Lock): Don't document above
obsolete variables.

* lisp/cedet/data-debug.el (data-debug-insert-hash-table)
(data-debug-insert-widget-properties, data-debug-insert-string)
(data-debug-insert-number):
* lisp/emacs-lisp/lisp-mode.el (elisp--font-lock-backslash)
(lisp-font-lock-syntactic-face-function):
* lisp/emacs-lisp/package.el (describe-package-1):
* lisp/generic-x.el (rc-generic-mode, rul-generic-mode):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes)
(c-maybe-font-lock-wrong-style-comments, c-font-lock-declarators)
(c-font-lock-c++-lambda-captures, c-font-lock-c++-modules):
* lisp/progmodes/cperl-mode.el (cperl-find-sub-attrs)
(cperl-look-at-leading-count, cperl-process-here-doc)
(cperl-find-pods-heres):
* lisp/progmodes/gdb-mi.el (gdb-init-1, gdb-update, gdb-running)
(gdb-starting, gdb-stopped, gdb-internals)
(gdb-breakpoints--add-breakpoint-row, gdb-locals-handler-custom)
(gdb-registers-handler-custom, gdb-get-source-file):
* lisp/progmodes/js.el (js--font-lock-keywords-1)
(js--font-lock-keywords-2, js-font-lock-syntactic-face-function):
* lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock):
* lisp/progmodes/meta-mode.el (meta-indent-in-string-p):
* lisp/progmodes/prolog.el (prolog-font-lock-keywords):
* lisp/progmodes/python.el (python-font-lock-syntactic-face-function):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--comment-font-lock):
* lisp/progmodes/sh-script.el (sh-font-lock-syntactic-face-function):
* lisp/textmodes/tex-mode.el (doctex-font-lock-syntactic-face-function):
* test/lisp/faces-tests.el (faces--test-color-at-point):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-extra-delimiters)
(cperl-test-bug-47112, cperl-test-bug-65834, cperl-test-bug-66145)
(cperl-test-bug-66161, cperl-test-bug-69604):
* test/lisp/progmodes/python-tests.el
(python-ts-mode-compound-keywords-face)
(python-ts-mode-named-assignment-face-1)
(python-ts-mode-assignment-face-2, python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1, python-ts-mode-union-types-face-2)
(python-ts-mode-types-face-1, python-ts-mode-types-face-2)
(python-ts-mode-types-face-3, python-ts-mode-isinstance-type-face-1)
(python-ts-mode-isinstance-type-face-2)
(python-ts-mode-isinstance-type-face-3)
(python-ts-mode-superclass-type-face, python-ts-mode-class-patterns-face)
(python-ts-mode-dotted-decorator-face-1)
(python-ts-mode-dotted-decorator-face-2)
(python-ts-mode-builtin-call-face)
(python-ts-mode-interpolation-nested-string)
(python-ts-mode-level-fontification-wo-interpolation)
(python-ts-mode-disabled-string-interpolation)
(python-ts-mode-interpolation-doc-string):
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-heredoc-font-lock, ruby-heredoc-highlights-interpolations)
(ruby-exit!-font-lock, ruby-regexp-interpolation-is-highlighted)
(ruby-recognize-symbols-starting-with-at-character)
(ruby-hash-character-not-interpolation)
(ruby-interpolation-suppresses-quotes-inside)
(ruby-interpolation-suppresses-one-double-quote)
(ruby-interpolation-inside-percent-literal)
(ruby-interpolation-inside-percent-literal-with-paren)
(ruby-interpolation-inside-another-interpolation)
(ruby-interpolation-inside-double-quoted-percent-literals)
(ruby-no-interpolation-in-single-quoted-literals):
Don't use above obsolete variables.
* lisp/progmodes/cc-fonts.el (font-lock-constant-face): Don't
declare now-unused variable.
2024-12-18 03:48:35 +01:00
Vincenzo Pupillo
7873642074
Fix treesit-font-lock-level in python-ts-mode
Now that 'treesit-font-lock-level' can be a number or a list, it
should be handled using 'treesit--compute-font-lock-level'.

* lisp/progmodes/python.el (python--treesit-fontify-string):
Apply 'treesit--compute-font-lock-level' to
'treesit-font-lock-level'.
2024-12-17 13:37:32 -08:00
Stefan Kangas
7c94898fa5 Ignore some more Python tooling directories when grepping
* lisp/progmodes/python.el (python-base-mode): Add Pytest and Rope
cache directories to 'grep-find-ignored-directories'.
2024-12-16 22:01:07 +01:00
Stefan Kangas
02a1e3052b Improve heuristic for Python walrus operator
* lisp/progmodes/python.el (python-base-mode): Improve heuristic for
Python walrus operator in 'electric-layout-mode'.
2024-12-16 21:48:45 +01:00
kobarity
3c247f86b7 Fix hangs caused by unbalanced braces in Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings):
Temporarily bind forward-sexp-function to nil when calling
'up-list'.  (Bug#74738)
2024-12-15 10:03:02 -05:00
Pip Cet
7024c66123 Fix a typo which caused test failures
* lisp/progmodes/python.el (interpreter-mode-alist):
* lisp/progmodes/vera-mode.el (interpreter-mode-alist): Fix typo.
2024-12-14 15:50:47 +00:00
kobarity
71cd290c20 Fix font-lock of Python f-strings
* lisp/progmodes/python.el (python--font-lock-f-strings): Bind
'parse-sexp-ignore-comments' to nil so that we can look for
closing braces even if a hash is used in the format specifier.
* test/lisp/progmodes/python-tests.el
(python-font-lock-f-string-1): New test.  (Bug#74738)
2024-12-13 18:33:41 -05:00
Yuan Fu
9377ef5c23
Declare tree-sitter functions with a new macro
* 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/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/python.el:
* lisp/progmodes/sh-script.el:
* lisp/progmodes/c-ts-common.el:
* lisp/progmodes/prog-mode.el:
* lisp/progmodes/typescript-ts-mode.el: Use new macro.
* lisp/treesit.el (treesit-declare-unavailable-functions): New
macro.
2024-12-12 20:59:08 -08:00
Stefan Kangas
04408e198f Don't call purecopy in progmodes/*.el
* lisp/progmodes/compile.el (compile-command):
* lisp/progmodes/etags.el (tags-compression-info-list):
* lisp/progmodes/grep.el (grep-program, find-program, xargs-program):
* lisp/progmodes/js.el (interpreter-mode-alist):
* lisp/progmodes/python.el (interpreter-mode-alist):
* lisp/progmodes/ruby-mode.el (auto-mode-alist, interpreter-mode-alist):
* lisp/progmodes/vera-mode.el: Remove calls to purecopy.
2024-12-12 22:48:17 +01:00
Stefan Kangas
d4cb3b30f1 ; Fix bootstrap (Bug#74490)
* lisp/progmodes/python.el (python--auto-mode-alist-regexp): Don't use
rx in autoloaded variable, since it breaks bootstrap when copied to
ldefs-boot.el.
* lisp/ldefs-boot.el: Update.
2024-11-23 16:46:30 +01:00