From: Stefan Kangas Date: Tue, 21 Feb 2023 09:58:00 +0000 (+0100) Subject: Merge from origin/emacs-29 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=839a86b02ba0043f5c8d0ac1f33c9c7b55314d00;p=emacs.git Merge from origin/emacs-29 5a864f23eb8 regex-emacs.c: Reduce the use of backtracking a bit further e83c78b8c77 Eglot: respect user's Eldoc configuration by default 5d0b45cd67b Make the native compiler always use `make-temp-file' for ... 88ee92e61d7 ; * lisp/progmodes/rust-ts-mode.el (treesit-node-end): De... 02aba20d528 Update to Transient v0.3.7-216-gfe40342 d7010d64b21 Add declaration_list to c-ts-common-indent-type-regexp-alist 19480aa30e3 Typescript-ts-mode: Add switch case handling dfc850ca022 Fix object initializer for csharp-mode (bug#61541) fc4bfa76db9 Update to Org 9.6.1-34-geea8da afbce8bb467 Improve tree-sitter indent anchor prev-adaptive-prefix (b... 2e6093b425e Adjust jsx indentation c544df4fa3f Cleanup preproc indent for c-ts-mode (bug#61558) d397f3d5084 Add comment style toggle for c-ts-mode (bug#61550) 683961cd733 * lisp/simple.el (choose-completion): Check for completio... 1ac05eac74b rust-ts-mode--font-lock-settings: Avoid the explicit 'def... b5bea14ca17 * lisp/progmodes/xref.el: Bump the version. # Conflicts: # src/comp.c --- 839a86b02ba0043f5c8d0ac1f33c9c7b55314d00 diff --cc lisp/progmodes/c-ts-mode.el index 8a4cc2fac18,6d70dc3198e..b7a487687a8 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@@ -887,14 -898,10 +929,15 @@@ To use tree-sitter C/C++ modes by defau in your configuration." :group 'c++ + :after-hook (c-ts-mode-set-modeline) (when (treesit-ready-p 'cpp) + (setq-local treesit-text-type-regexp + (regexp-opt '("comment" + "raw_string_literal"))) + (treesit-parser-create 'cpp) + ;; Syntax. (setq-local syntax-propertize-function #'c-ts-mode--syntax-propertize) diff --cc lisp/progmodes/js.el index 90813c8de34,027d6053f6e..dc49d7e818c --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@@ -3866,14 -3820,9 +3868,14 @@@ See `treesit-sexp-type-regexp' for mor ;; Comment. (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 "[]*". + (append "{}():;,<>/" electric-indent-chars)) ;FIXME: js2-mode adds "[]*". (setq-local electric-layout-rules '((?\; . after) (?\{ . after) (?\} . before)))