Skip to content

Commit 7864df7

Browse files
committed
Fix Emacs 26.3 compatibility issues
* eglot.el (eglot--semtok-after-send-changes): Use cl-getf instead of plist-get for setf. * eglot-tests.el (eglot--tests-connect): Use split-string instead of string-split. (eglot-test-rust-completion-exit-function): Replace skip-when with skip-unless. (eglot-test-semtok-basic, eglot-test-semtok-refontify): Skip if text-property-search-forward unavailable.
1 parent 7299a33 commit 7864df7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

eglot-tests.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ directory hierarchy."
299299
(eglot-sync-connect t)
300300
(eglot-connect-timeout timeout)
301301
(eglot-server-programs
302-
(if server `((,major-mode . ,(string-split server)))
302+
(if server `((,major-mode . ,(split-string server)))
303303
eglot-server-programs)))
304304
(apply #'eglot--connect (eglot--guess-contact))))
305305

@@ -775,7 +775,7 @@ directory hierarchy."
775775
;; This originally appeared in github#1339
776776
(skip-unless (executable-find "rust-analyzer"))
777777
(skip-unless (executable-find "cargo"))
778-
(skip-when (getenv "EMACS_EMBA_CI"))
778+
(skip-unless (not (getenv "EMACS_EMBA_CI")))
779779
(eglot--with-fixture
780780
'(("cmpl-project" .
781781
(("main.rs" .
@@ -1583,6 +1583,7 @@ GUESSED-MAJOR-MODES-SYM are bound to the useful return values of
15831583
(ert-deftest eglot-test-semtok-basic ()
15841584
"Test basic semantic tokens fontification."
15851585
(skip-unless (executable-find "clangd"))
1586+
(skip-unless (fboundp 'text-property-search-forward))
15861587
(eglot--with-fixture
15871588
`(("project" . (("main.c" . "int main() { int x = 42; return x; }"))))
15881589
(with-current-buffer
@@ -1602,6 +1603,7 @@ GUESSED-MAJOR-MODES-SYM are bound to the useful return values of
16021603
(ert-deftest eglot-test-semtok-refontify ()
16031604
"Test semantic tokens refontification after edits."
16041605
(skip-unless (executable-find "clangd"))
1606+
(skip-unless (fboundp 'text-property-search-forward))
16051607
(eglot--with-fixture
16061608
`(("project" . (("code.c" . "int foo() { return 0; }"))))
16071609
(with-current-buffer

eglot.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5017,7 +5017,7 @@ See `eglot--semtok-request' implementation for details.")
50175017

50185018
(defun eglot--semtok-after-send-changes ()
50195019
;; (trace-values "Dispatching")
5020-
(setf (plist-get eglot--semtok-state :dispatched) t))
5020+
(setf (cl-getf eglot--semtok-state :dispatched) t))
50215021

50225022
(cl-defun eglot--semtok-request (beg end &aux (docver eglot--docver))
50235023
"Ask for tokens. Arrange for BEG..END to be font-lock flushed."

0 commit comments

Comments
 (0)