;;; mhtml-ts-mode.el --- Major mode for HTML using tree-sitter -*- lexical-binding: t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Author: Vincenzo Pupillo <v.pupillo@gmail.com>
;; Maintainer: Vincenzo Pupillo <v.pupillo@gmail.com>
'font-lock-variable-name-face
override start end)))
-;; Embedded languages should be indented according to the language
+;; Embedded languages should be indented according to the language
;; that embeds them.
;; This function signature complies with `treesit-simple-indent-rules'
;; ANCHOR.
(process-send-region mhtml-ts-mode--flymake-process (point-min) (point-max))
(process-send-eof mhtml-ts-mode--flymake-process)))))
+;;;###autoload
(define-derived-mode mhtml-ts-mode html-ts-mode
'("HTML+" (:eval (let ((lang (mhtml-ts-mode--language-at-point (point))))
(cond ((eq lang 'html) "")
Returns a new font lock feature list with no duplicates in the same level.
It can be used to merge font lock feature lists in a multi-language major mode.
FEATURES-LIST-1 and FEATURES-LIST-2 are list of lists of feature symbols."
- (let ((result nil)
+ (let ((result nil)
(features-1 (car features-list-1))
(features-2 (car features-list-2)))
(while (or features-1 features-2)
(error "No rules for language %s in RULES" lang))
((not (alist-get lang new-rules))
(error "No rules for language %s in NEW-RULES" lang))
- (t (let* ((copy-of-rules (copy-tree js--treesit-indent-rules))
+ (t (let* ((copy-of-rules (copy-tree rules))
(lang-rules (alist-get lang copy-of-rules))
(lang-new-rules (alist-get lang new-rules)))
(cond