[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 03fc783c4b: Per #895: Use bounds of thing at poin
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eglot 03fc783c4b: Per #895: Use bounds of thing at point when asking for code actions |
Date: |
Thu, 24 Mar 2022 12:57:35 -0400 (EDT) |
branch: externals/eglot
commit 03fc783c4b701fc8c19096b7167b73bd5d8f63a8
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Per #895: Use bounds of thing at point when asking for code actions
* eglot.el (eglot--region-bounds): Consider bounds of things at
point.
---
eglot.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index daf6c3e237..83a2945514 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2838,8 +2838,11 @@ is not active."
:newName ,newname))
current-prefix-arg))
-(defun eglot--region-bounds () "Region bounds if active, else point and nil."
- (if (use-region-p) `(,(region-beginning) ,(region-end)) `(,(point) nil)))
+(defun eglot--region-bounds ()
+ "Region bounds if active, else bounds of things at point."
+ (if (use-region-p) `(,(region-beginning) ,(region-end))
+ (let ((boftap (bounds-of-thing-at-point 'sexp)))
+ (list (car boftap) (cdr boftap)))))
(defun eglot-code-actions (beg &optional end action-kind)
"Offer to execute actions of ACTION-KIND between BEG and END.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eglot 03fc783c4b: Per #895: Use bounds of thing at point when asking for code actions,
ELPA Syncer <=