1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

164024 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Roland Winkler
644c71d678 lisp/textmodes/bibtex.el: fix bibtex-beginning-of-entry (bug#56636)
lisp/textmodes/bibtex.el (bibtex-beginning-of-entry):
use bibtex-any-entry-maybe-empty-head (bug#56636)
2022-12-29 23:31:08 -06:00
Roland Winkler
ab38abfdf7 lisp/textmodes/bibtex.el: Treat $ as punctuation in BibTeX fields (bug#50202) 2022-12-29 23:22:48 -06:00
Gregory Heytings
d086cd6cf8 Clarify the documentation of 'set-face-attribute'
* lisp/faces.el (set-face-attribute): Mention the evaluation order
of attribute-value pairs in the docstring.

* doc/lispref/display.texi (Attribute Functions): Likewise, and
explain with an example that a different argument order might give
different results.  Also align the documentation in the manual
with that of the docstring, whose changes were discussed in
bug#57499 but not included in the manual.
2022-12-29 23:43:34 +01:00
Gregory Heytings
dafa6d6bad Handle non-string values in pcomplete
* lisp/pcomplete.el (pcomplete-arg): When
pcomplete-parse-arguments-function returns a non-string value,
return the string the user typed in, and attach the value as a
text property to that string.  Fixes bug#59956 and bug#60021.
2022-12-29 23:00:16 +01:00
Gregory Heytings
beed746f94 Fix completion when completion-auto-select is set
* lisp/minibuffer.el (completion--do-completion): Do not display
"Complete, but not unique" messages when completion-auto-select is
set.  Fixes bug#60359.
2022-12-29 22:52:17 +01:00
Eli Zaretskii
7ccb88486e ; * etc/DEBUG: Update MS-Windows specifics for GDB 13 and later. 2022-12-29 22:04:44 +02:00
Yuan Fu
558b59d81b
Add color fontification in css-ts-mode (bug#60405)
* lisp/textmodes/css-mode.el (css-ts-mode): Add color fontification
and syntax-propertize-function.
2022-12-29 11:52:06 -08:00
Yuan Fu
a96a7c8115
; * lisp/textmodes/css-mode.el (css-ts-mode): Fix imenu setup. 2022-12-29 11:41:26 -08:00
Yuan Fu
793641a3db
; * lisp/progmodes/js.el: Fix byte-compile warning. 2022-12-29 11:34:51 -08:00
Juri Linkov
0aea1cf819 * lisp/hi-lock.el (hi-lock--regexps-at-point): Fix bug (bug#60241).
Handle two cases: when a pattern is a regexp or a function.
2022-12-29 19:45:12 +02:00
Juri Linkov
60418e6f09 * src/keyboard.c (echo_add_key): Use recently rebound C-h key C-q (bug#60249) 2022-12-29 19:41:41 +02:00
Eli Zaretskii
706ed85285 Avoid assertion violations in treesit.c with --enable-checking
* src/treesit.c (Ftreesit_node_first_child_for_pos)
(Ftreesit_node_descendant_for_range): Check validity of buffer
positions before converting them to byte-positions, to avoid
assertion violations in buf_charpos_to_bytepos.
2022-12-29 13:52:09 +02:00
Yuan Fu
38c35bf0f6
Clean up treesit-default-defun-skipper and add comments
* lisp/treesit.el (treesit-default-defun-skipper): Clean up, fix some
small issue, add comment.
2022-12-29 01:43:28 -08:00
Eli Zaretskii
9371d488be Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29 2022-12-29 11:11:58 +02:00
Richard Hansen
9d814bea46 ; whitespace.el: Use the new 'ert-with-buffer-selected' in tests
Commit 286c48137f added a new
`ert-with-test-buffer-selected' macro.  Use that macro in
'whitespace-mode' tests to avoid code duplication.  (Bug#60332)
* test/lisp/whitespace-tests.el (whitespace--with-buffer-selected):
Macro deleted.
(whitespace-tests--indirect-clone-breaks-base-markers)
(whitespace-tests--indirect-clone-markers)
(whitespace-tests--regular-clone-markers): Use
'ert-with-buffer-selected'.
2022-12-29 11:09:05 +02:00
Yuan Fu
784e509bde
Fix c-ts-mode bracket indentation (bug#60398)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use new
anchor.
(c-ts-mode--bracket-children-anchor): New anchor function.
2022-12-29 00:58:50 -08:00
Yuan Fu
909091d757
; Minor cleanup for tree-sitter font-lock rules in js-ts-mode
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Minor cleanup.
2022-12-28 17:33:07 -08:00
Yuan Fu
e78e69b331
Clean up font-lock rules in js-ts-mode
Changes for each feature:

- string: Take out string-interpolation bits.
- string-interpolation: New.
- declaration: Rename to definition.
- identifier: Remove.
- property: Use a pred to filter out methods.
- expression: Rename to assignment.
- function: New.
- pattern: Merge into assignment.

* lisp/progmodes/js.el (js--treesit-font-lock-settings): See above.
(js--treesit-property-not-function-p)
(js--treesit-lhs-identifier-query): New variable.
(js--treesit-fontify-assignment-lhs): New functions.
(js-ts-mode): Update feature list.
2022-12-28 17:32:47 -08:00
Yuan Fu
0a61e4e2b7
; * doc/lispref/parsing.texi (Using Parser): Minor improvement. 2022-12-28 15:54:51 -08:00