diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2023-03-05 06:30:15 +0100 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2023-03-05 06:30:15 +0100 |
commit | 6fb8a4dff7ef22f96ebe1a775240617aabac6526 (patch) | |
tree | b89b588cd0d76d698ffbc1e7556f28d31b7a45ce /test | |
parent | 4b3ccf3092eaf5573b0f4968ee9a4515d04fd061 (diff) | |
parent | 836044f329a0a96810f2d88471cb040b9d373cce (diff) | |
download | emacs-6fb8a4dff7ef22f96ebe1a775240617aabac6526.tar.gz |
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.erts | 34 | ||||
-rw-r--r-- | test/lisp/progmodes/eglot-tests.el | 17 |
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 /* */ static void =-=-= + +Code: + (lambda () + (c-ts-mode) + (setq-local indent-tabs-mode nil) + (setq-local c-ts-mode-indent-offset 2) + (c-ts-mode-set-style 'gnu) + (indent-region (point-min) (point-max))) + +Name: Prev-Sibling When Prev-Sibling is Preproc + +=-= +static void +free_glyph_pool (struct glyph_pool *pool) +{ + if (pool) + { +#if defined GLYPH_DEBUG + int c = 1; +#endif + int check_this = 3; + +#ifdef stuff + int c = 1; +#elif defined stuff + int e = 5; +#else + int d = 11; + int f = 11; +#endif + int check_this = 3; + } +} +=-=-= 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." (set (car spec) (cadr spec))) ((stringp (car spec)) (push spec file-specs)))) (unwind-protect - (let* ((home (getenv "HOME")) - (process-environment + (let* ((process-environment (append `(;; Set XDF_CONFIG_HOME to /dev/null to prevent ;; user-configuration to have an influence on ;; language servers. (See github#441) "XDG_CONFIG_HOME=/dev/null" ;; ... on the flip-side, a similar technique by - ;; Emacs's test makefiles means that HOME is set to - ;; /nonexistent. This breaks some common - ;; installations for LSP servers like pylsp, making - ;; these tests mostly useless, so we hack around it - ;; here with a great big hack. + ;; Emacs's test makefiles means that HOME is + ;; spoofed to /nonexistent, or sometimes /tmp. + ;; This breaks some common installations for LSP + ;; servers like pylsp, rust-analyzer making these + ;; tests mostly useless, so we hack around it here + ;; with a great big hack. ,(format "HOME=%s" - (if (file-exists-p home) home - (format "/home/%s" (getenv "USER"))))) + (expand-file-name (format "~%s" (user-login-name))))) process-environment)) ;; Prevent "Can't guess python-indent-offset ..." messages. (python-indent-guess-indent-offset-verbose . nil) |