]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 19 Dec 2022 03:42:18 +0000 (04:42 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

65b0040f9fc Backport: ; * lisp/bs.el: Small doc and whitespace fixes

2 years agoMerge from origin/emacs-29
Stefan Kangas [Mon, 19 Dec 2022 03:42:18 +0000 (04:42 +0100)]
Merge from origin/emacs-29

de2239a584a Revert "alist-get testfn argument evaluation correction"
856d889f3a8 Revert "Elide broken but unnecessary `if` optimisations"
8e42e20ed7f Revert "Use equal and member instead of eq and memq"

2 years ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 19 Dec 2022 03:42:18 +0000 (04:42 +0100)]
; Merge from origin/emacs-29

The following commits were skipped:

f4b430140f0 Use equal and member instead of eq and memq
13aa376e935 Elide broken but unnecessary `if` optimisations
17d65c99cd8 alist-get testfn argument evaluation correction

2 years agoMerge from origin/emacs-29
Stefan Kangas [Mon, 19 Dec 2022 03:42:18 +0000 (04:42 +0100)]
Merge from origin/emacs-29

b01d0246d71 * lisp/term/xterm.el (xterm-function-map): Add M-SPC.  (B...
303d6ac1423 Fix moving to trash files that overwrite dangling symlink...
dc78779c0cd Fix SVG scaling (bug#59802)
10415d9651b ; Add useful hint to which-func documentation
c26ab22cf4e ; Improve doc strings of minibuffer-history commands
80f410d281c ; Fix last changes in buffer.c
f04680e067b Fix some naming issues involving query buffers in ERC
173e02f4eb4 ; Fix doc string in ERC's module-activation commands
5a9263a8725 Increment erc-debug-irc-protocol-version to 2
89f54e81576 A better fix for bug#60096
1b9ca1e5e64 ; Fix printing Lisp types in .gdbinit
7575c85efd2 Bump Eglot version to 1.10
a0806bc7ea9 Eglot: fix discrepant eglot-guess-contact/eglot-command-h...
8bf4cdcf79b Avoid recursive process filters in lisp/jsonrpc.el (bug#6...

2 years agobs.el: Use the right buffer context to compute the mode name
Juanma Barranquero [Mon, 19 Dec 2022 01:40:50 +0000 (02:40 +0100)]
bs.el: Use the right buffer context to compute the mode name

* lisp/bs.el (bs--get-mode-name): The function is already called
with the correct buffer as current-buffer; and anyway, START-BUFFER
is usually the wrong one to pass to `format-mode-line'.  This fixes
a bug introduced in 48d33090d0 and c2699583be (back in 2008-01-04).

2 years agoImprove rename-file fix (bug#34069)
Paul Eggert [Sun, 18 Dec 2022 20:57:57 +0000 (12:57 -0800)]
Improve rename-file fix (bug#34069)

* src/fileio.c (Frename_file): No need for a special case to
rename a fifo, since we already tried and failed to rename it.
Also improve symlink handling, in that if readlink fails report an
error rather than trying to treat the link as a regular file.

2 years agoDon’t hang when copying FIFOs
Paul Eggert [Sun, 18 Dec 2022 19:45:06 +0000 (11:45 -0800)]
Don’t hang when copying FIFOs

* src/fileio.c (Fcopy_file): Open the input file with O_NONBLOCK.
This prevents a hang if the input file is a FIFO.
If it’s a regular file O_NONBLOCK has no effect;
otherwise the file is soon rejected anyway.

2 years ago; Fix calls to treesit functions
Eli Zaretskii [Sun, 18 Dec 2022 17:13:10 +0000 (19:13 +0200)]
; Fix calls to treesit functions

* lisp/progmodes/prog-mode.el (treesit-available-p): Declare.
(prog-fill-reindent-defun): Only call treesit.c functions if
treesit-available-p returns non-nil.  Reported by Eduardo Ochs
<eduardoochs@gmail.com>.

2 years agoSuppress memql warning in test
Mattias Engdegård [Sat, 17 Dec 2022 18:13:13 +0000 (19:13 +0100)]
Suppress memql warning in test

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-adjoin-test):
Suppress warning about `memql` argument inside expansion of
`cl-adjoin`.

2 years agoWarn about lambda expressions in comparisons
Mattias Engdegård [Sat, 17 Dec 2022 13:48:34 +0000 (14:48 +0100)]
Warn about lambda expressions in comparisons

Lambda expressions are not comparable; warn about calls such as
(eq x (lambda ...)) etc.

* lisp/emacs-lisp/bytecomp.el (bytecomp--dodgy-eq-arg): Rename to...
(bytecomp--dodgy-eq-arg-p): ...this.  Use pcase.  Add lambda checks.
(bytecomp--value-type-description, bytecomp--arg-type-description)
(bytecomp--check-eq-args, bytecomp--check-memq-args): Add function
checks.  Update calls.  Make compiler-macro arguments optional to
avoid crashes in malformed code.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--with-warning-test): Simplify argument.  Run each
compilation with a fresh (empty) warning cache.  Add ert-info for
easier debugging.
(bytecomp-warn-dodgy-args-eq, bytecomp-warn-dodgy-args-memq):
Add lambda tests.

2 years agoFix compiler macro expansion bug
Mattias Engdegård [Sat, 17 Dec 2022 17:20:48 +0000 (18:20 +0100)]
Fix compiler macro expansion bug

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
When a compiler-macro handler is re-invoked (after macro-expanding
arguments), actually use the result instead of pointlessly dropping it
on the floor.

2 years ago; lisp/progmodes/verilog-mode.el: Collected updates from verilog-mode upstream.
Wilson Snyder [Sun, 18 Dec 2022 13:35:12 +0000 (08:35 -0500)]
; lisp/progmodes/verilog-mode.el: Collected updates from verilog-mode upstream.

* lisp/progmodes/verilog-mode.el (verilog-align-typedef-regexp):
Fix defcustom type to allow nil.
(verilog-at-constraint-p)
(verilog-cparenexp-indent-level, verilog-typedef-enum-re): Fix
test-custom-opts issues.

Co-authored-by: Mattias Engdegård <mattiase@acm.org>
2 years agoRemove Gnulib explicit_bzero module
Paul Eggert [Sun, 18 Dec 2022 08:21:30 +0000 (00:21 -0800)]
Remove Gnulib explicit_bzero module

It’s no longer needed, as it is now merely a thin layer around
C23-style memset_explicit and we might as well just call the
C23 standard function; that’s more forward-looking.
* admin/merge-gnulib (GNULIB_MODULES):
Remove explicit_bzero, and add memset_explicit.
* lib/explicit_bzero.c, m4/explicit_bzero.m4:
Remove these files, which were copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/gnutls.c (gnutls_symmetric_aead):
Use memset_explicit instead of explicit_bzero.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sun, 18 Dec 2022 07:11:55 +0000 (23:11 -0800)]
Update from Gnulib by running admin/merge-gnulib

2 years agoPort better to glibc 2.28+ renameat2
Paul Eggert [Sun, 18 Dec 2022 05:40:02 +0000 (21:40 -0800)]
Port better to glibc 2.28+ renameat2

* configure.ac: Check for renameat2.
* src/sysdep.c (renameat_noreplace): Prefer renameat2 (supplied by
glibc 2.28 and later) to doing the syscall by hand.

2 years ago; lisp/progmodes/verilog-mode.el: Collected updates from verilog-mode upstream.
Wilson Snyder [Sat, 17 Dec 2022 20:00:34 +0000 (15:00 -0500)]
; lisp/progmodes/verilog-mode.el: Collected updates from verilog-mode upstream.

* lisp/progmodes/verilog-mode.el (verilog-beg-block-re-ordered)
(verilog-forward-sexp, verilog-leap-to-head): Support of hideshow
for ifdef/ifndef blocks (#1819).
(verilog-cparenexp-indent-level): Improve multiline indentation
with verilog-indent-lists set to nil.  Indent uvm statements and
system tasks and functions according to the argument position in
the parenthesized expression.
(verilog-extended-complete-re): Fix verilog-beg-of-statement on
local methods.
(verilog-beg-of-statement): Fix indentation of properties inside
ifdef (#1817).
(verilog-declaration-varname-matcher, verilog-fontify-variables):
Add option to enable/disable variable fontification.
(verilog-declaration-varname-matcher): Fix bug in highlighting of
vars on func/task arguments.
(verilog-mark-defun): Fix behavior of verilog-mark-defun (#1805).
(verilog-pretty-declarations): Add support to align
declarations/expressions within the region (#1806).
(verilog-align-typedef-regexp, verilog-align-typedef-words): Add
support for alignment of user defined types (#1803).
(verilog-pretty-declarations): Limit alignment of members of a
struct to consecutive valid declarations.
(verilog-typedef-enum-re): Update minor bug in typedef enum regex.
(verilog-indent-declaration): Fix compiler warning on
verilog-indent-declaration.
(verilog-batch-error-wrapper) (verilog-warn-error,
verilog-warn-fatal) (verilog-warn-fatal-internal): Make
`verilog-warn-fatal' safe for local variables (#1799).  Reported
by Rich-Cloutier.
(verilog-align-comment-distance, verilog-align-comments)
(verilog-align-decl-expr-comments)
(verilog-align-declaration-comments): Support alignment of
parameter/localparam expressions.  Support for expression
alignment in parameter lists.  Support declaration/expression
alignment of 'type' parameters.  Support alignment of inline
comments after `verilog-pretty-expr'.  Alignment of expressions
that do not have blanks before/after operator char Fix on
functions that did not work as expected for this use case.  Use
markers in verilog-pretty-expr to avoid bugs while iterating.
(verilog-pretty-expr): Fix bug in alignment of expressions
(#1797).
(verilog-cparenexp-indent-level): Improve indentation of defun
parameters when indent-lists is nil (#1795).
(verilog-align-assign-expr): Add support to align expressions of
continuous assignments (#1793).
(verilog-pretty-expr): Fix bug in boundaries of
verilog-pretty-expr (#1792) and prevent verilog-pretty-expr from
executing on multiline assignments
(verilog-do-indent): Fix indentation of assignments and enums with
indent-lists nil (#1790).
(verilog-do-indent): Fix alignment of structs and enums
(#1789).
(verilog-backward-sexp, verilog-forward-sexp): Add precedence to
paren expressions for sexp funcs navigation (#1788).
(verilog-declaration-varname-matcher): Fix fontifying of variable
names and overriding of keywords (#1787).
(verilog-do-indent): Fix indentation of paren expr if
verilog-indent-lists is nil (#1785).
(verilog-backward-ws&directives): Fix indentation after double
comment (#1784).
(verilog-beg-of-statement-1): Fix indentation of instances and
declarations right after 'begin' (#1782).
(verilog-declaration-comments-distance): Add variable to adjust
aligned comment distance in declarations
(#1779).
(verilog-indent-ignore-multiline-defines): Add indentation ignore
of multiline defines and custom regexps (#1778).
(verilog-align-declaration-comments): Add support to align
comments in declarations (#1775).
(verilog-pretty-declarations): Fix alignment of user types on
ports declarations.
(verilog-do-indent): Fix indentation of virtual, protected and
static class methods when verilog-indent-lists is nil.
(verilog-get-lineup-indent, verilog-pretty-declarations): Fix
alignment of first port declaration (#1167) (#1771).
(verilog-pretty-declarations): Fix alignment of declaration of
interfaces with modports (#636) (#1770).
(verilog-do-indent): Add `verilog-indent-class-inside-pkg' and fix
indentation of classes inside packages (#286) (#1769).  Reported
by Gonzalo Larumbe.
(verilog-backward-sexp, verilog-forward-sexp)
(verilog-leap-to-class-head, verilog-leap-to-head): Fix
indentation after interface class (#1047) (#1768). Reported by
Gonzalo Larumbe.
(verilog-do-indent): Fix indentation if verilog-indent-lists is
nil (#1703) (#1767). Reported by Gonzalo Larumbe.
(verilog-do-indent): Fix indentation of coverpoints (#1321)
(#1766).
(verilog-backward-sexp, verilog-forward-sexp)
(verilog-leap-to-head): Fix bug in forward-sexp and backward-sexp
for some constructs (#1765) Reported by Gonzalo Larumbe.

2 years ago; * src/xterm.c (x_send_scroll_bar_event): Remove unused variables.
Eli Zaretskii [Sat, 17 Dec 2022 11:41:57 +0000 (13:41 +0200)]
; * src/xterm.c (x_send_scroll_bar_event): Remove unused variables.

2 years ago; * lisp/subr.el (internal--with-narrowing): Simplify
Philip Kaludercic [Fri, 16 Dec 2022 23:11:46 +0000 (00:11 +0100)]
; * lisp/subr.el (internal--with-narrowing): Simplify

(Bug#60130)

2 years ago* lisp/emacs-lisp/package.el (package-report-bug): Autoload it.
Philip Kaludercic [Tue, 29 Nov 2022 21:38:18 +0000 (22:38 +0100)]
* lisp/emacs-lisp/package.el (package-report-bug): Autoload it.

2 years agoMinor improvements to frame synchronization
Po Lu [Sat, 17 Dec 2022 08:22:59 +0000 (16:22 +0800)]
Minor improvements to frame synchronization

* src/xterm.c (x_sync_wait_for_frame_drawn_event): Update
compositor bypass property if frame synchronization is being
disabled.

2 years ago; * lib-src/etags.c (do_move_file): Fix coding style.
Po Lu [Sat, 17 Dec 2022 01:49:08 +0000 (09:49 +0800)]
; * lib-src/etags.c (do_move_file): Fix coding style.

2 years agoUse equal and member instead of eq and memq
Mattias Engdegård [Fri, 16 Dec 2022 11:17:33 +0000 (12:17 +0100)]
Use equal and member instead of eq and memq

* lisp/cedet/semantic/complete.el (semantic-displayer-show-request):
* lisp/descr-text.el (describe-char-categories):
* lisp/mh-e/mh-identity.el (mh-select-identity):
* lisp/transient.el (transient--delay-post-command)
(transient--post-command):
* lisp/vc/vc-git.el (vc-git-create-tag):
* test/lisp/emacs-lisp/cl-lib-tests.el
(cl-lib-nth-value-test-multiple-values):
* lisp/emulation/viper-cmd.el (viper-preserve-cursor-color):
Use `equal` instead of `eq` and `member` instead of `memq` where
the comparison is with literals without guaranteed identity.
In some cases this change corrects evident bugs, in others it is
mostly cosmetic.

2 years agoElide broken but unnecessary `if` optimisations
Mattias Engdegård [Fri, 16 Dec 2022 14:56:04 +0000 (15:56 +0100)]
Elide broken but unnecessary `if` optimisations

* lisp/emacs-lisp/byte-opt.el (byte-optimize-if):
Remove explicit clauses purposing to simplify

    (if X nil t) -> (not X)
    (if X t nil) -> (not (not X))

but never did so because of a coding mistake (eq instead of equal),
found by a recently added warning.  They weren't actually needed
thanks to the optimiser's fixpoint iteration: we eventually get the
same results through

    (if X nil t) -> (if (not X) t nil) -> (if (not X) t) -> (not X)
    (if X t nil) -> (if X t) -> (not (not X))

2 years agoalist-get testfn argument evaluation correction
Mattias Engdegård [Fri, 16 Dec 2022 10:08:02 +0000 (11:08 +0100)]
alist-get testfn argument evaluation correction

* lisp/emacs-lisp/gv.el (alist-get):
Evaluate TESTFN exactly once (previously up to 3 times).
Reduce the macro-expansion to include a call to either assoc or assq,
not both; this reduces the generated code size in some cases.

2 years agoBackport: ; * lisp/bs.el: Small doc and whitespace fixes
Juanma Barranquero [Fri, 16 Dec 2022 17:36:42 +0000 (18:36 +0100)]
Backport: ; * lisp/bs.el: Small doc and whitespace fixes

(cherry picked from commit 8624734504af4572525665c713a47e1b6f439a2c)

2 years ago; * lisp/bs.el: Small doc and whitespace fixes
Juanma Barranquero [Fri, 16 Dec 2022 17:36:42 +0000 (18:36 +0100)]
; * lisp/bs.el: Small doc and whitespace fixes

2 years agoRevert "alist-get testfn argument evaluation correction"
Eli Zaretskii [Fri, 16 Dec 2022 17:29:30 +0000 (19:29 +0200)]
Revert "alist-get testfn argument evaluation correction"

This reverts commit 17d65c99cd812e085d85f790c83ec0d540490a55.

Please don't install unnecessary improvements on the release
branch.

2 years agoRevert "Elide broken but unnecessary `if` optimisations"
Eli Zaretskii [Fri, 16 Dec 2022 17:27:33 +0000 (19:27 +0200)]
Revert "Elide broken but unnecessary `if` optimisations"

This reverts commit 13aa376e93564a8cf2ddbbcf0968c6666620db89.

Please don't install anything on the release branch that is
not a clear bugfix for a known bug.

2 years agoRevert "Use equal and member instead of eq and memq"
Eli Zaretskii [Fri, 16 Dec 2022 17:25:45 +0000 (19:25 +0200)]
Revert "Use equal and member instead of eq and memq"

This reverts commit f4b430140f0866f98bbf18b7094348dc64032813.

Please don't install anything on the release branch that is not
strictly necessary fro Emacs 29.

2 years agoNew option for selecting symbols by double-clicking
Eli Zaretskii [Fri, 16 Dec 2022 16:26:14 +0000 (18:26 +0200)]
New option for selecting symbols by double-clicking

* lisp/mouse.el (mouse-1-double-click-prefer-symbols): New user
option.
(mouse-skip-word): If 'mouse-1-double-click-prefer-symbols' is
non-nil, skip over the entire symbol at point.  (Bug#60080)

2 years agoUse equal and member instead of eq and memq
Mattias Engdegård [Fri, 16 Dec 2022 11:17:33 +0000 (12:17 +0100)]
Use equal and member instead of eq and memq

* lisp/cedet/semantic/complete.el (semantic-displayer-show-request):
* lisp/descr-text.el (describe-char-categories):
* lisp/mh-e/mh-identity.el (mh-select-identity):
* lisp/transient.el (transient--delay-post-command)
(transient--post-command):
* lisp/vc/vc-git.el (vc-git-create-tag):
* test/lisp/emacs-lisp/cl-lib-tests.el
(cl-lib-nth-value-test-multiple-values):
* lisp/emulation/viper-cmd.el (viper-preserve-cursor-color):
Use `equal` instead of `eq` and `member` instead of `memq` where
the comparison is with literals without guaranteed identity.
In some cases this change corrects evident bugs, in others it is
mostly cosmetic.

2 years agoClosures are always non-nil
Mattias Engdegård [Thu, 15 Dec 2022 10:22:06 +0000 (11:22 +0100)]
Closures are always non-nil

* lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp):
Treat closures as true in boolean context.

2 years agoElide broken but unnecessary `if` optimisations
Mattias Engdegård [Fri, 16 Dec 2022 14:56:04 +0000 (15:56 +0100)]
Elide broken but unnecessary `if` optimisations

* lisp/emacs-lisp/byte-opt.el (byte-optimize-if):
Remove explicit clauses purposing to simplify

    (if X nil t) -> (not X)
    (if X t nil) -> (not (not X))

but never did so because of a coding mistake (eq instead of equal),
found by a recently added warning.  They weren't actually needed
thanks to the optimiser's fixpoint iteration: we eventually get the
same results through

    (if X nil t) -> (if (not X) t nil) -> (if (not X) t) -> (not X)
    (if X t nil) -> (if X t) -> (not (not X))

2 years agoalist-get testfn argument evaluation correction
Mattias Engdegård [Fri, 16 Dec 2022 10:08:02 +0000 (11:08 +0100)]
alist-get testfn argument evaluation correction

* lisp/emacs-lisp/gv.el (alist-get):
Evaluate TESTFN exactly once (previously up to 3 times).
Reduce the macro-expansion to include a call to either assoc or assq,
not both; this reduces the generated code size in some cases.

2 years ago* lisp/term/xterm.el (xterm-function-map): Add M-SPC. (Bug#60077)
Eli Zaretskii [Fri, 16 Dec 2022 16:02:57 +0000 (18:02 +0200)]
* lisp/term/xterm.el (xterm-function-map): Add M-SPC.  (Bug#60077)

2 years agotab-bar.el: Fix "void-function cl--set-substring" error
Stefan Monnier [Fri, 16 Dec 2022 16:00:53 +0000 (11:00 -0500)]
tab-bar.el: Fix "void-function cl--set-substring" error

* lisp/tab-bar.el: Use #' to quote function names.
Try and fit within 80 columns.
(tab-bar--load-buttons): Silence compiler warnings about `icons` functions.
(tab-bar-auto-width): Avoid the use of `substring` as a gv-place
because it requires `cl-lib` which we don't (want to) preload.
[ Maybe a better solution would be to not preload tab-bar.el.  ]

2 years agoFix moving to trash files that overwrite dangling symlinks there
Eli Zaretskii [Fri, 16 Dec 2022 15:54:35 +0000 (17:54 +0200)]
Fix moving to trash files that overwrite dangling symlinks there

* lisp/files.el (file-exists-in-trash-p): New function.
(move-file-to-trash): Use it instead of 'file-exists-p' when
testing whether the file exist in the trash.  (Bug#59986)

2 years agoFix SVG scaling (bug#59802)
Manuel Giraud [Tue, 13 Dec 2022 09:10:03 +0000 (10:10 +0100)]
Fix SVG scaling (bug#59802)

Fix SVG scaling with librsvg>2.52 and SVG file with only one known
dimension.

* src/image.c (svg_load_image): Compute a percentage dimension with
the other known dimension.

2 years ago; Add useful hint to which-func documentation
Eli Zaretskii [Fri, 16 Dec 2022 15:43:46 +0000 (17:43 +0200)]
; Add useful hint to which-func documentation

* lisp/progmodes/which-func.el (which-func-non-auto-modes)
(which-func-maxout): Mention the slow startup with Eglot and
how to work around that.  (Bug#60107)

2 years ago; Improve doc strings of minibuffer-history commands
Eli Zaretskii [Fri, 16 Dec 2022 15:32:05 +0000 (17:32 +0200)]
; Improve doc strings of minibuffer-history commands

* lisp/simple.el (goto-history-element, next-history-element)
(previous-history-element): Doc fixes.  (Bug#60103)

2 years ago; Fix last changes in buffer.c
Eli Zaretskii [Fri, 16 Dec 2022 14:46:37 +0000 (16:46 +0200)]
; Fix last changes in buffer.c

* src/buffer.c (other_buffer_safely): Ensure Lisp Interaction mode
in *scratch*.  (Bug#60096)

2 years agoFix some naming issues involving query buffers in ERC
F. Jason Park [Mon, 12 Dec 2022 15:38:44 +0000 (07:38 -0800)]
Fix some naming issues involving query buffers in ERC

* lisp/erc/erc-networks.el
(erc-networks-rename-surviving-target-buffer): Don't kill a surviving
target buffer when another, non-target buffer, possibly not even
belonging to ERC, already exists and sports the target's name.
(erc-networks--reconcile-buffer-names): Always append a network-ID
suffix to a target buffer's name if another buffer of that name
already exists.  (Bug#59976.)
* lisp/erc/erc.el (erc, erc-tls): Revise `:id' portion of doc strings.
Thanks to Mike Kazantsev for the suggestion and for filing this bug
and helping solve it.
* test/lisp/erc/erc-networks-tests.el:
(erc-networks-rename-surviving-target-buffer--query-non-target): Add
new test.
* test/lisp/erc/erc-scenarios-base-association-query.el: New file.
* test/lisp/erc/resources/base/assoc/queries/netnick.eld: New file.
* test/lisp/erc/resources/base/assoc/queries/non-erc.eld: New file.

2 years ago; Fix doc string in ERC's module-activation commands
F. Jason Park [Fri, 16 Dec 2022 07:25:10 +0000 (23:25 -0800)]
; Fix doc string in ERC's module-activation commands

* lisp/erc/erc-common.el (erc--assemble-toggle): Previously, the doc
string implied that a prefix argument was necessary to achieve
connection-wide effects, which might lead a person to think the
interactive code should be an uppercase "P".
* test/lisp/erc/erc-tests.el (define-erc-module--local): Update
expected result of code-gen.

2 years agoIncrement erc-debug-irc-protocol-version to 2
F. Jason Park [Thu, 15 Dec 2022 04:03:15 +0000 (20:03 -0800)]
Increment erc-debug-irc-protocol-version to 2

* lisp/erc/erc.el (erc-debug-irc-protocol-version): Change version to
2 to help dependent tooling detect redacted passwords.
(erc-log-irc-protocol): Don't bother redacting incoming messages.
(Bug#59284.)

2 years agoA better fix for bug#60096
Eli Zaretskii [Fri, 16 Dec 2022 14:29:51 +0000 (16:29 +0200)]
A better fix for bug#60096

* lisp/startup.el (initial-scratch-message):
* lisp/simple.el (get-scratch-buffer-create): Revert last changes.

* src/window.c (Fset_window_configuration): Force recalculation of
Vwindow_list after restoring the windows.
* src/buffer.c (other_buffer_safely): Make sure we always return a
valid buffer, even if 'get-scratch-buffer-create' signals an
error.

2 years ago; Fix printing Lisp types in .gdbinit
Eli Zaretskii [Fri, 16 Dec 2022 12:14:42 +0000 (14:14 +0200)]
; Fix printing Lisp types in .gdbinit

* src/alloc.c (valid_lisp_object_p): Support printing
stack-allocated strings and cons cells.

2 years agoBump Eglot version to 1.10
João Távora [Fri, 16 Dec 2022 09:23:21 +0000 (09:23 +0000)]
Bump Eglot version to 1.10

* lisp/progmodes/eglot.el (Version): Bump to 1.10
(Package-Requires): Bump required versions of jsonrpc and project.

2 years agoEglot: fix discrepant eglot-guess-contact/eglot-command-history
João Távora [Fri, 16 Dec 2022 09:29:32 +0000 (09:29 +0000)]
Eglot: fix discrepant eglot-guess-contact/eglot-command-history

Due to a typo, the defvar eglot--command-history wasn't actually used
in eglot-guess-contact as intended.  That function used a
single-dash-name version of the variable instead.

This worked fine, except that two variables were created instead of
one, and the one actually being used didn't have any docstring.

Rename the variable to eglot-command-history to fix this.  It's better
than renaming the reference in eglot-guess-contact which would lose
user's history for M-x eglot.

* lisp/progmodes/eglot.el (eglot-command-history): Rename from
eglot--command-history.

2 years agoAvoid recursive process filters in lisp/jsonrpc.el (bug#60088)
João Távora [Thu, 15 Dec 2022 15:26:13 +0000 (15:26 +0000)]
Avoid recursive process filters in lisp/jsonrpc.el (bug#60088)

jsonrpc.el may lose JSON-RPC messages because of recursive process
filters.  The problem happens in jsonrpc.el's jsonrpc--process-filter.

The code of the process filter didn't expect to be called recursively
and fails in that case.

But that can happen if the three conditions are verified.

1. the client code invoked by its jsonrpc--connection-receive inside
   the process filter callee immediately sends follow-up input to
   process within the same Lisp stack.  This is a common scenario,
   especially during LSP initialiation sequence used by Eglot, a
   jsonrpc.el client.

2. that follow-up message is large enough for process-send-string to
   send the input in bunches (output from processes can arrive in
   between bunches).

3. the process happens to have already some more output ready

The fix in this commit detects recursive invocations and immediately
re-schedules them as non-recursive calls to the
jsonrpc--process-filter (but started from timers).

* lisp/jsonrpc.el (jsonrpc--process-filter): Rework.
(Version): Bump to 1.0.16.

2 years ago; Fix merge errors
Stefan Kangas [Fri, 16 Dec 2022 07:47:27 +0000 (08:47 +0100)]
; Fix merge errors

2 years agoMerge from origin/emacs-29
Stefan Kangas [Fri, 16 Dec 2022 07:45:06 +0000 (08:45 +0100)]
Merge from origin/emacs-29

033071692c7 ; Fix typos
f4a513344d9 Add lambda_expression-rule to java-ts-mode (bug#60091)
546aed35434 eglot: Add support for new language server csharp-ls
cb761eb7ac4 Use the new tree-sitter commands
037407ad95a Add "function" feature to python-ts-mode (bug#59977)
fee2efe1b03 Add go-ts-mode and go-mod-ts-mode (Bug#60025)
e8f7ab67ad1 Add basic support for hideshow in python-ts-mode (bug#60044)
cac070b23e4 Add "this" keyword to java-ts-mode (bug#60086)
c8d75046a2f When completing relative project file names, use relative...
3b618d0e3ed Avoid segfaults due to invalid selected-window's buffer

# Conflicts:
# lisp/progmodes/sh-script.el

2 years agoFix typo in rcirc function name
Stefan Kangas [Fri, 16 Dec 2022 07:33:47 +0000 (08:33 +0100)]
Fix typo in rcirc function name

* lisp/net/rcirc.el (rcirc-format-strike-through): Rename from
'rcirc-format-strike-trough'.  Make old name into obsolete
function alias.  Update all uses.

2 years ago; Fix typos
Stefan Kangas [Thu, 15 Dec 2022 01:41:20 +0000 (02:41 +0100)]
; Fix typos

2 years agoFix typo in rcirc variable name
Stefan Kangas [Fri, 16 Dec 2022 06:49:17 +0000 (07:49 +0100)]
Fix typo in rcirc variable name

* lisp/net/rcirc.el (rcirc-track-abbreviate-flag): Rename from
misspelled 'rcirc-track-abbrevate-flag'.  Make old name into
obsolete variable alias.
* doc/misc/rcirc.texi (Channels): Update above variable name.

2 years agoFix lisp/bs.el change in commit e0a057c16b of 2022-12-07
Juanma Barranquero [Fri, 16 Dec 2022 06:10:28 +0000 (07:10 +0100)]
Fix lisp/bs.el change in commit e0a057c16b of 2022-12-07

* lisp/bs.el (bs-default-action-list): Before creating a window
first try `display-buffer-reuse-window', but make sure it never
chooses a window in another frame.

2 years ago; Rename 'eshell-flatten-args' token to 'eshell-splice-immediately'
Jim Porter [Mon, 12 Dec 2022 04:19:57 +0000 (20:19 -0800)]
; Rename 'eshell-flatten-args' token to 'eshell-splice-immediately'

This is for symmetry with 'eshell-splice-args' (which performs a
splice later on).  Since this is just an internal symbol not exposed
to users, changing it is safe.

* lisp/eshell/esh-arg.el (eshell-parse-arguments, eshell-finish-arg):
Use 'eshell-splice-immediately'.

2 years agoAdd support for the "splice operator" in Eshell
Jim Porter [Wed, 9 Nov 2022 06:49:23 +0000 (22:49 -0800)]
Add support for the "splice operator" in Eshell

This allows splicing lists in-place in argument lists, which is
particularly important when defining aliases using the '$*' special
variable (bug#59960).

* lisp/eshell/esh-var.el (eshell-parse-variable): Add support for the
splice operator.
(eshell-interpolate-variable): Let 'eshell-parse-variable' handle
adding 'eshell-escape-arg'.
(eshell-complete-variable-reference): Handle the splice operator.

* lisp/eshell/esh-arg.el (eshell-concat-groups)
(eshell-prepare-splice): New functions...
(eshell-resolve-current-argument): ... use them.
(eshell-splice-args): New function.

* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Handle
'eshell-splice-args'.

* lisp/eshell/esh-util.el (eshell-list-to-string): New function...
(eshell-flatten-and-stringify): ... use it.

* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Remove
'eshell-splice-args' sigils in Eshell command forms so that we can
perform completion on splice-expansions.

* lisp/eshell/em-unix.el (eshell-complete-host-reference): Don't try
to complete arguments containing "$@".

* test/lisp/eshell/esh-var-tets.el (esh-var-test/interp-list-var)
(esh-var-test/interp-list-var-concat, esh-var-test/interp-var-splice)
(esh-var-test/interp-var-splice-concat)
(esh-var-test/quoted-interp-list-var)
(esh-var-test/quoted-interp-list-var-concat)
(esh-var-test/quoted-interp-var-splice)
(esh-var-test/quoted-interp-var-splice-concat): New tests.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-all-args-var-splice): New test.

* doc/misc/eshell.texi (Dollars Expansion): Explain the splice
operator.
(Aliases): Expand documentation and use '$@*'.
(Built-ins, Bugs and Ideas): Use '$@*' where appropriate.

* etc/NEWS: Announce this change.

2 years agoSupport completion of variables with the length operator in Eshell
Jim Porter [Sun, 11 Dec 2022 04:52:28 +0000 (20:52 -0800)]
Support completion of variables with the length operator in Eshell

These are forms like '$#VARIABLE'.

* lisp/eshell/esh-var.el (eshell-complete-variable-reference): Support
the length operator.

2 years agoAdd lambda_expression-rule to java-ts-mode (bug#60091)
Theodor Thornhill [Thu, 15 Dec 2022 13:54:17 +0000 (14:54 +0100)]
Add lambda_expression-rule to java-ts-mode (bug#60091)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
rule.

2 years agoeglot: Add support for new language server csharp-ls
Jostein Kjønigsen [Thu, 15 Dec 2022 12:44:39 +0000 (13:44 +0100)]
eglot: Add support for new language server csharp-ls

C# has two popular language servers: Omnisharp Roslyn (already
supported) and csharp-ls (newer, more performant).

* lisp/progmodes/eglot.el: Add new C# language server
csharp-ls.  (Bug#60089)

2 years agoUse the new tree-sitter commands
Yuan Fu [Fri, 16 Dec 2022 01:44:07 +0000 (17:44 -0800)]
Use the new tree-sitter commands

* lisp/progmodes/c-ts-mode.el (c-ts-mode--defun-valid-p)
(c-ts-mode--defun-skipper): New functions.
(c-ts-base-mode): Setup defun navigation.
* lisp/progmodes/sh-script.el (bash-ts-mode): Setup defun navigation.
* lisp/treesit.el (treesit-beginning-of-defun)
(treesit-end-of-defun): Change to new implementation, which is
intended to be used as commands.
(treesit-major-mode-setup): Setup remap for beginning/end-of-defun
commands.

2 years agoAdd "function" feature to python-ts-mode (bug#59977)
Yuan Fu [Fri, 16 Dec 2022 01:25:06 +0000 (17:25 -0800)]
Add "function" feature to python-ts-mode (bug#59977)

* lisp/progmodes/python.el (python--treesit-settings): Add feature.
(python-ts-mode): Add feature.  And fix indentation for the
python-indent-guess-indent-offset code.

2 years agoAdd go-ts-mode and go-mod-ts-mode (Bug#60025)
Randy Taylor [Sun, 11 Dec 2022 23:41:16 +0000 (18:41 -0500)]
Add go-ts-mode and go-mod-ts-mode (Bug#60025)

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-mod support.
* etc/NEWS: Mention them.
* lisp/progmodes/eglot.el (eglot-server-programs): Add them.
* lisp/progmodes/go-ts-mode.el: New major modes with
tree-sitter support.

2 years agoAdd basic support for hideshow in python-ts-mode (bug#60044)
Yuan Fu [Fri, 16 Dec 2022 01:16:28 +0000 (17:16 -0800)]
Add basic support for hideshow in python-ts-mode (bug#60044)

* lisp/progmodes/python.el (python-base-mode): Add setup for
python-ts-mode.

2 years agoAdd "this" keyword to java-ts-mode (bug#60086)
Theodor Thornhill [Thu, 15 Dec 2022 10:48:32 +0000 (11:48 +0100)]
Add "this" keyword to java-ts-mode (bug#60086)

* lisp/progmodes/java-ts-mode.el
(java-ts-mode--font-lock-settings): Add the node to the keyword
feature.

2 years ago* lisp/bs.el: Use modern height preserving method instead of hooks
Juanma Barranquero [Thu, 15 Dec 2022 23:21:16 +0000 (00:21 +0100)]
* lisp/bs.el: Use modern height preserving method instead of hooks

* lisp/bs.el (bs--track-window-changes, bs--remove-hooks): Remove.
(bs-mode): Do not set window-change tracking hooks.
(bs--set-window-height): Pass PRESERVE-SIZE to `fit-window-to-buffer'.

2 years agoWhen completing relative project file names, use relative history
Dmitry Gutov [Thu, 15 Dec 2022 22:45:55 +0000 (00:45 +0200)]
When completing relative project file names, use relative history

* lisp/progmodes/project.el: Require 'cl-lib'.

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Pre-process history entries around completing-read (bug#58447).

This includes both filtering by common-parent-directory prefix and
mapping into relative names.

2 years agoAvoid segfaults due to invalid selected-window's buffer
Eli Zaretskii [Thu, 15 Dec 2022 21:39:58 +0000 (23:39 +0200)]
Avoid segfaults due to invalid selected-window's buffer

* lisp/startup.el (initial-scratch-message): Don't use \\[...]
commands for substitute-command-keys.
* lisp/simple.el (get-scratch-buffer-create): Don't call
substitute-command-keys on initial-scratch-message, to avoid
signaling an error in rare cases.  (Bug#60096)

2 years agoMerge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:16 +0000 (21:13 +0100)]
Merge from origin/emacs-29

99aa00e6e34 Revert 21b387c39bd with last-minute hasty changes (bug#60...
386d6e74d83 Replace an erroneous eq with an equal in cc-defs.el
eb069470631 * lisp/tab-bar.el ([tab-bar]): Use 'make-sparse-keymap' i...
26243f7b65e compile.el: Fix regression with nb of errors in modeline
6e2923d80f8 Make tab-bar-tab-group-format-function backwards-compatib...
b211a63455c Make tab-bar-tab-group-format-function also handle curren...
367022f316e Ensure package directories for source packages from check...
3a633bdd6df ; * etc/NEWS: Fix recent changes.
6aa5d16c643 * test/README (SELECTOR): Add eglot-tests.el to remote fi...
bb27be36ddf Fix bug#60060 in Tramp
d4c2aa4f913 ; * lisp/net/tramp-crypt.el: Fix comment.
8404253d17a * .gitignore: Ignore GDB history files.
12684c3a199 Mention 'tree-sitter' in user manual and NEWS
49d7e0cec6a ; * etc/NEWS: Rearrange entries for tree-sitter supported...
0ad2112a2f0 ; Announce 'toml-ts-mode' in NEWS.

# Conflicts:
# etc/NEWS

2 years ago; Merge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:15 +0000 (21:13 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

98ea7054a71 ; Auto-commit of loaddefs files.

2 years agoMerge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:14 +0000 (21:13 +0100)]
Merge from origin/emacs-29

a15cd55044c ; Don't quote nil in comments
da39200c4be ; Checkdoc fixes in dired-aux.el
fd403a5c5a8 Fix ruby-add-log-current-method after nested class defini...
2ca06aed7b3 Add indent rules to js/typescript/tsx-ts-mode (bug#60074)
a54d5f500c1 Improve fontification in csharp-ts-mode (bug#59897)
3db2f560bb7 Revert "Add expression for generic_name in csharp-ts-mode"
1985762fbd7 Introduce support for TOML config-format
622838b957e Fix handling of % when searching in .tex or .dtx files
3b226b60248 Treat C++ classes as defuns in C Tree-sitter mode (bug#60...
480f41c7deb Add < and > to the syntax table in c++-ts-mode (bug#60049)
fbf0d3b796a Improve fontifications in Typescript mode
f93a5180a61 Update the documentation of overlays (bug#59996)
d51b66ed540 ; Improve description of scoping and let-bindings
752f9dde631 ; Fix a typo in window.el
102a3e3b445 Don't send erc-sasl-user as USER command argument
f0c90888781 Set erc-network to a "given" ID instead of failing
09c0c6b2ba3 Limit casemapping to appropriate ranges in ERC
44b04c0ac1c Actually accept non-symbols as IDs in erc-open
75f26646d4a ; Be nicer when updating browse-url var in erc-compat
0155fc67be3 Respect a nil erc-session-password when reconnecting
9ac80e8a6e4 Add dedicated auth-source section in ERC manual
2d96a18cd09 ; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous...
1d3cbba7dfa ; * lisp/progmodes/cmake-ts-mode.el (auto-mode-alist): $ ...
0cc199f1a61 Better shortdoc examples
931d97bf563 Shortdoc: read and evaluate strings after :eval
be165f75332 Fix Tramp tests in eglot-tests, prefix tests uniquely
8c30cb90ba9 * lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-tem...
3efe4df1d20 Delete temp files after icalendar tests

# Conflicts:
# etc/NEWS

2 years ago; Merge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:14 +0000 (21:13 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

33e0a104649 ; * lisp/keymap.el (keymap-substitute): Doc fix.  (Bug#60...

2 years agoMerge from origin/emacs-29
Stefan Kangas [Thu, 15 Dec 2022 20:13:13 +0000 (21:13 +0100)]
Merge from origin/emacs-29

fafcf02c856 Fix syntax tables of tree-sitter modes (bug#59807)
91b8d9b7db4 ; * admin/notes/tree-sitter/build-module/build.sh: Minor ...
1b0e282a7f8 ; Comment and stylistic change in treesit.el
489b02d03cf * doc/misc/Makefile.in (need_emacsver): Add use-package.

2 years agoRevert 21b387c39bd with last-minute hasty changes (bug#60048).
Juri Linkov [Thu, 15 Dec 2022 19:24:48 +0000 (21:24 +0200)]
Revert 21b387c39bd with last-minute hasty changes (bug#60048).

* lisp/simple.el (completion-list-mode-map): Unbind [up] and [down].
(previous-line-completion, next-line-completion): Remove.

2 years agoReplace an erroneous eq with an equal in cc-defs.el
Alan Mackenzie [Thu, 15 Dec 2022 19:23:19 +0000 (19:23 +0000)]
Replace an erroneous eq with an equal in cc-defs.el

* lisp/progmodes/cc-defs.el (c-looking-at-non-alphnumspace): Replace eq with
equal in the XEmacs branch.

2 years ago* lisp/tab-bar.el ([tab-bar]): Use 'make-sparse-keymap' instead of 'ignore'.
Juri Linkov [Thu, 15 Dec 2022 19:10:28 +0000 (21:10 +0200)]
* lisp/tab-bar.el ([tab-bar]): Use 'make-sparse-keymap' instead of 'ignore'.

This helps to avoid the error in 'where-is-internal' that should
not call :filter unnecessarily (bug#9923).

2 years agocompile.el: Fix regression with nb of errors in modeline
Stefan Monnier [Thu, 15 Dec 2022 18:36:14 +0000 (13:36 -0500)]
compile.el: Fix regression with nb of errors in modeline

* lisp/progmodes/compile.el (compilation-mode-line-errors): Mark it as
risky-local, like `defconst` used to do for us.

2 years agoMake tab-bar-tab-group-format-function backwards-compatible (bug#60073)
Juri Linkov [Thu, 15 Dec 2022 18:03:24 +0000 (20:03 +0200)]
Make tab-bar-tab-group-format-function backwards-compatible (bug#60073)

* lisp/tab-bar.el (tab-bar--format-tab-group): Add condition-case
with wrong-number-of-arguments for backwards-compatibility.
(tab-bar-tab-group-format-default): Simplify.

2 years agoMake tab-bar-tab-group-format-function also handle current group
Gabriel do Nascimento Ribeiro [Thu, 15 Dec 2022 14:58:30 +0000 (11:58 -0300)]
Make tab-bar-tab-group-format-function also handle current group

* lisp/tab-bar.el (tab-bar--format-tab-group): Call
'tab-bar-tab-group-format-default' to format current group tab.
(tab-bar-tab-group-format-default): Update function to also handle
current group tab (bug#60073).

2 years agoEnsure package directories for source packages from checkouts
Philip Kaludercic [Thu, 15 Dec 2022 17:21:24 +0000 (18:21 +0100)]
Ensure package directories for source packages from checkouts

* lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
Set the :dir entry, since `package-vc--unpack-1' assumes the field is
set, as is the case when invoking `package-vc--unpack'.

2 years ago; * etc/NEWS: Fix recent changes.
Randy Taylor [Thu, 15 Dec 2022 16:44:10 +0000 (11:44 -0500)]
; * etc/NEWS: Fix recent changes.

2 years ago* test/README (SELECTOR): Add eglot-tests.el to remote file using libraries.
Michael Albinus [Thu, 15 Dec 2022 15:37:36 +0000 (16:37 +0100)]
* test/README (SELECTOR): Add eglot-tests.el to remote file using libraries.

2 years agoFix bug#60060 in Tramp
Michael Albinus [Thu, 15 Dec 2022 15:37:16 +0000 (16:37 +0100)]
Fix bug#60060 in Tramp

* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Delete `tmpfile' in case of error.  (Bug#60060)

2 years ago; * lisp/net/tramp-crypt.el: Fix comment.
Michael Albinus [Thu, 15 Dec 2022 15:36:38 +0000 (16:36 +0100)]
; * lisp/net/tramp-crypt.el: Fix comment.

2 years agoHandle selection transfer errors earlier
Po Lu [Thu, 15 Dec 2022 12:06:37 +0000 (20:06 +0800)]
Handle selection transfer errors earlier

* src/xselect.c (x_decline_selection_request, struct transfer)
(struct x_selection_request, x_cancel_selection_transfer)
(x_start_selection_transfer, x_continue_selection_transfer):
Give the right serial to x_ignore_errors_for_next_request.
(x_handle_selection_error): New function.
(x_reply_selection_request): Give the right serial to
x_ignore_errors_for_next_request.
* src/xterm.c (x_ignore_errors_for_next_request): New arg
`selection_serial'.  All callers changed.
(x_error_handler): Call selection error handler.
* src/xterm.h (struct x_failable_request): New field
`selection_serial'.

2 years ago* .gitignore: Ignore GDB history files.
Manuel Giraud [Thu, 15 Dec 2022 08:50:32 +0000 (09:50 +0100)]
* .gitignore: Ignore GDB history files.

2 years agoMention 'tree-sitter' in user manual and NEWS
Eli Zaretskii [Thu, 15 Dec 2022 08:47:11 +0000 (10:47 +0200)]
Mention 'tree-sitter' in user manual and NEWS

* doc/emacs/programs.texi (Program Modes): Mention tree-sitter and
the modes supported by it.
* etc/NEWS: Mention tree-sitter in the Installation Changes
section.

2 years ago; * etc/NEWS: Rearrange entries for tree-sitter supported modes.
Eli Zaretskii [Thu, 15 Dec 2022 08:25:27 +0000 (10:25 +0200)]
; * etc/NEWS: Rearrange entries for tree-sitter supported modes.

2 years ago; Announce 'toml-ts-mode' in NEWS.
Eli Zaretskii [Thu, 15 Dec 2022 08:09:25 +0000 (10:09 +0200)]
; Announce 'toml-ts-mode' in NEWS.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Thu, 15 Dec 2022 04:11:35 +0000 (05:11 +0100)]
; Auto-commit of loaddefs files.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Thu, 15 Dec 2022 04:11:34 +0000 (05:11 +0100)]
; Auto-commit of loaddefs files.

2 years ago; Don't quote nil in comments
Stefan Kangas [Thu, 15 Dec 2022 01:24:56 +0000 (02:24 +0100)]
; Don't quote nil in comments

2 years ago; Checkdoc fixes in dired-aux.el
Stefan Kangas [Thu, 15 Dec 2022 01:22:45 +0000 (02:22 +0100)]
; Checkdoc fixes in dired-aux.el

* lisp/dired-aux.el (dired-compare-directories, dired-do-chmod)
(dired-do-chgrp, dired-do-chown, dired-do-touch)
(dired-minibuffer-default-add-shell-commands)
(dired-read-shell-command, dired-mark-prefix)
(dired-mark-postfix, dired-mark-separator, dired-kill-line)
(dired-reset-subdir-switches, dired-add-entry)
(dired-remove-file)
(dired-create-destination-dirs-on-trailing-dirsep)
(dired-maybe-insert-subdir, dired-tree-up, dired-tree-down):
Checkdoc fixes.

2 years agoFix ruby-add-log-current-method after nested class definition
Dmitry Gutov [Thu, 15 Dec 2022 01:21:14 +0000 (03:21 +0200)]
Fix ruby-add-log-current-method after nested class definition

* lisp/progmodes/ruby-mode.el (ruby--add-log-current-indent):
New function.
(ruby-add-log-current-method): Use it.
Check for "class" and "module" indentation to filter out the
definitions which don't include the given position.  Also try to
match "def" only once (for performance), because if the closest
one doesn't include the given position, none will.

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class-outside-methods)
(ruby-add-log-current-method-after-inner-class-outside-methods-with-text):
New tests.

2 years agoMark flymake diagnostic modes as non-interactive
Stefan Kangas [Wed, 14 Dec 2022 22:46:38 +0000 (23:46 +0100)]
Mark flymake diagnostic modes as non-interactive

* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode)
(flymake-project-diagnostics-mode): Mark modes as non-interactive.

2 years agoAdd indent rules to js/typescript/tsx-ts-mode (bug#60074)
Theodor Thornhill [Wed, 14 Dec 2022 20:23:33 +0000 (21:23 +0100)]
Add indent rules to js/typescript/tsx-ts-mode (bug#60074)

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add in binary_expression and
jsx_fragment.
* lisp/progmodes/js.el (js--treesit-indent-rules): Add the same rules.

2 years agoImprove fontification in csharp-ts-mode (bug#59897)
Jostein Kjønigsen [Thu, 8 Dec 2022 10:07:15 +0000 (11:07 +0100)]
Improve fontification in csharp-ts-mode (bug#59897)

Fixes highlighting of generic methods like the one below:

instance.MethodWithTypeArguments<Type>(...);
InClassMethodWithTypeArguments<Type>(...);

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add new rule.

2 years agoRevert "Add expression for generic_name in csharp-ts-mode"
Yuan Fu [Wed, 14 Dec 2022 22:28:29 +0000 (14:28 -0800)]
Revert "Add expression for generic_name in csharp-ts-mode"

I applied the wrong commit, the next commit will be the right one,
sorry about that!

This reverts commit 647b6a8099f414e5a7b162efd3658e174064dfe7.

2 years agoIntroduce support for TOML config-format
Jostein Kjønigsen [Sun, 11 Dec 2022 12:05:29 +0000 (13:05 +0100)]
Introduce support for TOML config-format

This commit introduces support for the semi-popular TOML
config-format[1] through a new major-mode: toml-ts-mode.

I've read through the full spec[2], and from what I can see this
major-mode should provide correct syntax-highligting for every sort of
config-declaration which adheres to the specification.

Besides that it also adds support for imenu and basic tree-sitter
based navigation.

[1] https://toml.io/en/
[2] https://toml.io/en/v1.0.0

2 years agoFix handling of % when searching in .tex or .dtx files
Arash Esbati [Wed, 14 Dec 2022 20:17:30 +0000 (21:17 +0100)]
Fix handling of % when searching in .tex or .dtx files

* lisp/textmodes/reftex.el (reftex-compile-variables): Consider %
when building the regexp for searching only in .dtx files.
(AUCTeX bug#59638)