aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2023-03-05 06:30:15 +0100
committerStefan Kangas2023-03-05 06:30:15 +0100
commit6fb8a4dff7ef22f96ebe1a775240617aabac6526 (patch)
treeb89b588cd0d76d698ffbc1e7556f28d31b7a45ce /test
parent4b3ccf3092eaf5573b0f4968ee9a4515d04fd061 (diff)
parent836044f329a0a96810f2d88471cb040b9d373cce (diff)
downloademacs-6fb8a4dff7ef22f96ebe1a775240617aabac6526.tar.gz
emacs-6fb8a4dff7ef22f96ebe1a775240617aabac6526.zip
Merge from origin/emacs-29
836044f329a Fix c-ts-mode preproc directive indentation 64980a59b65 ; * lisp/files.el (hack-local-variables): Fix typo in the... a7cd125d490 More robustly unspoof HOME in Eglot tests (bug#61637) 6c66dbd02c7 Turn on Eglot inlay hints by default 246f5b541c5 Update ts modes missed in 4c16fd3a512 to use column-0 0bfba49ca7c Robustify Eglot for "transient" projects ea5fd375bb2 Fix documentation of 'normal-mode' in buffers that don't ... 4c16fd3a512 Change tree-sitter indent anchor 'point-min' to 'column-0' f47b3930158 Fix go-ts-mode multi-line string indentation (bug#61923) e0bf2da3db6 ; More accurate doc strings for 'window-at' and 'window-a...
Diffstat (limited to 'test')
-rw-r--r--test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts34
-rw-r--r--test/lisp/progmodes/eglot-tests.el17
2 files changed, 42 insertions, 9 deletions
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts b/test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts
index 57610b5483e..0f9256ad984 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent-preproc.erts
@@ -44,3 +44,37 @@ static void
44/* */ 44/* */
45static void 45static void
46=-=-= 46=-=-=
47
48Code:
49 (lambda ()
50 (c-ts-mode)
51 (setq-local indent-tabs-mode nil)
52 (setq-local c-ts-mode-indent-offset 2)
53 (c-ts-mode-set-style 'gnu)
54 (indent-region (point-min) (point-max)))
55
56Name: Prev-Sibling When Prev-Sibling is Preproc
57
58=-=
59static void
60free_glyph_pool (struct glyph_pool *pool)
61{
62 if (pool)
63 {
64#if defined GLYPH_DEBUG
65 int c = 1;
66#endif
67 int check_this = 3;
68
69#ifdef stuff
70 int c = 1;
71#elif defined stuff
72 int e = 5;
73#else
74 int d = 11;
75 int f = 11;
76#endif
77 int check_this = 3;
78 }
79}
80=-=-=
diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el
index 5d5de59a19a..7a90d68d213 100644
--- a/test/lisp/progmodes/eglot-tests.el
+++ b/test/lisp/progmodes/eglot-tests.el
@@ -103,22 +103,21 @@ then restored."
103 (set (car spec) (cadr spec))) 103 (set (car spec) (cadr spec)))
104 ((stringp (car spec)) (push spec file-specs)))) 104 ((stringp (car spec)) (push spec file-specs))))
105 (unwind-protect 105 (unwind-protect
106 (let* ((home (getenv "HOME")) 106 (let* ((process-environment
107 (process-environment
108 (append 107 (append
109 `(;; Set XDF_CONFIG_HOME to /dev/null to prevent 108 `(;; Set XDF_CONFIG_HOME to /dev/null to prevent
110 ;; user-configuration to have an influence on 109 ;; user-configuration to have an influence on
111 ;; language servers. (See github#441) 110 ;; language servers. (See github#441)
112 "XDG_CONFIG_HOME=/dev/null" 111 "XDG_CONFIG_HOME=/dev/null"
113 ;; ... on the flip-side, a similar technique by 112 ;; ... on the flip-side, a similar technique by
114 ;; Emacs's test makefiles means that HOME is set to 113 ;; Emacs's test makefiles means that HOME is
115 ;; /nonexistent. This breaks some common 114 ;; spoofed to /nonexistent, or sometimes /tmp.
116 ;; installations for LSP servers like pylsp, making 115 ;; This breaks some common installations for LSP
117 ;; these tests mostly useless, so we hack around it 116 ;; servers like pylsp, rust-analyzer making these
118 ;; here with a great big hack. 117 ;; tests mostly useless, so we hack around it here
118 ;; with a great big hack.
119 ,(format "HOME=%s" 119 ,(format "HOME=%s"
120 (if (file-exists-p home) home 120 (expand-file-name (format "~%s" (user-login-name)))))
121 (format "/home/%s" (getenv "USER")))))
122 process-environment)) 121 process-environment))
123 ;; Prevent "Can't guess python-indent-offset ..." messages. 122 ;; Prevent "Can't guess python-indent-offset ..." messages.
124 (python-indent-guess-indent-offset-verbose . nil) 123 (python-indent-guess-indent-offset-verbose . nil)