1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

164286 Commits

Author SHA1 Message Date
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals

# Conflicts:
#	etc/refcards/ru-refcard.tex
#	lib/explicit_bzero.c
#	m4/explicit_bzero.m4
2023-01-01 05:47:47 -05:00
Eli Zaretskii
df192b5153 ; Merge from origin/emacs-29
The following commit was skipped:

f0e9775b18 ; Auto-commit of loaddefs files.
2023-01-01 05:46:25 -05:00
Eli Zaretskii
861d3db634 Merge from origin/emacs-29
72a81e2022 ; * lisp/treesit.el (treesit-simple-indent-presets): Fix t...
ddfeee3e8a Build recipe interactively in treesit-install-language-gra...
6837469780 ; Add REVISION to treesit-language-source-alist
0dc788aa01 ; Remove GRAMMAR-DIR from treesit-language-source-alist
f9aef67c36 Tweak csharp-mode font-lock-settings (bug#60376)
46362c0a3a ; * doc/lispref/tips.texi (Documentation Tips): Add indexing.
9a386b682e Revert a recent change which causes errors
9871ee8b14 ; More fixes for documentation of 'defalias'
f309651b67 ; Fix handling of 'not' by 'buffer-match-p'
9292f595a7 ; Fix typos
43c7e05a2a Fix misspelled functions in shortdoc groups
01acecc79c Simplify introduction of use-package manual
2a7e072e53 ; Fix documentation of 'defalias'
eee2aeca25 Fix python-shell-buffer-substring when retrieving a single...
bfdad6c4e5 ; Fix recent treesit-related changes
2023-01-01 05:46:24 -05:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Eli Zaretskii
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
* lisp/isearch.el (isearch-open-overlay-temporary): Document that
the overlay passed to the 'isearch-open-invisible-temporary'
function cannot be deleted too early.  (Bug#60399)
2023-01-01 11:04:22 +02:00
Eli Zaretskii
ab3210e709 Document 'use-package' in the 2 main manuals
* doc/emacs/custom.texi (Init Examples):
* doc/lispref/loading.texi (Named Features): Document 'use-package'
and its most important features.
2023-01-01 10:38:11 +02:00
Sean Whitton
7822fcbebd vc-git-dir-extra-headers: Improve detection of rebases
* lisp/vc/vc-git.el (vc-git--cmds-in-progress): New function.
(vc-git-dir-extra-headers): Use it.
2022-12-31 22:55:42 -07:00
Sean Whitton
e4669e0f77 vc-git: Don't assume .git is a directory
* lisp/vc/vc-git.el (vc-git--git-path): New function.
(vc-git-dir-extra-headers)
(vc-git-merge-branch)
(vc-git-resolve-when-done): Use it.
2022-12-31 22:45:10 -07:00
Stefan Kangas
652d805156 Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-12-19 14:09:50 UTC.
2023-01-01 06:01:59 +01:00
Stefan Kangas
b898875100 ; Auto-commit of loaddefs files. 2023-01-01 05:08:28 +01:00
Stefan Kangas
f0e9775b18 ; Auto-commit of loaddefs files. 2023-01-01 05:08:26 +01:00
Yuan Fu
72a81e2022
; * lisp/treesit.el (treesit-simple-indent-presets): Fix typo.
Well it's sort of a typo :-)
2022-12-31 17:11:14 -08:00
Yuan Fu
ddfeee3e8a
Build recipe interactively in treesit-install-language-grammar
If there is not existing recipe for a language, prompt to build the
recipe interactively.

* lisp/treesit.el (treesit--install-language-grammar-build-recipe):
New functions.
(treesit-install-language-grammar): Use the new function.
2022-12-31 16:23:07 -08:00
Yuan Fu
6837469780
; Add REVISION to treesit-language-source-alist
This allows users to install a particular version or branch.  Prompted
by bug#60427 and bug#60223.

* lisp/treesit.el (treesit-language-source-alist)
(treesit--install-language-grammar-1): Add REVISION.
2022-12-31 14:55:10 -08:00
Yuan Fu
0dc788aa01
; Remove GRAMMAR-DIR from treesit-language-source-alist
Removing it doesn't affect building all the language grammars in
batch.sh, so it must be an artifact I added for something else and
later forgot to remove.

* lisp/treesit.el (treesit-language-source-alist)
(treesit--install-language-grammar-1): Remove GRAMMAR-DIR.
2022-12-31 14:27:51 -08:00
Theodor Thornhill
f9aef67c36
Tweak csharp-mode font-lock-settings (bug#60376)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Rearrange features.
(csharp-ts-mode): Rearrange features.
2022-12-31 14:21:01 -08:00
Eli Zaretskii
46362c0a3a ; * doc/lispref/tips.texi (Documentation Tips): Add indexing. 2022-12-31 18:47:51 +02:00
Eli Zaretskii
9a386b682e Revert a recent change which causes errors
* lisp/subr.el (buffer-match-p): Undo last change, as it causes an
error in a timer function of show-paren-mode.
2022-12-31 18:32:54 +02:00
Eli Zaretskii
9871ee8b14 ; More fixes for documentation of 'defalias'
* doc/lispref/functions.texi (Defining Functions): Document
other possible values of DEFINITION in a defalias.
(Bug#60432)
2022-12-31 17:01:22 +02:00
Philip Kaludercic
f309651b67 ; Fix handling of 'not' by 'buffer-match-p'
* lisp/subr.el (buffer-match-p): Look up the cadr instead of the cdr
for the negation in 'not'.
* doc/lispref/buffers.texi (Buffer List): Update documentation.
(Bug#58951)
2022-12-31 15:05:56 +01:00
Stefan Kangas
9292f595a7 ; Fix typos 2022-12-31 12:43:32 +01:00
Stefan Kangas
43c7e05a2a Fix misspelled functions in shortdoc groups
* lisp/emacs-lisp/shortdoc.el (file, list): Fix misspelled function
names: 'file-writable-p' and 'seq-reduce'.
* test/lisp/emacs-lisp/shortdoc-tests.el (subr-x): Require.
(shortdoc-all-functions-fboundp): New test.
2022-12-31 12:40:01 +01:00
Kévin Le Gouguec
01acecc79c Simplify introduction of use-package manual
* doc/misc/use-package.texi (Getting Started): Do not advise requiring
the package, since the macro is autoloaded; also correct the macro's
name.  (Bug#60366)
2022-12-31 10:48:48 +01:00
Richard Hansen
f59d012af7 whitespace: Use `define-globalized-minor-mode' for global mode
* lisp/whitespace.el (global-whitespace-mode): Fix interoperability
between `whitespace-mode' and `global-whitespace-mode' by using
`define-globalized-minor-mode'.  (Bug#60334)
* test/lisp/whitespace-tests.el (whitespace-tests--global): Add a
regression test.
2022-12-31 10:48:37 +02:00
Eli Zaretskii
2a7e072e53 ; Fix documentation of 'defalias'
* doc/lispref/functions.texi (Defining Functions): Document that a
defalias's DEFINITION can be a macro.  (Bug#60432)
2022-12-31 10:44:53 +02:00
kobarity
eee2aeca25 Fix python-shell-buffer-substring when retrieving a single statement
* lisp/progmodes/python.el (python-shell-buffer-substring): Do not add
"if True:" line when retrieving a single statement.
(python-shell-send-region): Add a reference to
`python-shell-buffer-substring' in docstring.
* test/lisp/progmodes/python-tests.el (python-shell-buffer-substring-13)
(python-shell-buffer-substring-14, python-shell-buffer-substring-15)
(python-shell-buffer-substring-16, python-shell-buffer-substring-17):
New tests. (Bug#60142)
2022-12-31 10:14:28 +02:00
Eli Zaretskii
bfdad6c4e5 ; Fix recent treesit-related changes
* lisp/treesit.el (treesit-language-source-alist)
(treesit--install-language-grammar-1): Doc fixes.

* src/treesit.c (Ftreesit_language_abi_version): Fix a typo in
function's Lisp name.  Doc fix.
(Ftreesit_language_available_p): Fix a typo in the function's C
name.

* doc/lispref/parsing.texi (Language Grammar): Fix wording.
2022-12-31 10:13:15 +02:00
Eli Zaretskii
24488bc4b2 Fix the build broken by latest GnuTLS-related changes
* src/gnutls.c (key_file2_aux): Don't use GNUTLS_PKCS_PBES2_*
constants that are defined only in latest versions of GnuTLS.
(Bug#50507)
(Fgnutls_boot): Mention in the doc string that some flags of
'gnutls_certificate_set_x509_key_file2' are only supported since
GnuTLS 3.6.3.
2022-12-31 09:24:32 +02:00
Stefan Kangas
2ec4e187c9 Merge from origin/emacs-29
ab1f245f1a Show tree-sitter query source when signaling query error
0b58ea0e60 ; * lisp/treesit.el (treesit--install-language-grammar-1)...
724da28763 Add version tags and mention the new options in NEWS
8675f4136c Add new options for Ruby code indentation
4922de626f ; Fix doc strings of 'treesit-install-language-grammar'
69b2aaaade ; Fix recently modified docs of 'set-face-attribute' (bug...
0248fc9e1a Add treesit-install-language-grammar
0237c5927e Add treesit-language-abi-version
312f82d36f Change "language definition" to "language grammar" in man...
fba35657da ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragrap...
dec1b37a32 ; * doc/lispref/parsing.texi (Accessing Node Information)...
39265abf0c * test/lisp/net/tramp-tests.el (tramp-test32-shell-comman...
ebf65c7e7e * lisp/eshell/em-tramp.el (tramp): Require also at runtim...

# Conflicts:
#	etc/NEWS
2022-12-31 06:30:21 +01:00
Po Lu
57e363a451 ; * src/gnutls.c (Fgnutls_boot): Fix typo. 2022-12-31 09:10:36 +08:00
Po Lu
e645bcc26d Fix last change in gnutls.c
* src/gnutls.c (Fgnutls_boot): Pacify
--enable-check-lisp-object-type and Haiku GCC warning involving
`key_file2_aux'.
2022-12-31 09:10:23 +08:00
Yuan Fu
ab1f245f1a
Show tree-sitter query source when signaling query error
* src/treesit.c (treesit_compose_query_signal_data): Add QUERY_SOURCE
parameter.
(treesit_ensure_query_compiled)
(Ftreesit_query_capture): Add query source.
2022-12-30 16:57:45 -08:00
Yuan Fu
0b58ea0e60
; * lisp/treesit.el (treesit--install-language-grammar-1): Minor fix. 2022-12-30 16:23:39 -08:00
Dmitry Gutov
724da28763 Add version tags and mention the new options in NEWS
* etc/NEWS: Mention the new options (bug#60186).

* lisp/progmodes/ruby-mode.el (ruby-block-indent)
(ruby-after-operator-indent, ruby-method-call-indent)
(ruby-parenless-call-arguments-indent): Add version tags.
2022-12-31 00:13:17 +02:00
Dmitry Gutov
8675f4136c Add new options for Ruby code indentation
* lisp/progmodes/ruby-mode.el (ruby-block-indent)
(ruby-after-operator-indent, ruby-method-call-indent)
(ruby-parenless-call-arguments-indent): New options (bug#60186).
(ruby-smie-grammar): Specify associativity for "?".
(ruby-smie--indent-to-stmt): Add optional argument.

* test/lisp/progmodes/ruby-mode-resources/ruby.rb: New cases.

* test/lisp/progmodes/ruby-mode-resources/ruby-method-call-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-block-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/ruby-after-operator-indent.rb:
* test/lisp/progmodes/ruby-mode-resources/
ruby-parenless-call-arguments-indent.rb: New files.

* test/lisp/progmodes/ruby-mode-tests.el: Add indentation tests for new files.
2022-12-31 00:00:21 +02:00
Mattias Engdegård
9d0f5909af Correct suppression of suspicious eq type warning
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings):
* lisp/emacs-lisp/bytecomp.el (bytecomp--warn-dodgy-eq-arg):
Suppress warning using (suspicious FUNCTION), where FUNCTION is
not always `eq`.
2022-12-30 21:03:34 +01:00
Jim Porter
a77204c646 ; Fix Eshell tests on macOS
* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/if-statement-pipe)
(esh-cmd-test/if-else-statement-pipe):
* test/lisp/eshell/esh-io-tests.el (esh-io-test/pipeline/subcommands):
Allow trailing newlines in the output.
2022-12-30 10:40:08 -08:00
Nikolaos Chatzikonstantinou
e9983b1b63 Add :pass and :flags to gnutls-boot for :keylist
* lisp/net/gnutls.el (gnutls-boot-parameters): Add the keys :pass and
:flags, and update the documentation.
* src/gnutls.c (gnutls-boot): Add the keys :pass and :flags, and
update the documentation.
(syms_of_gnutls): Add the symbols :pass, :flags, and the symbols that
correspond to the enumeration constants of the GnuTLS enum
`gnutls_pkcs_encrypt_flags_t'.
(key_file2_aux): Private helper function that translates a list of
symbols to its corresponding `unsigned int' value of the GnuTLS C enum
`gnutls_pkcs_encrypt_flags_t'.

(Bug#50507)
2022-12-30 17:32:01 +01:00
Eli Zaretskii
4922de626f ; Fix doc strings of 'treesit-install-language-grammar'
* lisp/treesit.el (treesit-install-language-grammar)
(treesit--install-language-grammar-1): Doc fixes.
2022-12-30 17:10:22 +02:00
Eli Zaretskii
69b2aaaade ; Fix recently modified docs of 'set-face-attribute' (bug#52493)
* doc/lispref/display.texi (Attribute Functions): Clarify wording
and restore removed information about resetting attributes to
'unspecified' for future frames.

* lisp/faces.el (set-face-attribute): Minor copyedit of doc
string.
2022-12-30 16:43:38 +02:00
Yuan Fu
0248fc9e1a
Add treesit-install-language-grammar
Per discussion on emacs-devel, I added function to install and compile
language grammars.

* lisp/treesit.el (treesit-language-source-alist): New variable.
(treesit-install-language-grammar)
(treesit--call-process-signal)
(treesit--install-language-grammar-1): New functions.
2022-12-30 02:56:26 -08:00
Yuan Fu
0237c5927e
Add treesit-language-abi-version
Also rename treesit-language-version to treesit-library-abi-version,
because the old name is somewhat misleading.

* doc/lispref/parsing.texi (Language Grammar): Update.
* src/treesit.c (Ftreesit_library_abi_version): Rename.
(Ftreesit_language_abi_version): New function.
2022-12-30 02:54:13 -08:00
Mattias Engdegård
7493b4026f ; fix misplaced bracketing of and inside when 2022-12-30 11:30:23 +01:00
Mattias Engdegård
c34230f12a ; remove incorrect quoting of condition names 2022-12-30 11:24:31 +01:00
Yuan Fu
312f82d36f
Change "language definition" to "language grammar" in manual.
"Language grammar" is apparently the more widely used term among
people talking about tree-sitter.  To avoid confusion, I think it's
good to use that rather than "language definition", which is a term
that I made up :-)

Feel free to revert this if it is too much change.

* doc/lispref/elisp.texi:
* doc/lispref/modes.texi:
* doc/lispref/parsing.texi:
* lisp/treesit.el: Change "language definition" to "language grammar".
2022-12-30 00:47:22 -08:00
Yuan Fu
fba35657da
; * lisp/progmodes/c-ts-mode.el (c-ts-mode--fill-paragraph): Fix. 2022-12-30 00:35:14 -08:00
Yuan Fu
dec1b37a32
; * doc/lispref/parsing.texi (Accessing Node Information): Fix typo. 2022-12-30 00:35:14 -08:00
Michael Albinus
39265abf0c * test/lisp/net/tramp-tests.el (tramp-test32-shell-command): Fix test. 2022-12-30 09:26:56 +01:00
Michael Albinus
ebf65c7e7e * lisp/eshell/em-tramp.el (tramp): Require also at runtime. (Bug#60402) 2022-12-30 09:26:41 +01:00
Jim Porter
073da412a1 Fix reference-counting of Eshell I/O handles
This ensures that output targets in Eshell are only closed when Eshell
is actually done with them.  In particular, this means that
"{ echo foo; echo bar } | rev" prints "raboof" as expected
(bug#59545).

* lisp/eshell/esh-io.el (eshell-create-handles): Structure the handles
differently so the targets and their ref-count can be shared.
(eshell-duplicate-handles): Reimplement this to share targets between
the original and new handle sets.  Add STEAL-P argument.
(eshell-protect-handles, eshell-copy-output-handle)
(eshell-interactive-output-p, eshell-output-object): Account for
changes to the handle structure.
(eshell-close-handle): New function...
(eshell-close-handles, eshell-set-output-handle): ... use it.
(eshell-get-targets): Remove.  This only existed to make the previous
implementation of 'eshell-duplicate-handles' work.

* lisp/eshell/esh-cmd.el (eshell-with-copied-handles): New argument
STEAL-P.
(eshell-do-pipelines): Use STEAL-P for the last item in the pipeline.
(eshell-parse-command): Don't copy handles for the last command in the
list; explain why we can't use STEAL-P here.
(eshell-eval-command): When queuing input, set 'eshell-command-body'
and 'eshell-test-body' for the 'if' conditional (see
'eshell-do-eval').

* test/lisp/eshell/esh-io-tests.el (esh-io-test/redirect-pipe): Split
into...
(esh-io-test/pipeline/default, esh-io-test/pipeline/all): ... these.
(esh-io-test/pipeline/subcommands): New test.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/for-loop-pipe)
(esh-cmd-test/while-loop-pipe, esh-cmd-test/if-statement-pipe)
esh-cmd-test/if-else-statement-pipe): New tests.
(esh-cmd-test/while-loop): Use 'pop' to simplify the test a bit.

* test/lisp/eshell/eshell-test-helpers.el
(eshell-test--max-subprocess-time): Rename to...
(eshell-test--max-wait-time): ... this.
(eshell-wait-for): New function...
(eshell-wait-for-subprocess): ... use it.

* test/lisp/eshell/eshell-tests.el (eshell-test/queue-input): Fix this
test.  Previously, it didn't correctly verify that the original
command completed.

* test/lisp/eshell/em-tramp-tests.el
(em-tramp-test/should-replace-command): New macro...
(em-tramp-test/su-default, em-tramp-test/su-user)
(em-tramp-test/su-login, em-tramp-test/sudo-shell)
(em-tramp-test/sudo-user-shell, em-tramp-test/doas-shell)
(em-tramp-test/doas-user-shell): ... use it.
2022-12-29 22:38:25 -08:00