emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot a1f2033 12/26: Fix #116, #150: don't break in ind


From: João Távora
Subject: [elpa] externals/eglot a1f2033 12/26: Fix #116, #150: don't break in indirect buffers
Date: Sun, 9 Dec 2018 19:11:27 -0500 (EST)

branch: externals/eglot
commit a1f20331f3ecd9c8c2e92482103f17eb30adab01
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Fix #116, #150: don't break in indirect buffers
    
    Indirect buffers, such as the ones created by ediff-regions-wordwise,
    have eglot enabled but not buffer-file-name.  Resort to the finding
    the file-name of the original buffer for these.
    
    * eglot.el (eglot--TextDocumentIdentifier): Work in indirect
    buffers.
---
 eglot.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 8d39770..b240e0e 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1345,7 +1345,10 @@ THINGS are either registrations or unregisterations."
 
 (defun eglot--TextDocumentIdentifier ()
   "Compute TextDocumentIdentifier object for current buffer."
-  `(:uri ,(eglot--path-to-uri buffer-file-name)))
+  `(:uri ,(eglot--path-to-uri (or buffer-file-name
+                                  (ignore-errors
+                                    (buffer-file-name
+                                     (buffer-base-buffer)))))))
 
 (defvar-local eglot--versioned-identifier 0)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]