|
2 | 2 |
|
3 | 3 | ;; Copyright (C) 2018-2026 Free Software Foundation, Inc. |
4 | 4 |
|
5 | | -;; Version: 1.20 |
| 5 | +;; Version: 1.21 |
6 | 6 | ;; Author: João Távora <joaotavora@gmail.com> |
7 | 7 | ;; Maintainer: João Távora <joaotavora@gmail.com> |
8 | 8 | ;; URL: https://github.com/joaotavora/eglot |
@@ -1132,7 +1132,7 @@ object." |
1132 | 1132 | :rangeFormatting `(:dynamicRegistration :json-false) |
1133 | 1133 | :rename `(:dynamicRegistration :json-false) |
1134 | 1134 | :semanticTokens `(:dynamicRegistration :json-false |
1135 | | - :requests '(:full (:delta t)) |
| 1135 | + :requests (:full (:delta t)) |
1136 | 1136 | :overlappingTokenSupport t |
1137 | 1137 | :multilineTokenSupport t |
1138 | 1138 | :tokenTypes [,@eglot-semantic-token-types] |
@@ -2172,21 +2172,21 @@ MARKUP is either an LSP MarkedString or MarkupContent object." |
2172 | 2172 | (setq-local markdown-fontify-code-blocks-natively t) |
2173 | 2173 | (insert string) |
2174 | 2174 | (let ((inhibit-message t) |
2175 | | - (message-log-max nil) |
2176 | | - match) |
| 2175 | + (message-log-max nil)) |
2177 | 2176 | (ignore-errors (delay-mode-hooks (funcall render-mode))) |
2178 | 2177 | (font-lock-ensure) |
2179 | 2178 | (goto-char (point-min)) |
2180 | 2179 | (let ((inhibit-read-only t)) |
2181 | | - (when (fboundp 'text-property-search-forward) |
2182 | | - ;; If `render-mode' is `gfm-view-mode', the `invisible' |
2183 | | - ;; regions are set to `markdown-markup'. Set them to 't' |
2184 | | - ;; instead, since this has actual meaning in the "*eldoc*" |
2185 | | - ;; buffer where we're taking this string (#bug79552). |
2186 | | - (while (setq match (text-property-search-forward 'invisible)) |
2187 | | - (put-text-property (prop-match-beginning match) |
2188 | | - (prop-match-end match) |
2189 | | - 'invisible t)))) |
| 2180 | + ;; If `render-mode' is `gfm-view-mode', the `invisible' |
| 2181 | + ;; regions are set to `markdown-markup'. Set them to 't' |
| 2182 | + ;; instead, since this has actual meaning in the "*eldoc*" |
| 2183 | + ;; buffer where we're taking this string (#bug79552). |
| 2184 | + (cl-loop for from = (point) then to |
| 2185 | + while (< from (point-max)) |
| 2186 | + for inv = (get-text-property from 'invisible) |
| 2187 | + for to = (next-single-property-change from 'invisible) |
| 2188 | + when inv |
| 2189 | + do (put-text-property from to 'invisible t))) |
2190 | 2190 | (string-trim (buffer-string)))))) |
2191 | 2191 |
|
2192 | 2192 | (defun eglot--read-server (prompt &optional dont-if-just-the-one) |
@@ -5017,11 +5017,11 @@ See `eglot--semtok-request' implementation for details.") |
5017 | 5017 |
|
5018 | 5018 | (defun eglot--semtok-after-send-changes () |
5019 | 5019 | ;; (trace-values "Dispatching") |
5020 | | - (setf (plist-get eglot--semtok-state :dispatched) t)) |
| 5020 | + (setf (cl-getf eglot--semtok-state :dispatched) t)) |
5021 | 5021 |
|
5022 | 5022 | (cl-defun eglot--semtok-request (beg end &aux (docver eglot--docver)) |
5023 | 5023 | "Ask for tokens. Arrange for BEG..END to be font-lock flushed." |
5024 | | - (cl-macrolet ((c (tag) `(plist-get eglot--semtok-state ,tag))) |
| 5024 | + (cl-macrolet ((c (tag) `(cl-getf eglot--semtok-state ,tag))) |
5025 | 5025 | (cl-labels |
5026 | 5026 | ((req (method &optional params cont |
5027 | 5027 | &aux (buf (current-buffer))) |
@@ -5125,12 +5125,12 @@ lock machinery calls us again." |
5125 | 5125 | (with-silent-modifications |
5126 | 5126 | (save-excursion |
5127 | 5127 | (cl-loop |
5128 | | - initially (goto-char beg) |
5129 | | - for match = (text-property-search-forward 'eglot--semtok-faces) |
5130 | | - while (and match (< (point) end)) |
5131 | | - do (dolist (f (prop-match-value match)) |
5132 | | - (add-face-text-property |
5133 | | - (prop-match-beginning match) (prop-match-end match) f))))))) |
| 5128 | + for from = beg then to |
| 5129 | + while (< from end) |
| 5130 | + for faces = (get-text-property from 'eglot--semtok-faces) |
| 5131 | + for to = (or (next-single-property-change from 'eglot--semtok-faces nil end) end) |
| 5132 | + when faces |
| 5133 | + do (dolist (f faces) (add-face-text-property from to f))))))) |
5134 | 5134 |
|
5135 | 5135 |
|
5136 | 5136 | ;;; Call and type hierarchies |
|
0 commit comments