Commit graph

89628 commits

Author SHA1 Message Date
Mattias Engdegård
68fb06f47f 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.
2022-12-18 14:48:54 +01:00
Wilson Snyder
2c2ecb46b0 ; 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>
2022-12-18 08:35:12 -05:00
Wilson Snyder
0dddf9849e ; 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.
2022-12-17 15:00:34 -05:00
Philip Kaludercic
83d9fa6a28 ; * lisp/subr.el (internal--with-narrowing): Simplify
(Bug#60130)
2022-12-17 12:18:56 +01:00
Philip Kaludercic
3b226f769e * lisp/emacs-lisp/package.el (package-report-bug): Autoload it. 2022-12-17 12:18:55 +01:00
Mattias Engdegård
6a390fd42e 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.
2022-12-16 19:18:34 +01:00
Mattias Engdegård
6283b92334 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))
2022-12-16 19:18:34 +01:00
Mattias Engdegård
30d2b72c41 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.
2022-12-16 19:18:34 +01:00
Juanma Barranquero
8624734504 ; * lisp/bs.el: Small doc and whitespace fixes 2022-12-16 18:38:22 +01:00
Eli Zaretskii
12424cf31d 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)
2022-12-16 18:26:14 +02:00
Mattias Engdegård
b29be11a6f Closures are always non-nil
* lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp):
Treat closures as true in boolean context.
2022-12-16 17:18:44 +01:00
Stefan Monnier
9452dc4821 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.  ]
2022-12-16 11:00:53 -05:00
Stefan Kangas
03892d4f7c Merge from origin/emacs-29
033071692c ; Fix typos
f4a513344d Add lambda_expression-rule to java-ts-mode (bug#60091)
546aed3543 eglot: Add support for new language server csharp-ls
cb761eb7ac Use the new tree-sitter commands
037407ad95 Add "function" feature to python-ts-mode (bug#59977)
fee2efe1b0 Add go-ts-mode and go-mod-ts-mode (Bug#60025)
e8f7ab67ad Add basic support for hideshow in python-ts-mode (bug#60044)
cac070b23e Add "this" keyword to java-ts-mode (bug#60086)
c8d75046a2 When completing relative project file names, use relative...
3b618d0e3e Avoid segfaults due to invalid selected-window's buffer

# Conflicts:
#	lisp/progmodes/sh-script.el
2022-12-16 08:45:06 +01:00
Stefan Kangas
b52d0147e9 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.
2022-12-16 08:33:47 +01:00
Stefan Kangas
033071692c ; Fix typos 2022-12-16 08:29:28 +01:00
Stefan Kangas
0c4ca9f007 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.
2022-12-16 08:02:17 +01:00
Juanma Barranquero
d9ab1027b1 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.
2022-12-16 07:16:23 +01:00
Jim Porter
b8eef7b8c1 ; 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'.
2022-12-15 21:41:03 -08:00
Jim Porter
e63ef66c57 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.
2022-12-15 21:41:03 -08:00
Jim Porter
66ac920b0c 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.
2022-12-15 21:41:03 -08:00
Theodor Thornhill
f4a513344d
Add lambda_expression-rule to java-ts-mode (bug#60091)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
rule.
2022-12-15 19:26:42 -08:00
Jostein Kjønigsen
546aed3543 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)
2022-12-16 03:09:28 +01:00
Yuan Fu
cb761eb7ac
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.
2022-12-15 17:44:07 -08:00
Yuan Fu
037407ad95
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.
2022-12-15 17:29:44 -08:00
Randy Taylor
fee2efe1b0
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.
2022-12-15 17:20:50 -08:00
Yuan Fu
e8f7ab67ad
Add basic support for hideshow in python-ts-mode (bug#60044)
* lisp/progmodes/python.el (python-base-mode): Add setup for
python-ts-mode.
2022-12-15 17:16:28 -08:00
Theodor Thornhill
cac070b23e
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.
2022-12-15 17:12:10 -08:00
Juanma Barranquero
c585ca89a6 * 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'.
2022-12-16 00:21:16 +01:00
Dmitry Gutov
c8d75046a2 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.
2022-12-16 00:46:20 +02:00
Eli Zaretskii
3b618d0e3e 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)
2022-12-15 23:39:58 +02:00
Stefan Kangas
0d60579b6b Merge from origin/emacs-29
99aa00e6e3 Revert 21b387c39b with last-minute hasty changes (bug#60...
386d6e74d8 Replace an erroneous eq with an equal in cc-defs.el
eb06947063 * lisp/tab-bar.el ([tab-bar]): Use 'make-sparse-keymap' i...
26243f7b65 compile.el: Fix regression with nb of errors in modeline
6e2923d80f Make tab-bar-tab-group-format-function backwards-compatib...
b211a63455 Make tab-bar-tab-group-format-function also handle curren...
367022f316 Ensure package directories for source packages from check...
3a633bdd6d ; * etc/NEWS: Fix recent changes.
6aa5d16c64 * test/README (SELECTOR): Add eglot-tests.el to remote fi...
bb27be36dd Fix bug#60060 in Tramp
d4c2aa4f91 ; * lisp/net/tramp-crypt.el: Fix comment.
8404253d17 * .gitignore: Ignore GDB history files.
12684c3a19 Mention 'tree-sitter' in user manual and NEWS
49d7e0cec6 ; * etc/NEWS: Rearrange entries for tree-sitter supported...
0ad2112a2f ; Announce 'toml-ts-mode' in NEWS.

# Conflicts:
#	etc/NEWS
2022-12-15 21:13:16 +01:00
Stefan Kangas
eacdac3c6e Merge from origin/emacs-29
a15cd55044 ; Don't quote nil in comments
da39200c4b ; Checkdoc fixes in dired-aux.el
fd403a5c5a Fix ruby-add-log-current-method after nested class defini...
2ca06aed7b Add indent rules to js/typescript/tsx-ts-mode (bug#60074)
a54d5f500c Improve fontification in csharp-ts-mode (bug#59897)
3db2f560bb Revert "Add expression for generic_name in csharp-ts-mode"
1985762fbd Introduce support for TOML config-format
622838b957 Fix handling of % when searching in .tex or .dtx files
3b226b6024 Treat C++ classes as defuns in C Tree-sitter mode (bug#60...
480f41c7de Add < and > to the syntax table in c++-ts-mode (bug#60049)
fbf0d3b796 Improve fontifications in Typescript mode
f93a5180a6 Update the documentation of overlays (bug#59996)
d51b66ed54 ; Improve description of scoping and let-bindings
752f9dde63 ; Fix a typo in window.el
102a3e3b44 Don't send erc-sasl-user as USER command argument
f0c9088878 Set erc-network to a "given" ID instead of failing
09c0c6b2ba Limit casemapping to appropriate ranges in ERC
44b04c0ac1 Actually accept non-symbols as IDs in erc-open
75f26646d4 ; Be nicer when updating browse-url var in erc-compat
0155fc67be Respect a nil erc-session-password when reconnecting
9ac80e8a6e Add dedicated auth-source section in ERC manual
2d96a18cd0 ; * lisp/emacs-lisp/shortdoc.el: fix mistakes in previous...
1d3cbba7df ; * lisp/progmodes/cmake-ts-mode.el (auto-mode-alist): $ ...
0cc199f1a6 Better shortdoc examples
931d97bf56 Shortdoc: read and evaluate strings after :eval
be165f7533 Fix Tramp tests in eglot-tests, prefix tests uniquely
8c30cb90ba * lisp/vc/vc-git.el (vc-git-checkin): Use make-nearby-tem...
3efe4df1d2 Delete temp files after icalendar tests

# Conflicts:
#	etc/NEWS
2022-12-15 21:13:14 +01:00
Stefan Kangas
fa70076974 Merge from origin/emacs-29
fafcf02c85 Fix syntax tables of tree-sitter modes (bug#59807)
91b8d9b7db ; * admin/notes/tree-sitter/build-module/build.sh: Minor ...
1b0e282a7f ; Comment and stylistic change in treesit.el
489b02d03c * doc/misc/Makefile.in (need_emacsver): Add use-package.
2022-12-15 21:13:13 +01:00
Juri Linkov
99aa00e6e3 Revert 21b387c39b 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.
2022-12-15 21:27:36 +02:00
Alan Mackenzie
386d6e74d8 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.
2022-12-15 19:23:19 +00:00
Juri Linkov
eb06947063 * 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).
2022-12-15 21:10:28 +02:00
Stefan Monnier
26243f7b65 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.
2022-12-15 13:36:14 -05:00
Juri Linkov
6e2923d80f 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.
2022-12-15 20:03:24 +02:00
Gabriel do Nascimento Ribeiro
b211a63455 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).
2022-12-15 20:00:21 +02:00
Philip Kaludercic
367022f316 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'.
2022-12-15 18:31:13 +01:00
Michael Albinus
bb27be36dd Fix bug#60060 in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Delete `tmpfile' in case of error.  (Bug#60060)
2022-12-15 16:37:16 +01:00
Michael Albinus
d4c2aa4f91 ; * lisp/net/tramp-crypt.el: Fix comment. 2022-12-15 16:36:38 +01:00
Stefan Kangas
98ea7054a7 ; Auto-commit of loaddefs files. 2022-12-15 05:11:35 +01:00
Stefan Kangas
09a985ae9f ; Auto-commit of loaddefs files. 2022-12-15 05:11:34 +01:00
Stefan Kangas
a15cd55044 ; Don't quote nil in comments 2022-12-15 02:35:00 +01:00
Stefan Kangas
da39200c4b ; 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.
2022-12-15 02:35:00 +01:00
Dmitry Gutov
fd403a5c5a 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.
2022-12-15 03:21:44 +02:00
Stefan Kangas
8ab1f09e09 Mark flymake diagnostic modes as non-interactive
* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode)
(flymake-project-diagnostics-mode): Mark modes as non-interactive.
2022-12-14 23:48:44 +01:00
Theodor Thornhill
2ca06aed7b
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.
2022-12-14 14:39:29 -08:00
Jostein Kjønigsen
a54d5f500c
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.
2022-12-14 14:30:52 -08:00