emacs/lisp/progmodes
Jørgen Kvalsvik e49b479f86
Fix c-ts-mode indentation for initializer lists (bug#73661)
The intentation behavior differed between c-mode/c++-mode
and *-ts-mode for initializer lists where the first element was
not at beginning-of-line.  The anchor-prev-sibling function gave
up and returned nil, but it should (probably) anchor on the
first element in the initializer list, such as this:

return { v1, v2, ...,
         y1, y2, ... };

c-ts-mode behaved better and figured out how to align, but I
added a test for a similar compound literal to prevent
regressions.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling):
Anchor at first sibling unless bol is found.

* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New
initializer list and compound literal test.

Copyright-paperwork-exempt: yes
2024-10-10 00:05:42 -07:00
..
antlr-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
asm-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
autoconf.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bat-mode.el Update Arni Magnusson's email address 2024-10-05 02:30:41 +02:00
bug-reference.el Standardize possessive apostrophe usage in manuals, docs, and comments 2024-07-25 03:35:18 +02:00
c-ts-common.el ; Minor fix in c-ts-common--fill-block-comment 2024-08-06 22:00:01 -07:00
c-ts-mode.el Fix c-ts-mode indentation for initializer lists (bug#73661) 2024-10-10 00:05:42 -07:00
cc-align.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-awk.el Correctly highlight SYMTAB in awk-mode 2024-07-07 03:41:09 +02:00
cc-bytecomp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-cmds.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-defs.el Revert "Suppress docstring control char warning in macro-generated function" 2024-03-07 14:29:36 +01:00
cc-engine.el FIx spurious fontification of variable in Java Mode 2024-07-22 12:24:43 +00:00
cc-fonts.el ; Fix typos in symbol names 2024-01-21 15:28:06 +01:00
cc-guess.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-langs.el Remove a reference to a non-existant variable from a doc-string 2024-07-01 20:37:28 +00:00
cc-menus.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cc-mode.el In normal-mode, make c-mode call c-mode when CC Mode is loaded 2024-05-30 12:40:07 +00:00
cc-styles.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cc-vars.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cfengine.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cl-font-lock.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cmacexp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
cmake-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
compile.el Allow to expand truncated long lines in *Compilation* buffers 2024-06-22 13:40:11 +03:00
cperl-mode.el ; cperl-mode.el: Fix an invalid face specification 2024-09-26 15:20:01 +02:00
cpp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
csharp-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
cwarn.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
dcl-mode.el Delete redundant mention of `with-eval-after-load' 2024-06-29 21:16:58 +02:00
dockerfile-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
ebnf-abn.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-bnf.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-dtd.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-ebx.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-iso.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-otz.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf-yac.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebnf2ps.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
ebrowse.el ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
eglot.el Eglot: use :immediate t when resolving completions (bug#73279) 2024-10-09 06:30:30 -05:00
elisp-mode.el (eval-last-sexp): Fix bug#71774 2024-06-27 14:43:32 -04:00
elixir-ts-mode.el Remove duplicate indent rules in elixir-ts-mode 2024-10-07 17:27:13 -07:00
erts-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
etags-regen.el etags-regen-file-extensions: Enable for more extensions 2024-09-23 21:35:19 +03:00
etags.el Fix 'list-tags' when invoked from a non-file buffer 2024-10-04 14:39:50 +03:00
executable.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
f90.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake-cc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
flymake-proc.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
flymake.el ; * lisp/progmodes/flymake.el: Fix "Maintainer" header 2024-08-29 22:30:38 +02:00
fortran.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
gdb-mi.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
glasses.el With glasses-uncapitalize-p, use a display overlay property 2024-04-20 11:30:13 +03:00
go-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
grep.el ; (grep-read-files): Fix completion table 2024-07-02 14:12:40 +02:00
gud.el Fix LLDB frame-format for optional column number info 2024-06-01 21:05:50 +02:00
heex-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
hideif.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
hideshow.el Simplify mode-indexed tables in packages 2024-03-09 10:29:32 -05:00
icon.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-complete-structtag.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlw-help.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
idlw-shell.el Pacify some docstring control char warnings 2024-02-28 17:04:20 +01:00
idlw-toolbar.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
idlwave.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
inf-lisp.el ; Fix typos 2024-06-23 16:40:06 +02:00
java-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
js.el js-ts-mode: Make jsdoc's "description" block a comment (bug#72461) 2024-08-04 20:18:48 -07:00
json-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
ld-script.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
lua-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
m4-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
make-mode.el ; Fix typos 2024-08-29 00:17:10 +02:00
meta-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
mixal-mode.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
modula2.el modula2.el: Avoid font-lock-*-face variables 2024-02-09 14:22:14 -05:00
octave.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
opascal.el (pcase): New _ syntax in pred/app functions 2024-02-11 22:00:44 -05:00
pascal.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
peg.el * lisp/progmodes/peg.el (peg-syntax-classes): Typo (bug#72131) 2024-07-19 14:18:29 -04:00
perl-mode.el ; Minor copy edits 2024-04-09 22:40:43 +03:00
php-ts-mode.el ; Fix last changes in php-ts-mode.el 2024-09-28 15:06:44 +03:00
prog-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
project.el ; project-files-relative-names: Update docstring (bug#72701) 2024-09-09 00:00:45 +03:00
prolog.el doc: Delete extraneous quotes around keys 2024-01-21 14:09:34 +01:00
ps-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
python.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
ruby-mode.el Add new option ruby-bracketed-args-indent 2024-09-02 21:55:16 +03:00
ruby-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
rust-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
scheme.el ; Fix typos 2024-07-18 11:46:50 +02:00
sh-script.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
simula.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
sql.el Update and improve UI of sql-read-product (bug#73412) 2024-09-21 22:23:11 +02:00
subword.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
tcl.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
typescript-ts-mode.el Revert "Set treesit-primary-parser for tree-sitter modes" 2024-10-08 17:33:11 -07:00
vera-mode.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
verilog-mode.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
vhdl-mode.el vhdl-mode.el: Reduce use of eval 2024-02-27 08:24:45 -05:00
which-func.el ; Fix thinko in my last change 2024-05-27 22:39:03 +02:00
xref.el Checkdoc fixes in progmodes 2024-07-07 17:46:30 +02:00
xscheme.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00