From: Stefan Kangas Date: Mon, 23 Jan 2023 01:09:15 +0000 (+0100) Subject: Merge from origin/emacs-29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c8e82484ab6744b9d3540895d9dc8b6929439e5;p=emacs.git Merge from origin/emacs-29 b3814b43f60 (ruby-ts--predefined-variables): Fix the $` and $' entries db02cbdfe02 * lisp/find-dired.el (find-dired-with-command): Quote fin... 2343a067c3d Generalize vc-pull-and-push to support more backends (bug... 846838dbab8 Add test suite for sgml-html-meta-auto-coding-function 0fb90f524db Fix decoding HTML files from archives c854ef7a187 ; Fix last change (bug#60556). 8e83604dfe0 Avoid crashes in batch Emacs sub-processes on MS-Windows 808e101fabe Tweak BSD style indentation (bug#60984) 204519a2e73 Fix typo of exposed symbol name 9296e0c6495 Fix typo after move to common lib (bug#61001) e74ba72a6a3 ruby-ts-mode: Fix two additional cases with ruby-method-c... ae7e28a4372 ruby-mode.el: Expand some docstrings with examples 89cb3c3f157 Minor fixes for Haiku 6adc193ad66 Move c-like common utils into own library (bug#60961) # Conflicts: # lisp/progmodes/typescript-ts-mode.el --- 9c8e82484ab6744b9d3540895d9dc8b6929439e5 diff --cc lisp/progmodes/csharp-mode.el index 936420bbe8b,852e893dc25..063cfffe1da --- a/lisp/progmodes/csharp-mode.el +++ b/lisp/progmodes/csharp-mode.el @@@ -908,13 -908,8 +908,13 @@@ Key bindings (treesit-parser-create 'c-sharp) ;; Comments. - (c-ts-mode-comment-setup) + (c-ts-common-comment-setup) + (setq-local treesit-text-type-regexp + (regexp-opt '("comment" + "verbatim_string-literal" + "interpolated_verbatim_string-text"))) + ;; Indent. (setq-local treesit-simple-indent-rules csharp-ts-mode--indent-rules) diff --cc lisp/progmodes/java-ts-mode.el index 532b3f5aefb,af2b0c1fa8d..08929c0aead --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@@ -293,13 -293,8 +293,13 @@@ Return nil if there is no name or if NO (treesit-parser-create 'java) ;; Comments. - (c-ts-mode-comment-setup) + (c-ts-common-comment-setup) + (setq-local treesit-text-type-regexp + (regexp-opt '("line_comment" + "block_comment" + "text_block"))) + ;; Indent. (setq-local treesit-simple-indent-rules java-ts-mode--indent-rules) diff --cc lisp/progmodes/js.el index 4b21ae2290f,b5c912b8b0d..dca93c856fc --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@@ -3854,13 -3806,8 +3854,13 @@@ See `treesit-sexp-type-regexp' for mor ;; Which-func. (setq-local which-func-imenu-joiner-function #'js--which-func-joiner) ;; Comment. - (c-ts-mode-comment-setup) + (c-ts-common-comment-setup) (setq-local comment-multi-line t) + + (setq-local treesit-text-type-regexp + (regexp-opt '("comment" + "template_string"))) + ;; Electric-indent. (setq-local electric-indent-chars (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*". diff --cc lisp/progmodes/typescript-ts-mode.el index 9212d2c590d,34030968806..48f9ac806c1 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@@ -367,12 -321,7 +367,12 @@@ See `treesit-sexp-type-regexp' for mor :syntax-table typescript-ts-mode--syntax-table ;; Comments. - (c-ts-mode-comment-setup) + (c-ts-common-comment-setup) + (setq-local treesit-defun-prefer-top-level t) + + (setq-local treesit-text-type-regexp + (regexp-opt '("comment" + "template_string"))) ;; Electric (setq-local electric-indent-chars