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

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

[elpa] externals/eglot ae0943f 40/54: Revert the last change about colum


From: João Távora
Subject: [elpa] externals/eglot ae0943f 40/54: Revert the last change about column calculation
Date: Thu, 16 Apr 2020 05:31:51 -0400 (EDT)

branch: externals/eglot
commit ae0943f5d96776b41c4151beb6edabe0d6c43762
Author: Felicián Németh <address@hidden>
Commit: Felicián Németh <address@hidden>

    Revert the last change about column calculation
---
 NEWS.md  |  9 ---------
 eglot.el | 12 ++++++------
 2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/NEWS.md b/NEWS.md
index ef6b5f3..0b4cb9e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,13 +1,5 @@
 # 1.6 (upcoming)
 
-##### Column offset calculation is now LSP-conform ([#361][github#361])
-
-It seems the majority of servers now comply with the language server
-specification when it comes to handling non-ASCII texts.  Therefore
-the default values of `eglot-move-to-column-function` and
-`eglot-current-column-function` have been changed.  The documentations
-of these variables help to restore the old behavior.
-
 ##### Support workspace/configuration requests ([#326][github#326])
 
 Also a new section "Per-project server configuration" in the README.md
@@ -213,4 +205,3 @@ and now said bunch of references-->
 [github#316]: https://github.com/joaotavora/eglot/issues/316
 [github#324]: https://github.com/joaotavora/eglot/issues/324
 [github#326]: https://github.com/joaotavora/eglot/issues/326
-[github#361]: https://github.com/joaotavora/eglot/issues/361
diff --git a/eglot.el b/eglot.el
index 5e83118..888eacc 100644
--- a/eglot.el
+++ b/eglot.el
@@ -999,15 +999,15 @@ CONNECT-ARGS are passed as additional arguments to
 
 (defun eglot-current-column () (- (point) (point-at-bol)))
 
-(defvar eglot-current-column-function #'eglot-lsp-abiding-column
+(defvar eglot-current-column-function #'eglot-current-column
   "Function to calculate the current column.
 
 This is the inverse operation of
 `eglot-move-to-column-function' (which see).  It is a function of
 no arguments returning a column number.  For buffers managed by
 fully LSP-compliant servers, this should be set to
-`eglot-lsp-abiding-column' (the default), and
-`eglot-current-column' for all others.")
+`eglot-lsp-abiding-column', and `eglot-current-column' (the default)
+for all others.")
 
 (defun eglot-lsp-abiding-column ()
   "Calculate current COLUMN as defined by the LSP spec."
@@ -1023,7 +1023,7 @@ fully LSP-compliant servers, this should be set to
          :character (progn (when pos (goto-char pos))
                            (funcall eglot-current-column-function)))))
 
-(defvar eglot-move-to-column-function #'eglot-move-to-lsp-abiding-column
+(defvar eglot-move-to-column-function #'eglot-move-to-column
   "Function to move to a column reported by the LSP server.
 
 According to the standard, LSP column/character offsets are based
@@ -1033,8 +1033,8 @@ where X is a multi-byte character, it actually means `b', 
not
 `c'. However, many servers don't follow the spec this closely.
 
 For buffers managed by fully LSP-compliant servers, this should
-be set to `eglot-move-to-lsp-abiding-column' (the default), and
-`eglot-move-to-column' for all others.")
+be set to `eglot-move-to-lsp-abiding-column', and
+`eglot-move-to-column' (the default) for all others.")
 
 (defun eglot-move-to-column (column)
   "Move to COLUMN without closely following the LSP spec."



reply via email to

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