[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 d63e1a89518: Use point-min to anchor top-level constructs (bug#
From: |
Theodor Thornhill |
Subject: |
emacs-29 d63e1a89518: Use point-min to anchor top-level constructs (bug#60602) |
Date: |
Fri, 20 Jan 2023 16:55:41 -0500 (EST) |
branch: emacs-29
commit d63e1a89518338bc3450b11d6c2d4644cb0440e1
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
Use point-min to anchor top-level constructs (bug#60602)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): New anchor.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): New
anchor.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules): New anchor.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New anchor.
---
lisp/progmodes/c-ts-mode.el | 2 +-
lisp/progmodes/java-ts-mode.el | 2 +-
lisp/progmodes/ruby-ts-mode.el | 2 +-
lisp/progmodes/typescript-ts-mode.el | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 5749e568185..b13e2036f4f 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -167,7 +167,7 @@ delimiters < and >'s."
"Indent rules supported by `c-ts-mode'.
MODE is either `c' or `cpp'."
(let ((common
- `(((parent-is "translation_unit") parent-bol 0)
+ `(((parent-is "translation_unit") point-min 0)
((node-is ")") parent 1)
((node-is "]") parent-bol 0)
((node-is "else") parent-bol 0)
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index d909a366e5d..8251d9603c3 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -69,7 +69,7 @@
(defvar java-ts-mode--indent-rules
`((java
- ((parent-is "program") parent-bol 0)
+ ((parent-is "program") point-min 0)
((node-is "}") (and parent parent-bol) 0)
((node-is ")") parent-bol 0)
((node-is "]") parent-bol 0)
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 2a7d850c3e3..ac0b5d7c6d4 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -555,7 +555,7 @@ a statement container is a node that matches
(let ((common
`(
;; Slam all top level nodes to the left margin
- ((parent-is "program") parent 0)
+ ((parent-is "program") point-min 0)
;; Do not indent here docs or the end. Not sure why it
;; takes the grand-parent but ok fine.
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index 6aaa852895c..903be93422d 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -69,7 +69,7 @@
"Rules used for indentation.
Argument LANGUAGE is either `typescript' or `tsx'."
`((,language
- ((parent-is "program") parent-bol 0)
+ ((parent-is "program") point-min 0)
((node-is "}") parent-bol 0)
((node-is ")") parent-bol 0)
((node-is "]") parent-bol 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 d63e1a89518: Use point-min to anchor top-level constructs (bug#60602),
Theodor Thornhill <=