]> git.eshelyaron.com Git - emacs.git/log
emacs.git
20 months ago; Minor fixes for user-facing text in last vc-cvs.el changes
Eli Zaretskii [Thu, 20 Apr 2023 08:53:32 +0000 (11:53 +0300)]
; Minor fixes for user-facing text in last vc-cvs.el changes

* lisp/vc/vc-cvs.el (vc-cvs-repository-hostname)
(vc-cvs-parse-root): Fix doc strings, text of messages, and use of
"pathname".  (Bug#62693)

20 months agoFix treesit-install-language-grammar for non-interactive call
Yuan Fu [Wed, 19 Apr 2023 23:23:25 +0000 (16:23 -0700)]
Fix treesit-install-language-grammar for non-interactive call

A continuation of bug#62704.

* lisp/treesit.el (treesit-install-language-grammar): Differentiate
between interactive and non-interactive call, and don't prompt when
it's called non-interactively.

20 months ago; * src/fns.c (assq_no_signal): Fix a typo in a comment.
Eli Zaretskii [Wed, 19 Apr 2023 16:30:55 +0000 (19:30 +0300)]
; * src/fns.c (assq_no_signal): Fix a typo in a comment.

20 months ago; Double space at end of sentence for vc-cvs.el
Robert Pluim [Wed, 19 Apr 2023 07:48:02 +0000 (09:48 +0200)]
; Double space at end of sentence for vc-cvs.el

* lisp/vc/vc-cvs.el (vc-cvs-repository-hostname, vc-cvs-parse-root)
(vc-cvs-parse-status, vc-cvs-after-dir-status): Double space at end of
sentence.
* test/lisp/vc/vc-cvs-tests.el: Double space at end of sentence.

20 months agoVC: Allow `vc-default-revert' (and CVS) to revert a missing file
Olivier Certner [Thu, 6 Apr 2023 09:25:33 +0000 (11:25 +0200)]
VC: Allow `vc-default-revert' (and CVS) to revert a missing file

* lisp/vc/vc.el (vc-default-revert): Fix reverting a missing file case
by not trying to create a backup through `copy-file'.  Notably impacts
CVS, where `vc-cvs-revert' calls `vc-default-revert'.

20 months agoVC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12
Olivier Certner [Thu, 6 Apr 2023 08:52:23 +0000 (10:52 +0200)]
VC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12

* lisp/vc/vc-cvs.el (vc-cvs-after-dir-status): Fix the name reported
for missing files in the case of CVS 1.12.3+ where name is quoted in
the warning line (it was not before this version).  Use instead the
following U line, where the name is never quoted on all versions.

20 months agoVC: CVS: Fix "Root" file parsing
Olivier Certner [Thu, 6 Apr 2023 08:16:33 +0000 (10:16 +0200)]
VC: CVS: Fix "Root" file parsing

The new "Root" file parsing has been based on CVS' documentation,
which gives the following format for *remote* repositories:
[:method:][[user][:password]@]hostname[:[port]]/pathname/to/repository
and for local ones:
:local:/pathname/to/repository
or
:local:c:/pathname/to/repository
or alternatively ':local:' replaced by ':fork:', or ':local:' omitted
when the path starts with a slash.

[The actual parsing code in CVS is actually a bit more restrictive.
See 'root.c'.]

Most notably, the previous version could not parse an absolute
pathname without an explicit :local: method or :pserver: lines with
passwords.

* lisp/vc/vc-cvs.el (vc-cvs-parse-root): Rewrite.

(vc-cvs-repository-hostname): Cope with `vc-cvs-parse-root' returning
an empty hostname (can only happen if the "Root" file is invalid),
returning nil in this case.

(vc-cvs-parse-uhp): Remove this standalone function formerly used only
by `vc-cvs-parse-root' and which doesn't allow correct parsing anyway.

* test/lisp/vc/vc-cvs-tests.el: New file, with tests for common "Root"
file content.

20 months agoEglot: unbreak activation/management of derived modes (bug#62907)
João Távora [Tue, 18 Apr 2023 23:59:17 +0000 (00:59 +0100)]
Eglot: unbreak activation/management of derived modes (bug#62907)

After recent changes to how LSP "languageId" is computed from major
modes and stored in the eglot-lsp-server object, the activation of the
'eglot--managed-mode' minor mode in modes _derived_ from some
major-mode mentioned in 'eglot-server-programs' was broken.

This commit restores that by introducing a new helper which uses the
same logic to provide the current-buffer's "languageId" to the server
and to discover if the server should manage the mode at all.  This
ensures the two things stay in sync.

Also, this helper uses the function 'provided-mode-derived-p' to fix
this bug#62907.

* lisp/progmodes/eglot.el (eglot--languageId): New helper.
(eglot-current-server, eglot--TextDocumentItem): Use it.

20 months agoflymake-end-of-line-diagnostics-face: Tweak a little
Dmitry Gutov [Tue, 18 Apr 2023 22:56:57 +0000 (01:56 +0300)]
flymake-end-of-line-diagnostics-face: Tweak a little

* lisp/progmodes/flymake.el
(flymake-end-of-line-diagnostics-face):
Use height 0.85 and ensure the box doesn't change the line height
(https://debbugs.gnu.org/62029#86).

20 months agoFix verilog-diff-file-with-buffer
Basil L. Contovounesios [Sun, 2 Apr 2023 15:46:33 +0000 (16:46 +0100)]
Fix verilog-diff-file-with-buffer

* lisp/progmodes/verilog-mode.el: Fix commentary to avoid implying
XEmacs defines diff-command.
(verilog-diff-file-with-buffer): Claim compatibility with Emacs 21
rather than XEmacs in commentary, since the latter does not seem to
define diff-command.  Use get-buffer in place of likely thinko
with-temp-buffer + BUFNAME + current-buffer.  Fix unused
unwind-protect: move temporary file deletion to its unwind
forms (bug#62620).  Avoid race condition between file existence
check and deletion.  Handle list-valued diff-switches.  Avoid
passing empty argument to diff-command.

20 months agoFix :package-version in flymake.el
Michael Albinus [Tue, 18 Apr 2023 09:10:12 +0000 (11:10 +0200)]
Fix :package-version in flymake.el

* lisp/progmodes/flymake.el (flymake-end-of-line-diagnostics-face)
(flymake-error-echo-at-eol, flymake-warning-echo-at-eol)
(flymake-note-echo-at-eol): Fix :package-version.

20 months ago* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread): Fix limiting
Andrew G Cohen [Tue, 18 Apr 2023 03:12:54 +0000 (11:12 +0800)]
* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread): Fix limiting

20 months ago* lisp/emacs-lisp/gv.el (error): Add gv-expander
Stefan Monnier [Mon, 17 Apr 2023 22:15:45 +0000 (18:15 -0400)]
* lisp/emacs-lisp/gv.el (error): Add gv-expander

This fixes incorrect expansion of (setf (case-exhaustive ..) ..),
as found for example in `elpa-admin.el`.

20 months agoFlymake: improve new flymake-show-diagnostics-at-end-of-line feature
João Távora [Mon, 17 Apr 2023 12:04:39 +0000 (13:04 +0100)]
Flymake: improve new flymake-show-diagnostics-at-end-of-line feature

* lisp/progmodes/flymake.el (flymake-end-of-line-diagnostics-face)
(flymake-error-echo-at-eol, flymake-warning-echo-at-eol)
(flymake-note-echo-at-eol): New faces
(flymake-error, flymake-warning, flymake-note): Use new faces.
(flymake--highlight-line): Rework.
(flymake-after-change-function): Rework.

20 months ago; Fix typos in treesit.c
Yuan Fu [Mon, 17 Apr 2023 03:35:45 +0000 (20:35 -0700)]
; Fix typos in treesit.c

* src/treesit.c (treesit_traverse_validate_predicate)
(Ftreesit_node_match_p): Fix typos.

20 months agoNew helper function assq_no_signal
Yuan Fu [Mon, 17 Apr 2023 03:33:51 +0000 (20:33 -0700)]
New helper function assq_no_signal

* src/fns.c (assq_no_signal): New function.
* src/lisp.h (assoc_no_signal): Declare it.
* src/treesit.c (safe_assq): Remove function.
(treesit_traverse_get_predicate): Change safe_assq to assq_no_signal.

20 months agoInclude previous summary buffer articles in gnus thread referrals
Andrew G Cohen [Mon, 17 Apr 2023 00:09:12 +0000 (08:09 +0800)]
Include previous summary buffer articles in gnus thread referrals

* lisp/gnus/gnus-search.el (gnus-search-thread): Include all the
current articles along with the thread when searching outside the
current group.

20 months agoEglot: guard against empty 'textDocument/documentSymbol' response
João Távora [Mon, 17 Apr 2023 00:37:19 +0000 (01:37 +0100)]
Eglot: guard against empty 'textDocument/documentSymbol' response

* lisp/progmodes/eglot.el (eglot-imenu): Protect against missing response.

20 months agoFit symbol_redirect snugly in two bits
Mattias Engdegård [Sun, 16 Apr 2023 09:20:05 +0000 (11:20 +0200)]
Fit symbol_redirect snugly in two bits

This allows the C compiler to do away with all default clauses when
switching on the `redirect` field.

* src/lisp.h (enum symbol_redirect): Use values in the 0..3 range,
which also matches the old comment in struct Lisp_Symbol.
(enum symbol_interned, enum symbol_redirect)
(enum symbol_trapped_write): Comment members.  Remove explicit values.
(struct Lisp_Symbol): Shrink the `redirect` member to 2 bits.
Use the correct type for the `interned` field.
Move value comments to their types.
* src/pdumper.c (dump_symbol): Update hashes.

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 17:05:04 +0000 (13:05 -0400)]
Merge from origin/emacs-29

b7023da6627 Make image-map bindings available on image links
d9e96c029bb * CONTRIBUTE: Fix a typo
3f71a2a0cf6 ; * lisp/progmodes/c-ts-mode.el (treesit-node-next-siblin...
adf9c956c28 Add to Eglot support for additional language-servers.
b3603b84bd9 Partial support for DEFUN in c-ts-mode (bug#62825)

# Conflicts:
# lisp/progmodes/c-ts-mode.el

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 17:02:06 +0000 (13:02 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

14e809ddff1 Fix style and unwinding code in treesit.c
759cdf1e510 Catch signals produced by PRED in tree-sitter search func...

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 17:02:04 +0000 (13:02 -0400)]
Merge from origin/emacs-29

864a4dc2363 Fix compilation of w32.c with old MinGW system headers
a22eb9ae0f9 ruby-add-log-current-method: Reduce the use of 'nreverse'
17d803d0a75 Fix detection of WebP images by their signature
43290391ce2 ; Eglot: make version parseable by version-to-list
6e6e8b5c974 Add more documentation for the keys of `package-vc-select...
7972b76c2c7 ; vc-checkout: Wrap var lookup in 'bound-and-true-p'
e9fef1d70ff vc-checkout: Try to use the vc-dir's backend first
372e024accd ; Fix wallpaper-tests on XFCE
7055fd8e43e Improve documentation related to 'ispell-complete-word'
61fd017abde * configure.ac: Add -lbsd on Haiku.
05971c4d9a4 Add menu to 'c-ts-mode' and 'c++-ts-mode'

# Conflicts:
# lisp/progmodes/eglot.el
# lisp/progmodes/ruby-mode.el

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:44:49 +0000 (12:44 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

954e2d96a92 Update manual about `sort`

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:44:48 +0000 (12:44 -0400)]
Merge from origin/emacs-29

c62afb10cf0 Fix wallpaper-tests on MS-Windows
f2d212c6966 Fix a couple of eglot-tests
338b3718b6c Fix visiting RPM files
b4afee03193 Fix ff-quiet-mode doc
2445100d7d6 ; Improve documentation of 'match-buffers'
d4d0da96f0b ; Update make-tarball.txt for Emacs 29.
9b0bf694da4 ; Fix ldefs-boot.el.
0cb86a348c7 ; Update ChangeLog.4.

# Conflicts:
# ChangeLog.4

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:41 +0000 (12:43 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

5e039d5a6e9 * lisp/ldefs-boot.el: Regenerate.

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:41 +0000 (12:43 -0400)]
Merge from origin/emacs-29

671abd0cc40 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:41 +0000 (12:43 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

4bc678ec9f4 Bump Emacs version to 29.0.90

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:40 +0000 (12:43 -0400)]
Merge from origin/emacs-29

db8f207e52f Fix some cases of incomplete code's indentation [c/c++-ts...
589959fb09d project-search: Pipe the list of files through 'file-regu...

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:40 +0000 (12:43 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

2b91567bf61 Update ChangeLog and AUTHORS for Emacs 29

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:40 +0000 (12:43 -0400)]
Merge from origin/emacs-29

d6af1f14982 ; doc/lispref/windows.texi: Fix @pxref paren.

20 months ago; Merge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:40 +0000 (12:43 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

57490fff6ec ; Backport: Eglot: fix misplaced parenthesis in last comm...
2a62273f3bf Backport: Eglot: no more tests based on Pylsp (bug#62694)

20 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 15 Apr 2023 16:43:37 +0000 (12:43 -0400)]
Merge from origin/emacs-29

5ef7ff05736 ; Start a new ChangeLog.4 file.
11126c6d30a Fix 'C-h k' for "Paste from Kill Menu" in context menus
74ddfe811f9 ; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (b...
08cda286c3f Improve the documentation of the XDS support
14d1c00e806 Allow reindentation of images inserted by 'mm-inline-image'
b63a9eda01c Fix "C-h k" and "C-h c" with Paste from Kill Menu
b36c21e27dc Change cursor color on NS port when it matches the face b...
96714c106b7 Improve documentation of image-related commands
6a2863ca016 Fix handling of sliced images
5be79fd05a5 ; * etc/NEWS: Announce 'cyrillic-mongolian' IM.
ca1a0fda98a ; Fix last change.
ce63462dbda Add cyrillic-mongolian input method
58801792706 ; Minor addition to the Emacs FAQ
88847dee125 Jsonrpc: don't bind inhibit-read-only to t so early
cb8c87a423a Allow active region when IM is used

# Conflicts:
# etc/NEWS

20 months agoMake image-map bindings available on image links
Andreas Schwab [Sat, 15 Apr 2023 10:35:24 +0000 (12:35 +0200)]
Make image-map bindings available on image links

* lisp/net/shr.el (shr-map): Move shr-browse-image to "M-i".
* lisp/net/eww.el (eww-image-link-keymap): Use shr-image-map.

20 months ago* CONTRIBUTE: Fix a typo
Alan Mackenzie [Sat, 15 Apr 2023 11:00:38 +0000 (11:00 +0000)]
* CONTRIBUTE: Fix a typo

20 months agoCleaner solution for Org version updates
Eli Zaretskii [Sat, 15 Apr 2023 10:47:00 +0000 (13:47 +0300)]
Cleaner solution for Org version updates

* lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set org--built-in-p
non-nil, to avoid aborting the build when Org's version is bumped.
($(lisp)/org/org.elc): Remove dependencies of org-version.el, as
no longer needed.  (Bug#62762)

20 months ago; * lisp/progmodes/c-ts-mode.el (treesit-node-next-sibling): Declare.
Eli Zaretskii [Sat, 15 Apr 2023 10:12:20 +0000 (13:12 +0300)]
; * lisp/progmodes/c-ts-mode.el (treesit-node-next-sibling): Declare.

20 months ago; * lisp/treesit.el (treesit-node-top-level): Fix typo.
Eli Zaretskii [Sat, 15 Apr 2023 10:02:25 +0000 (13:02 +0300)]
; * lisp/treesit.el (treesit-node-top-level): Fix typo.

20 months ago; * doc/misc/gnus.texi (Finding the Parent): Fix whitespace.
Eli Zaretskii [Sat, 15 Apr 2023 09:55:35 +0000 (12:55 +0300)]
; * doc/misc/gnus.texi (Finding the Parent): Fix whitespace.

20 months agoAdd to Eglot support for additional language-servers.
Jostein Kjønigsen [Fri, 14 Apr 2023 21:11:02 +0000 (23:11 +0200)]
Add to Eglot support for additional language-servers.

* lisp/progmodes/eglot.el (eglot-server-programs): Add
'vscode-markdown-language-server' for Markdown and
'dot-language-server' for GraphViz.  (Bug#62844)

20 months agoFix errors when nnselect-always-regenerate is t (bug#61539)
Andrew G Cohen [Thu, 30 Mar 2023 02:11:06 +0000 (10:11 +0800)]
Fix errors when nnselect-always-regenerate is t (bug#61539)

The group parameter nnselect-always-regenerate causes the list of
articles in the group to be generated each time it is needed. For this
to work reliably the list of articles has to be generated at the
appropriate time and to have a reproducible ordering.

* lisp/gnus/gnus-search.el (gnus-search-run-search): For nnselect
groups if the article list has not been stored, regenerate it.
* lisp/gnus/nnselect.el (nnselect-generate-artlist): Sort the
generated list of articles by RSV, group, and number.  Store the
artlist after generation. When the new optional argument INFO is
non-nil, update the group info.
(nnselect-compress-artlist, nnselect-uncompress-artlist): Preserve the
article list ordering.
(nnselect-get-artlist): Return nil when nnselect-always-regenerate is t.
(nnselect-store-artlist): Store the group active range along with the
artlist. Don't keep the artlist if nnselect-always-regenerate is t.
(nnselect-request-group): The full article list isn't needed at this
stage, only the active range.
(nnselect-retrieve-headers): Regenerate the article list if there
is no stored value. Inhibit gnus-demon while retrieving headers.
(nnselect-request-group-scan): Don't generate the article list when
nnselect-always-regenerate is t since it will be generated again later
on.
(nnselect-request-create-group): Allow the artlist to be passed as an
argument to the function. Update the group info and store the artlist.

20 months agoImprove gnus thread-referral
Andrew G Cohen [Tue, 22 Nov 2022 07:39:01 +0000 (15:39 +0800)]
Improve gnus thread-referral

Allow thread referral to use search whenever possible, displaying the
results in the current summary buffer if possible and a new nnselect
buffer if not.

* lisp/gnus/nnimap.el (nnimap-request-thread): Obsolete function.
* lisp/gnus/gnus-search.el (gnus-search-thread): Allow detailed
specification of how/where to search. Add found articles to the
current summary buffer if possible, or create a new ephemeral nnselect
group if not.
* lisp/gnus/gnus-sum.el (gnus-refer-thread-use-search): Allow a list
of servers and groups to search.
(gnus-summary-refer-thread): Find thread-related articles by using a
backend-specific method, gnus-search, or retrieving nearby headers in
the current group.
* lisp/gnus/nnselect.el (nnselect-search-thread): Obsolete function.
(nnselect-request-thread): Allow thread referral from nnselect groups.
* doc/misc/gnus.texi (Finding the Parent): Document changes to thread
referral.

20 months agoSupport treesit-thing-settings in search functions
Yuan Fu [Fri, 14 Apr 2023 22:13:11 +0000 (15:13 -0700)]
Support treesit-thing-settings in search functions

* src/treesit.c (safe_assq)
(treesit_traverse_get_predicate): New functions.
(treesit_traverse_validate_predicate)
(treesit_traverse_match_predicate): Support symbols.
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree)
(Ftreesit_node_match_p): Move validation down so we can pass LANGUAGE
to it.

20 months agoAdd a recursion level limit for tree-sitter search predicates
Yuan Fu [Fri, 14 Apr 2023 20:32:55 +0000 (13:32 -0700)]
Add a recursion level limit for tree-sitter search predicates

* src/treesit.c:
(treesit_traverse_validate_predicate): Check for recursion level.
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree)
(Ftreesit_node_match_p): Update uses of
treesit_traverse_validate_predicate.

20 months ago; Minor fixes in treesit.c
Yuan Fu [Fri, 14 Apr 2023 18:19:25 +0000 (11:19 -0700)]
; Minor fixes in treesit.c

* src/treesit.c:
(treesit_initialized): Make static.
(treesit_find_override_name): Add check for XCAR (tail).
(Ftreesit_parser_set_included_ranges): Fix comment.

(treesit_recursion_limit): Change to a compile time
constant.
(treesit_symbol_to_c_name): Precompute the length.
(Ftreesit_pattern_expand): Use predefined symbols.
(treesit_cursor_helper)
(Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Update treesit_recursion_limit.
(syms_of_treesit): New symbols.

20 months agoAdd treesit-thing-settings
Yuan Fu [Fri, 14 Apr 2023 17:37:10 +0000 (10:37 -0700)]
Add treesit-thing-settings

* lisp/treesit.el (treesit--things-around)
(treesit--navigate-thing)
(treesit-thing-at-point): Update docstring.
* src/treesit.c (treesit_traverse_validate_predicate): Refer to
treesit-thing-settings.
(syms_of_treesit): Add Vtreesit_thing_settings.

20 months agoConvert PATTERN and REGEXP to PRED in tree-sitter functions
Yuan Fu [Fri, 14 Apr 2023 04:58:52 +0000 (21:58 -0700)]
Convert PATTERN and REGEXP to PRED in tree-sitter functions

Just changing names.

* lisp/treesit.el (treesit-beginning-of-thing):
(treesit-end-of-thing)
(treesit--things-around)
(treesit--navigate-thing)
(treesit-thing-at-point): Change REGEXP and PATTERN to PRED.

20 months agoMake use of the new pred shapes in treesit.el
Yuan Fu [Fri, 14 Apr 2023 02:48:57 +0000 (19:48 -0700)]
Make use of the new pred shapes in treesit.el

treesit-search-forward and friends now accept more shapes for PRED,
make use of it in navigation functions.

* lisp/treesit.el (treesit-node-top-level): Use treesit-node-match-p.
(treesit--thing-unpack-pattern): Remove function.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Remove PRED argument.
(treesit--things-around): Remove PRED argument, use
treesit-node-match-p.
(treesit--top-level-thing): Remove function.
(treesit--navigate-thing): Remove PRED argument.
(treesit-thing-at-point): Update docstring, don't unpack PATTERN.

* test/src/treesit-tests.el:
(treesit--ert-test-defun-navigation): Don't unpack pattern.

20 months agoAdd treesit-node-match-p
Yuan Fu [Fri, 14 Apr 2023 02:20:53 +0000 (19:20 -0700)]
Add treesit-node-match-p

* src/treesit.c (Ftreesit_node_match_p): New function.

20 months agoPartial support for DEFUN in c-ts-mode (bug#62825)
Yuan Fu [Fri, 14 Apr 2023 19:52:46 +0000 (12:52 -0700)]
Partial support for DEFUN in c-ts-mode (bug#62825)

The DEFUN is hard to incorporate because it's made of two nodes rather
than one, and most tree-sitter functionalities assume a defun is one
node.  I fixed the indent-defun and add-log functionality, but
beginning/end-of-defun and imenu still don't recognize DEFUN.

* lisp/progmodes/c-ts-mode.el (c-ts-mode-emacs-devel): New variable.
(c-ts-mode--defun-name): Support DEFUN.
(c-ts-mode--defun-valid-p): Support DEFUN.
(c-ts-mode--emacs-defun-p)
(c-ts-mode--emacs-defun-at-point): New functions.
(c-ts-mode-indent-defun): Use c-ts-mode--emacs-defun-at-point.
(c-ts-mode--emacs-current-defun-name): New function.
(c-ts-mode, c++-ts-mode): Optionally setup custom defun-name function.

20 months agoDisallow creation of circular variable alias chains
Mattias Engdegård [Fri, 14 Apr 2023 16:26:27 +0000 (18:26 +0200)]
Disallow creation of circular variable alias chains

Make `defvaralias` signal an error upon attempts to create variable
alias cycles.  This detects errors earlier and makes the alias
traversal during execution simpler and faster since no cycle detection
is needed elsewhere.
Now variable and function aliases are handled identically in these
respects.

* src/lisp.h (indirect_variable): Remove declaration.
* src/data.c (indirect_variable): Remove.
(Findirect_variable): Update doc string.  Simplify alias resolution.
(Fboundp, find_symbol_value, set_internal, default_value)
(set_default_internal, Fmake_variable_buffer_local)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_p)
(Flocal_variable_if_set_p, Fvariable_binding_locus):
* src/buffer.c (buffer_local_value):
* src/eval.c (specbind): Simplify variable alias resolution.
(Fdefvaralias): Update doc string.  Check for cycles.
* doc/lispref/variables.texi (Variable Aliases):
Mention that `defvaralias` can signal `cyclic-variable-indirection`
but `indirect-variable` cannot.
* etc/NEWS: Announce the change.
* test/src/eval-tests.el (eval-tests-defvaralias): New test.

20 months agoImprove C++ concept indentation.
Alan Mackenzie [Fri, 14 Apr 2023 16:37:33 +0000 (16:37 +0000)]
Improve C++ concept indentation.

This fixes bug #62386.

* lisp/progmodes/cc-engine.el (c-forward-over-compound-identifier): Don't
move forward over whitespace following the identifier.
(c-forward-primary-expression): Add parameter stop-at-end meaning don't move
forward over whitespace after the construct when non-nil.  Don't recognise a
primary expression when an open brace follows a parenthesized expression.
(c-forward-constraint-clause): Extracted from c-forward-c++-requires-clause.
Add parameter stop-at-end as above.
(c-forward-c++-requires-clause): New stop-at-end parameter as above.  Call the
new function c-forward-constraint-clause.
(c-forward-concept-fragment, c-looking-at-concept)
(c-in-requires-or-at-end-of-clause, c-c++-vsemi-p): New functions.
(c-guess-basic-syntax): New CASE 5A.7: "defun" open in a requires expression.
CASE 5F: Close of a non-class declaration level block: Move to earlier in the
function.
CASE 5D: Also check for being in or at end of a constraint.
New CASE 20: A C++ requires sub-clause.
New CASE 16G: The closing brace of a requires clause.
New CASE 17J: First "statement" inside a requires "function".
(c-forward-primary-expression, c-forward-declarator, c-forward-decl-or-cast-1)
(c-looking-at-or-maybe-in-bracelist): Amend the method of detecting end of
symbol "requires" (aka c-fun-name-substitute-key).

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Amend the method
of detecting end of symbol "requires".

* lisp/progmodes/cc-langs.el (c-at-vsemi-p-fn): Change the C++ entry to
c-c++-vsemi-p.
(c-fun-name-substitute-key): Change to an unadorned regexp.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Add new syntactic symbol
constraint-cont.

* doc/misc/cc-mode.texi (Syntactic Symbols): Add an entry for contraint-cont.
(Constraint Symbols): New node under Syntactic Symbols.

20 months ago* src/nsterm.m (check_native_fs): Add missing void arg.
Robert Pluim [Thu, 13 Apr 2023 08:05:17 +0000 (10:05 +0200)]
* src/nsterm.m (check_native_fs): Add missing void arg.

20 months ago; Fix typos
Michael Albinus [Fri, 14 Apr 2023 12:36:29 +0000 (14:36 +0200)]
; Fix typos

* etc/NEWS: Fix typos.

* lisp/progmodes/flymake.el (flymake-error-echo)
(flymake-warning-echo, flymake-note-echo)
(flymake-show-diagnostics-at-end-of-line): Fix :package-version.

20 months agoUse BASE_EQ in treesit.c
Mattias Engdegård [Fri, 14 Apr 2023 10:15:13 +0000 (12:15 +0200)]
Use BASE_EQ in treesit.c

* src/treesit.c (Ftreesit_node_check, Ftreesit_pattern_expand)
(Ftreesit_query_capture, treesit_traverse_validate_predicate)
(treesit_traverse_match_predicate):
Use BASE_EQ instead of EQ where this is obviously correct.

20 months agoMake c-emacs-features use the proper binding of parse-sexp-lookup-properties
Alan Mackenzie [Fri, 14 Apr 2023 10:33:03 +0000 (10:33 +0000)]
Make c-emacs-features use the proper binding of parse-sexp-lookup-properties

This is relevant for bug #58558, although it does not fix it.  Due to a wrong
ordering of with-current-buffer and a let form, the function overwrote the
global value of parse-sexp-lookup-properties and two other variables.

* lisp/progmodes/cc-defs.el (c-emacs-features): Change the nesting of
with-current-buffer and let so that the let bindings get used.

20 months agoFix style and unwinding code in treesit.c
Eli Zaretskii [Fri, 14 Apr 2023 06:21:05 +0000 (09:21 +0300)]
Fix style and unwinding code in treesit.c

This was supposed to be a cherry-pick from master, but
isn't, due to the unnecessary rush to fix master without
cleaning up the mess first and without separating changes
that can and cannot be backported.
* src/treesit.c (treesit_traverse_cleanup_cursor): Fix indentation
style.
(Ftreesit_search_subtree, Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Fix specpdl unwinding.  (Bug#62823)
Do not merge to master.

20 months agoCatch signals produced by PRED in tree-sitter search functions
Yuan Fu [Thu, 13 Apr 2023 21:36:46 +0000 (14:36 -0700)]
Catch signals produced by PRED in tree-sitter search functions

Earlier we switched to using cursors rather than nodes to traverse the
parse tree.  Because cursors need cleanup, we have to catch signals
thrown by the predicate functions and free the cursor. Failing to do
this will result in leaking the cursor whenever the predicate function
signals in a search function.  This change fixes the leak.
* src/treesit.c (treesit_traverse_cleanup_cursor): New function.
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Catch signals.  (Bug#62823)

(cherry picked from commit a5eb9f6ad4e6f5a2819b540a477f1e889f6ef355)

20 months agoFix tree-sitter test
Yuan Fu [Fri, 14 Apr 2023 02:18:52 +0000 (19:18 -0700)]
Fix tree-sitter test

* test/src/treesit-tests.el:
(treesit-search-forward-predicate-invalid-predicate): Fix test.

20 months agoFix previous commit on tree-sitter
Yuan Fu [Fri, 14 Apr 2023 01:45:07 +0000 (18:45 -0700)]
Fix previous commit on tree-sitter

* src/treesit.c:
(treesit_traverse_validate_predicate): Don't accept symbols.
(treesit_traverse_match_predicate): Don't accept symbols, and use
correct variable for the regexp and pred check.

* test/src/treesit-tests.el:
(treesit-search-forward-predicate): Fix the test.

20 months agoFix and cleanup nnselect-push-info
Andrew G Cohen [Fri, 14 Apr 2023 00:42:29 +0000 (08:42 +0800)]
Fix and cleanup nnselect-push-info

* lisp/gnus/nnselect.el (nnselect-push-info): Don't update backend
marks when quit-config is not nil since gnus-update-marks has already
been called.  Move checking for unread articles outside the
gnus-atomic block so it may be interrupted.  Replace let* with let.
Cleanup code.

20 months agoFix bugs in treesit.o
Po Lu [Fri, 14 Apr 2023 00:01:12 +0000 (08:01 +0800)]
Fix bugs in treesit.o

* src/treesit.c (treesit_traverse_match_predicate): Remove
redundant cast.
(treesit_search_forward, treesit_traverse_cleanup_cursor)
(Ftreesit_search_subtree, Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Fix coding style and specpdl
unwinding.

20 months agoSupport more predicates in tree-sitter search functions
Yuan Fu [Thu, 13 Apr 2023 22:03:05 +0000 (15:03 -0700)]
Support more predicates in tree-sitter search functions

Right now we support regexp strings and predicate functions for the
PRED argument. This change adds support for (not ...) (or ...)
and (regexp . pred) predicates.

I still need to find a place to document the supported shapes of a
predicate.

* src/treesit.c (treesit_traverse_validate_predicate): New function.
(treesit_traverse_match_predicate): Support more predicate shapes.
(treesit_search_dfs):
(treesit_search_forward)
(treesit_build_sparse_tree): Fix docstring (unrelated to this change).
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Use the new function to validate
predicate shape.
(syms_of_treesit): New error Qtreesit_invalid_predicate.

* test/src/treesit-tests.el:
(treesit--ert-search-setup): Add edebug declaration.
(treesit-search-forward-predicate)
(treesit-search-forward-predicate-invalid-predicate): New tests.

20 months agoCatch signals produced by PRED in tree-sitter search functions
Yuan Fu [Thu, 13 Apr 2023 21:36:46 +0000 (14:36 -0700)]
Catch signals produced by PRED in tree-sitter search functions

Earlier we switched to using cursors rather than nodes to traverse the
parse tree.  Because cursors need cleanup, we have to catch signals
thrown by the predicate functions and free the cursor. Failing to do
this will result in leaking the cursor whenever the predicate function
signals in a search function.

This change fixes the leak.

* src/treesit.c (treesit_traverse_cleanup_cursor): New function.
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Catch signals.

20 months agoFix tree-sitter tests
Yuan Fu [Thu, 13 Apr 2023 07:52:17 +0000 (00:52 -0700)]
Fix tree-sitter tests

After 2ce27563ecc, treesit--navigate-things takes a TACTIC argument
instead of using treesit-defun-tactic, so the tests need to change
from binding treesit-defun-tactic to passing the tactic argument,
which is what this change does.

* test/src/treesit-tests.el:
(treesit--ert-insert-and-parse-marker): New argument TACTIC.
(treesit-defun-navigation-nested-1)
(treesit-defun-navigation-nested-2)
(treesit-defun-navigation-nested-3)
(treesit-defun-navigation-top-level): Pass TACTIC argument.

20 months ago; * doc/misc/flymake.texi (Customizable variables): fix broken list
Mattias Engdegård [Thu, 13 Apr 2023 19:38:47 +0000 (21:38 +0200)]
; * doc/misc/flymake.texi (Customizable variables): fix broken list

20 months agoFaster and less wrong cl-defsubst inlining
Mattias Engdegård [Thu, 13 Apr 2023 18:21:11 +0000 (20:21 +0200)]
Faster and less wrong cl-defsubst inlining

Always have inlining of functions defined by `cl-defsubst` let-bind
arguments instead of making incorrect guesses when it might be safe to
substitute them and then botching the substitution.

This change generally results in better and safer code for all
callers, in particular `cl-defstruct` constructors, accessors and
mutators.

* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Remove outdated comment.
(cl--defsubst-expand): Simplify: always let-bind.
(cl--sublis): Remove.
(cl-defstruct): Simplify: remove old hack that is no longer needed.

20 months agoEldoc: don't overdisplay if using eldoc-documentation-compose
João Távora [Thu, 13 Apr 2023 10:46:12 +0000 (11:46 +0100)]
Eldoc: don't overdisplay if using eldoc-documentation-compose

bug#62816

This is about a particular value for 'eldoc-documentation-strategy',
'eldoc-documentation-compose'.  Its helper
'eldoc--documentation-compose-1' was buggy.  It created the callback
for all the backends in 'eldoc-documentation-functions', but arranged
so that it could potentially be invoked immediately and trigger
display, half-defeating the purpose of the "patience" and causing
blinking in the echo area.

Now it creates all the callbacks beforehand and only then passes them
to the corresponding members of eldoc-documentation-functions.  This
sets up the correct state in eldoc--invoke-strategy.

* lisp/emacs-lisp/eldoc.el (eldoc--documentation-compose-1):
Delete.
(eldoc-documentation-compose)
(eldoc-documentation-compose-eagerly): Rework.

20 months agoEglot: fix LSP "languageId" detection
João Távora [Thu, 13 Apr 2023 09:01:27 +0000 (10:01 +0100)]
Eglot: fix LSP "languageId" detection

This sweeping fix has been planned for a while, but a user recently
hit this bug as described in
https://github.com/joaotavora/eglot/discussions/1206.

More and more servers today are "multi-language", meaning can handle
more than one file type.  This relies on the ':languageId' string
being set to the correct value for every buffer managed by Eglot
(TextDocumentItem in LSP parlance).

Previously this string was calculated based on an imperfect heuristic
and was wrong quite often.  Many servers don't even care but some
others do, so we have to fix it.

* lisp/progmodes/eglot.el (eglot-lsp-server): Remove slots
'major-modes' and 'language-id'.  Add slot 'languages'.
(eglot--major-modes, eglot--language-ids): New helpers.
(eglot--lookup-mode): Simplify or maybe complicate.
(eglot--guess-contact): Use new eglot--looup-mode.  Change return
value.
(eglot): Rework docstring.
(eglot-reconnect): Use eglot--language-ids, not id.
(eglot--connect): Setup eglot--languages slot in server.
(eglot--TextDocumentItem): Finally, get correct language id.

* test/lisp/progmodes/eglot-tests.el (eglot--guessing-contact):
Enhance macro.
(eglot-test-server-programs-guess-lang): Update test.

20 months agoFlymake: add new flymake-show-diagnostics-at-end-of-line option
João Távora [Thu, 2 Mar 2023 22:55:31 +0000 (22:55 +0000)]
Flymake: add new flymake-show-diagnostics-at-end-of-line option

Some editors have this.  Depending on your preference, this can either
be wildly distracting and easily confused with actual code, or a
significant early aid that relieves you from moving around or reaching
for the mouse to consult an error message.  To be safe, hide this
behind a customization variable and keep it disabled.

Personally, I find it less obstrusive and more helpful than expected.

* lisp/progmodes/flymake.el (flymake--delete-overlay): New helper.
(flymake--highlight-line): Handle flymake-show-diagnostics-at-end-of-line.
(flymake--clear-foreign-diags): Use flymake--delete-overlay.
(flymake--publish-diagnostics): Use flymake--delete-overlay.
(flymake-mode): Use flymake--delete-overlay.
(flymake-error-echo)
(flymake-warning-echo, flymake-note-echo): New faces.
(flymake-show-diagnostics-at-end-of-line): New option.
(Version): Bump to 1.3.4

* doc/misc/flymake.texi:
(Finding diagnostics): Mention flymake-show-diagnostics-at-end-of-line.
(Customizable variables): Mention
flymake-show-diagnostics-at-end-of-line and a few more relevant faces.

* etc/NEWS (Flymake): Mention flymake-show-diagnostics-at-end-of-line.

20 months agoStronger checking in line-number-at-pos tests
Mattias Engdegård [Thu, 13 Apr 2023 15:35:45 +0000 (17:35 +0200)]
Stronger checking in line-number-at-pos tests

* test/lisp/simple-tests.el (line-number-at-pos-keeps-restriction)
(line-number-at-pos-keeps-point): Check all return values.

20 months agoStop pretending that specpdl overflow can ever occur
Mattias Engdegård [Thu, 13 Apr 2023 15:25:25 +0000 (17:25 +0200)]
Stop pretending that specpdl overflow can ever occur

* src/eval.c (grow_specpdl_allocation): Remove impossible error.
* src/data.c (syms_of_data): Note obsolence of
`excessive-variable-binding`.

20 months ago; reorder function effect-declaration lists
Mattias Engdegård [Thu, 13 Apr 2023 12:08:28 +0000 (14:08 +0200)]
; reorder function effect-declaration lists

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns)
(side-effect-and-error-free-fns, pure-fns): Group by file.

20 months agoUpdate effect declarations for many built-in functions
Mattias Engdegård [Wed, 12 Apr 2023 10:20:12 +0000 (12:20 +0200)]
Update effect declarations for many built-in functions

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns)
(side-effect-and-error-free-fns, pure-fns): Add many functions.
* lisp/subr.el (copy-tree): Declare error-free.

20 months agoFix compilation of w32.c with old MinGW system headers
Eli Zaretskii [Thu, 13 Apr 2023 05:18:33 +0000 (08:18 +0300)]
Fix compilation of w32.c with old MinGW system headers

* src/w32.c (CONSOLE_FONT_INFO): Make sure the definition is not
visible for MinGW versions whose w32api's version is before 5.2.0.
(Bug#52792)

20 months agoruby-add-log-current-method: Reduce the use of 'nreverse'
Dmitry Gutov [Wed, 12 Apr 2023 21:45:54 +0000 (00:45 +0300)]
ruby-add-log-current-method: Reduce the use of 'nreverse'

* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Reduce the use of 'nreverse' (bug#62761).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-singleton-referencing-outer):
New test.

20 months ago(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT): Simplify
Stefan Monnier [Wed, 12 Apr 2023 20:32:39 +0000 (16:32 -0400)]
(RE_SETUP_SYNTAX_TABLE_FOR_OBJECT): Simplify

It turns out all calls to this function pass the same value
for the `count` argument, and they're all in `regexp.c`.

* src/syntax.c (RE_SETUP_SYNTAX_TABLE_FOR_OBJECT):
Rename from `SETUP_SYNTAX_TABLE_FOR_OBJECT`.  Remove `count` argument.
Move call to `RE_SYNTAX_TABLE_BYTE_TO_CHAR` to where its result is
actually used.
* src/regex-emacs.c (re_search_2, re_match_2): Adjust accordingly.

* src/syntax.h (RE_SYNTAX_TABLE_BYTE_TO_CHAR): Rename from
`SYNTAX_TABLE_BYTE_TO_CHAR` to clarify that it takes a byteoffset as
used in the regexp engine and not a "bytepos".  Adjust all callers.

20 months ago(SETUP_SYNTAX_TABLE_FOR_OBJECT): Take a byteoffset
Stefan Monnier [Wed, 12 Apr 2023 19:50:49 +0000 (15:50 -0400)]
(SETUP_SYNTAX_TABLE_FOR_OBJECT): Take a byteoffset

* src/syntax.c (SETUP_SYNTAX_TABLE_FOR_OBJECT): Take a byteoffset.
* src/regex-emacs.c (re_search_2, re_match_2): Simplify accordingly.

20 months agosrc/regex-emacs.c (POS_AS_IN_BUFFER): Delete macro
Stefan Monnier [Wed, 12 Apr 2023 19:44:58 +0000 (15:44 -0400)]
src/regex-emacs.c (POS_AS_IN_BUFFER): Delete macro

That macro added 1 to buffer positions because:

    Strings are 0-indexed, buffers are 1-indexed

but the reality is that this 1 was added to the regexp engine's "byte
offsets" which are not 1-based byte positions as used throughout
the rest of Emacs, but they are BEGV_BYTE-relative offsets, so the two
did not cancel out.

* src/regex-emacs.c (PTR_TO_OFFSET, POS_AS_IN_BUFFER): Delete macros;
use `POINTER_TO_OFFSET` instead.
(re_search_2, re_match_2, re_match_2_internal): Adjust accordingly.
* src/syntax.h (SYNTAX_TABLE_BYTE_TO_CHAR): Don't remove 1 from buffer
byteoffsets now that `POS_AS_IN_BUFFER` doesn't add it any more.

20 months ago(struct gl_state_s): Delete `offset` field
Stefan Monnier [Wed, 12 Apr 2023 19:14:39 +0000 (15:14 -0400)]
(struct gl_state_s): Delete `offset` field

`gl_state` had an `offset` field because:

    For buffers, regex-emacs.c passes arguments to the
    UPDATE_SYNTAX_TABLE functions which are relative to BEGV

but the reality is that these arguments are byte offsets relative to
BEGV_BYTE whereas `offset` was counted in chars, so the two didn't
cancel each other out.

* src/syntax.h (struct gl_state_s): Delete `offset` field.
(UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
(SYNTAX_TABLE_BYTE_TO_CHAR):
* src/syntax.c (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT)
(update_syntax_table, skip_syntaxes): Simplify accordingly.

20 months agoFix detection of WebP images by their signature
Visuwesh [Wed, 12 Apr 2023 13:47:23 +0000 (19:17 +0530)]
Fix detection of WebP images by their signature

* lisp/image.el (image-type-header-regexps): The 4 characters
between "RIFF" and "WEBP" in WebP images can also be newlines.
(Bug#62790)

20 months agoFlymake: futher enhance echo-area appearance of diagnostics
João Távora [Wed, 12 Apr 2023 13:41:13 +0000 (14:41 +0100)]
Flymake: futher enhance echo-area appearance of diagnostics

Also describe new 'echo-face' property in the Flymake manual, and fix
it's mistaken mention of a non-existing 'flymake-severity' property.

* doc/misc/flymake.texi:
(Flymake error types): Describe new properties and correct mention
of 'severity' property.

* lisp/progmodes/flymake.el:
(flymake-diagnostic-oneliner): Rework.
(flymake-error, flymake-warning, flymake-note): Add new 'echo-face' property.
(flymake--highlight-line)
(flymake-eldoc-function)
(flymake--tabulated-entries-1): Use flymake-diagnostic-oneliner
(Version): Bump to 1.3.3

20 months ago; Eglot: make version parseable by version-to-list
João Távora [Wed, 12 Apr 2023 12:08:14 +0000 (13:08 +0100)]
; Eglot: make version parseable by version-to-list

* lisp/progmodes/eglot.el (Version): Correct version.

20 months ago`byte-code-function-p` is error-free
Mattias Engdegård [Wed, 12 Apr 2023 08:42:57 +0000 (10:42 +0200)]
`byte-code-function-p` is error-free

* lisp/emacs-lisp/byte-opt.el
(side-effect-free-fns, side-effect-and-error-free-fns):
Upgrade `byte-code-function-p` to error-free status.

20 months agoBetter compilation of arguments to `ignore`
Mattias Engdegård [Wed, 12 Apr 2023 08:17:01 +0000 (10:17 +0200)]
Better compilation of arguments to `ignore`

* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(byte-compile-ignore):
Instead of compiling each `ignore` argument for value which is then
immediately discarded, compile it for effect but suppress
ignore-return-value warnings by passing the special value
`for-effect-no-warn` as for-effect parameter.
Proposed by Stefan Monnier.

20 months agoAdd more documentation for the keys of `package-vc-selected-packages`.
Earl Hyatt [Tue, 28 Mar 2023 00:57:31 +0000 (20:57 -0400)]
Add more documentation for the keys of `package-vc-selected-packages`.

* doc/emacs/package.texi (Specifying Package Sources): List the
accepted keys in a new subsection of Fetching Package Sources.

* lisp/emacs-lisp/package-vc.el (package-vc-selected-packages):
Mention the `:doc` key.  Add the `:doc` key to the Customize form,
mention the new Info node, correct "TexInfo" to "Texinfo", avoid
Git-specific terms for the description of `:branch`, mention guessing
`:vc-backend` based on the URL.

20 months agoPrompt target dir in treesit-install-language-grammar (bug#62704)
Yuan Fu [Wed, 12 Apr 2023 07:00:26 +0000 (00:00 -0700)]
Prompt target dir in treesit-install-language-grammar (bug#62704)

* lisp/treesit.el (treesit--check-repo-url): New variable.
(treesit-install-language-grammar): Prompt for target directory.

20 months agoDefine sexp in c-ts-mode more broadly (bug#62302)
Yuan Fu [Thu, 6 Apr 2023 21:47:51 +0000 (14:47 -0700)]
Define sexp in c-ts-mode more broadly (bug#62302)

* lisp/progmodes/c-ts-mode.el: Define sexp in c/c++-ts-mode as
anything but delimiters.

20 months agoAdd 'restricted' tactic in tree-sitter navigation functions
Yuan Fu [Thu, 6 Apr 2023 21:38:00 +0000 (14:38 -0700)]
Add 'restricted' tactic in tree-sitter navigation functions

* lisp/treesit.el (treesit-forward-sexp): Add docstring.  Use
'restricted' tactic.
(treesit-transpose-sexps): Fix docstring.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Add support for TACTIC.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Supply treesit-defun-tactic as TACTIC.
(treesit--navigate-thing): Add support for TACTIC.  Wrap the old form
in a new (if (eq tactic 'restricted) (new-code) (old-form)), and
supply the TACTIC parameter when recursing.

20 months agoExpunge immediately when moving articles from nnimap groups
Andrew G Cohen [Wed, 12 Apr 2023 00:13:23 +0000 (08:13 +0800)]
Expunge immediately when moving articles from nnimap groups

* lisp/gnus/nnselect.el (nnselect-request-move-article): Set
nnimap-expunge to immediately.

20 months agoruby-ts-mode: Do not treat parenless calls' args as separate sexp
Dmitry Gutov [Tue, 11 Apr 2023 23:27:51 +0000 (02:27 +0300)]
ruby-ts-mode: Do not treat parenless calls' args as separate sexp

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--sexp-p): New function.
(ruby-ts-mode): Use it in treesit-sexp-type-regexp (bug#62086).

20 months ago; vc-checkout: Wrap var lookup in 'bound-and-true-p'
Dmitry Gutov [Tue, 11 Apr 2023 23:03:14 +0000 (02:03 +0300)]
; vc-checkout: Wrap var lookup in 'bound-and-true-p'

20 months agovc-checkout: Try to use the vc-dir's backend first
Dmitry Gutov [Tue, 11 Apr 2023 19:59:45 +0000 (22:59 +0300)]
vc-checkout: Try to use the vc-dir's backend first

* lisp/vc/vc.el (vc-checkout): Try to use the vc-dir's backend
before looking for the file's one.  The latter doesn't work when
the file doesn't exist on disk yet (bug#62674).

20 months ago; Fix wallpaper-tests on XFCE
Eli Zaretskii [Tue, 11 Apr 2023 14:47:48 +0000 (17:47 +0300)]
; Fix wallpaper-tests on XFCE

* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command-args/return-list): Account for
command-args being a function.  (Bug#62673)

20 months agoImprove documentation related to 'ispell-complete-word'
Eli Zaretskii [Tue, 11 Apr 2023 13:24:13 +0000 (16:24 +0300)]
Improve documentation related to 'ispell-complete-word'

* lisp/textmodes/ispell.el (ispell-alternate-dictionary)
(ispell-complete-word-dict, ispell-complete-word): Doc fixes.
(Bug#62775)

20 months agoFlymake: take advantage of new Eldoc options
João Távora [Tue, 11 Apr 2023 12:35:43 +0000 (13:35 +0100)]
Flymake: take advantage of new Eldoc options

Only echo the first line of a potentially very large error message.

* lisp/progmodes/flymake.el:
(flymake-diagnostic-oneliner): New helper.
(flymake--tabulated-entries-1)
(flymake-eldoc-function): Use it.
(Version): Bump to 1.3.2.
(Package-Requires): Use Eldoc 1.14.0.

20 months ago* configure.ac: Add -lbsd on Haiku.
Po Lu [Tue, 11 Apr 2023 12:07:50 +0000 (20:07 +0800)]
* configure.ac: Add -lbsd on Haiku.

20 months agoAdd menu to 'c-ts-mode' and 'c++-ts-mode'
Eli Zaretskii [Tue, 11 Apr 2023 10:37:25 +0000 (13:37 +0300)]
Add menu to 'c-ts-mode' and 'c++-ts-mode'

* lisp/progmodes/c-ts-mode.el (c-ts-mode-menu): New menu.

20 months agonndiary.el: fix dodgy schedule code
Mattias Engdegård [Tue, 11 Apr 2023 09:57:07 +0000 (11:57 +0200)]
nndiary.el: fix dodgy schedule code

* lisp/gnus/nndiary.el (nndiary-last-occurrence):
Don't sort a list and throw away the result because that leaves the
list variable in an undefined state.  Just take the largest element
because that was obviously what the author meant.

20 months agoallout.el: fix subtree expose numbering bug
Mattias Engdegård [Tue, 11 Apr 2023 09:50:17 +0000 (11:50 +0200)]
allout.el: fix subtree expose numbering bug

* lisp/allout.el (allout-process-exposed): Reverse the list of indices
properly so that the correct numbering for nodes in a subtree is used.
Avoid destructive reversing; the list may be a constant (literal).
This flaw was revealed by an ignored-return-value warning.

20 months agoUpdate manual about `sort`
Mattias Engdegård [Mon, 10 Apr 2023 08:25:11 +0000 (10:25 +0200)]
Update manual about `sort`

* doc/lispref/sequences.texi (Sequence Functions):
Remove inaccurate and over-specific claims about how `sort` works for
lists: there is no guarantee that it doesn't modify the `car` fields
of the input list (which is precisely what it does at this time).

(cherry picked from commit c753a9592345e2084d69e9e2cc458c16db2e4141)