• Theodor Thornhill's avatar
    Move c-like common utils into own library (bug#60961) · 6adc193a
    Theodor Thornhill authored
    * lisp/progmodes/c-ts-common.el: New file.
    * lisp/progmodes/c-ts-mode.el (treesit-induce-sparse-tree): Remove
    unused declaration.
    (c-ts-mode--indent-styles): Refer to the new library.
    (c-ts-mode--looking-at-star,
    c-ts-mode--comment-start-after-first-star,
    c-ts-mode--comment-2nd-line-matcher,
    c-ts-mode--comment-2nd-line-anchor, c-ts-mode--comment-regexp,
    c-ts-mode--fill-paragraph, c-ts-mode--fill-block-comment): Move to
    c-ts-common and expose as public.
    (c-ts-mode-comment-setup): Move to c-ts-common.
    * lisp/progmodes/csharp-mode.el (c-ts-common): Require new library.
    (csharp-ts-mode--indent-rules): Refer to the new symbols.
    (csharp-ts-mode): Use new function.
    * lisp/progmodes/java-ts-mode.el (c-ts-common): Require new library.
    (java-ts-mode--indent-rules): Refer to the new symbols.
    (java-ts-mode): Use new function.
    * lisp/progmodes/js.el (c-ts-common): Require new library.
    (js--treesit-indent-rules): Refer to the new symbols.
    (js-ts-mode): Use new function.
    * lisp/progmodes/rust-ts-mode.el (c-ts-common): Require new library.
    (rust-ts-mode--indent-rules): Refer to the new symbols.
    (rust-ts-mode): Use new function.
    * lisp/progmodes/typescript-ts-mode.el (c-ts-common): Require new
    library.
    (typescript-ts-mode--indent-rules): Refer to the new symbols.
    (typescript-ts-base-mode): Use new function.
    6adc193a
c-ts-common.el 9.41 KB