[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 356100a 19/69: Fix #220: don't sort xref's by def
From: |
João Távora |
Subject: |
[elpa] externals/eglot 356100a 19/69: Fix #220: don't sort xref's by default |
Date: |
Sun, 20 Oct 2019 08:21:44 -0400 (EDT) |
branch: externals/eglot
commit 356100ab177cc51c73980ed5a8b7a3168158f526
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix #220: don't sort xref's by default
But use a eglot-xref-lessp-function in case someone wants to tweak
this.
* eglot.el (eglot-xref-lessp-function): New variable.
(eglot--handling-xrefs): Use it.
---
eglot.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index 79e4146..4fdd5c4 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1678,13 +1678,13 @@ DUMMY is ignored."
(defvar eglot--temp-location-buffers (make-hash-table :test #'equal)
"Helper variable for `eglot--handling-xrefs'.")
+(defvar eglot-xref-lessp-function #'ignore
+ "Compare two `xref-item' objects for sorting.")
+
(defmacro eglot--handling-xrefs (&rest body)
"Properly sort and handle xrefs produced and returned by BODY."
`(unwind-protect
- (sort (progn ,@body)
- (lambda (a b)
- (< (xref-location-line (xref-item-location a))
- (xref-location-line (xref-item-location b)))))
+ (sort (progn ,@body) eglot-xref-sort-function)
(maphash (lambda (_uri buf) (kill-buffer buf))
eglot--temp-location-buffers)
(clrhash eglot--temp-location-buffers)))
- [elpa] externals/eglot 5fc7ecc 10/69: Add built-in support for Dart's dart_language_server, (continued)
- [elpa] externals/eglot 5fc7ecc 10/69: Add built-in support for Dart's dart_language_server, João Távora, 2019/10/20
- [elpa] externals/eglot 1671dc4 12/69: Fix #209: protect against null messages from eldoc, João Távora, 2019/10/20
- [elpa] externals/eglot dbf2dd2 20/69: * eglot.el (xref-backend-references): Don't use return-from., João Távora, 2019/10/20
- [elpa] externals/eglot 3ecdef1 09/69: Fix #201: handle label offsets in ParameterInformation, João Távora, 2019/10/20
- [elpa] externals/eglot 40a3d8c 16/69: Fix broken python formatting tests, João Távora, 2019/10/20
- [elpa] externals/eglot 1c6c30f 17/69: Disable another test on Travis, João Távora, 2019/10/20
- [elpa] externals/eglot d65d139 15/69: Don't teardown company if started via trigger chars, João Távora, 2019/10/20
- [elpa] externals/eglot 7d6e3cf 21/69: Per #220: unbreak build, João Távora, 2019/10/20
- [elpa] externals/eglot b868ee1 23/69: Fix #260: Only consider Eglot's own diagnostics in eglot-code-actions, João Távora, 2019/10/20
- [elpa] externals/eglot 5f629eb 26/69: Add built-in support for Elixir's elixir-ls (#264), João Távora, 2019/10/20
- [elpa] externals/eglot 356100a 19/69: Fix #220: don't sort xref's by default,
João Távora <=
- [elpa] externals/eglot 195c311 22/69: Fix local function call in directory watcher (#255), João Távora, 2019/10/20
- [elpa] externals/eglot 2df3991 13/69: Fix #206: Update README.md, João Távora, 2019/10/20
- [elpa] externals/eglot 8d0c8de 05/69: Add NEWS.md file and rework README.md, João Távora, 2019/10/20
- [elpa] externals/eglot b4f3028 18/69: Fix #223: use a less buggy Flymake, João Távora, 2019/10/20
- [elpa] externals/eglot 6c884c4 24/69: Fix #263: fix case when eglot-put-doc-in-help-buffer is nil, João Távora, 2019/10/20
- [elpa] externals/eglot e28b396 25/69: Fix #259: work around a bug in Emacs's change detection, João Távora, 2019/10/20
- [elpa] externals/eglot 2372bc8 30/69: Fixed extra ) in python example snippet (#287), João Távora, 2019/10/20
- [elpa] externals/eglot 6d87de1 35/69: Treat null/nil server capabilities as false, João Távora, 2019/10/20
- [elpa] externals/eglot 7f31f29 36/69: Use gopls server as the default for Go (#304), João Távora, 2019/10/20
- [elpa] externals/eglot 4548202 28/69: Simplify eldoc usage (#269), João Távora, 2019/10/20