bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62752: html-ts-mode: treesit--simple-indent-eval: Wrong number of ar


From: Vincenzo Pupillo
Subject: bug#62752: html-ts-mode: treesit--simple-indent-eval: Wrong number of arguments: #<subr point-min>, 3
Date: Mon, 10 Apr 2023 16:32:35 +0200

Hi, 
I found a bug in html-ts-mode.
If you try to indent this simple html snippet (after enabling html-ts mode) 
and try to indent, say, the first or second line, emacs reports the following 
error:
Matched rule: ((parent-is "fragment") point-min 0)
treesit--simple-indent-eval: Wrong number of arguments: #<subr point-min>, 3

Using parent-bol instead of point-min solves the problem.

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo 
version 1.17.6) of 2023-04-09

The patch is attached.

The fragment is as follows:
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<style>
body {
    background-color: linen;
}

h1 {
    color: maroon;
    margin-left: 40px;
}
</style>
<script>
function myFunc(theObject) {
    theObject.make = "Isotta fraschini";
}

const mycar = {
    make: "Iso Rivolta",
    model: "Grifo",
    year: 1965,
};

// x gets the value "Iso Rivolta"
const x = mycar.make;

myFunc(mycar);
// y gets the value "Isotta fraschini"
const y = mycar.make;

</script>
</head>
  <body>
    <h1 style="color:blue;text-align:center;">This is a heading</h1>
    <p style="color:red;">This is a paragraph.</p>
</body>
</html>

Thank you.
V.

Attachment: 0001-Fixed-the-html-ts-mode-indentation-rule.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]