[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 66a1704 22/26: Scratch/use elpa flymake (#178)
From: |
Jo�o T�vora |
Subject: |
[elpa] externals/eglot 66a1704 22/26: Scratch/use elpa flymake (#178) |
Date: |
Sun, 9 Dec 2018 19:11:29 -0500 (EST) |
branch: externals/eglot
commit 66a1704622228757dca70d2788ac89bd69d3a346
Author: João Távora <address@hidden>
Commit: GitHub <address@hidden>
Scratch/use elpa flymake (#178)
Use GNU ELPA's Flymake
* eglot.el (Package-Requires): require Flymake 1.0.2.
(version< emacs-version "27.0"): Remove horrible hack
* Makefile (ELPADEPS): Renamed from JSONRPC.
(%.elc): Use it.
(eglot-check): Use it.
---
Makefile | 13 ++++++++-----
eglot.el | 36 +-----------------------------------
2 files changed, 9 insertions(+), 40 deletions(-)
diff --git a/Makefile b/Makefile
index 637deb7..9f4ed1a 100644
--- a/Makefile
+++ b/Makefile
@@ -10,16 +10,19 @@ LOAD_PATH=-L .
ELFILES := eglot.el eglot-tests.el
ELCFILES := $(ELFILES:.el=.elc)
-JSONRPC ?=--eval '(package-initialize)' \
- --eval '(package-refresh-contents)' \
- --eval '(package-install (quote jsonrpc))'
+ELPADEPS ?=--eval '(package-initialize)' \
+ --eval '(package-refresh-contents)' \
+ --eval '(package-install (quote jsonrpc))' \
+ --eval '(package-install \
+ (cadr (assoc (quote flymake) \
+ package-archive-contents)))'
all: compile
# Compilation
#
%.elc: %.el
- $(EMACS) -Q $(JSONRPC) $(LOAD_PATH) --batch -f batch-byte-compile $<
+ $(EMACS) -Q $(ELPADEPS) $(LOAD_PATH) --batch -f batch-byte-compile $<
compile: $(ELCFILES)
@@ -27,7 +30,7 @@ compile: $(ELCFILES)
#
eglot-check: compile
$(EMACS) -Q --batch \
- $(JSONRPC) \
+ $(ELPADEPS) \
$(LOAD_PATH) \
-l eglot \
-l eglot-tests \
diff --git a/eglot.el b/eglot.el
index 0286f75..4552930 100644
--- a/eglot.el
+++ b/eglot.el
@@ -7,7 +7,7 @@
;; Maintainer: João Távora <address@hidden>
;; URL: https://github.com/joaotavora/eglot
;; Keywords: convenience, languages
-;; Package-Requires: ((emacs "26.1") (jsonrpc "1.0.6"))
+;; Package-Requires: ((emacs "26.1") (jsonrpc "1.0.6") (flymake "1.0.2"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -2400,40 +2400,6 @@ If SKIP-SIGNATURE, don't try to send
textDocument/signatureHelp."
"Eclipse JDT breaks spec and replies with edits as arguments."
(mapc #'eglot--apply-workspace-edit arguments))
-
-;; FIXME: A horrible hack of Flymake's insufficient API that must go
-;; into Emacs master, or better, 26.2
-(when (version< emacs-version "27.0")
- (cl-defstruct (eglot--diag (:include flymake--diag)
- (:constructor eglot--make-diag-1))
- data-1)
- (defsubst eglot--make-diag (buffer beg end type text data)
- (let ((sym (alist-get type eglot--diag-error-types-to-old-types)))
- (eglot--make-diag-1 :buffer buffer :beg beg :end end :type sym
- :text text :data-1 data)))
- (defsubst eglot--diag-data (diag)
- (and (eglot--diag-p diag) (eglot--diag-data-1 diag)))
- (defvar eglot--diag-error-types-to-old-types
- '((eglot-error . :error)
- (eglot-warning . :warning)
- (eglot-note . :note)))
- (advice-add
- 'flymake--highlight-line :after
- (lambda (diag)
- (when (eglot--diag-p diag)
- (let ((ov (cl-find diag
- (overlays-at (flymake-diagnostic-beg diag))
- :key (lambda (ov)
- (overlay-get ov 'flymake-diagnostic))))
- (overlay-properties
- (get (car (rassoc (flymake-diagnostic-type diag)
- eglot--diag-error-types-to-old-types))
- 'flymake-overlay-control)))
- (cl-loop for (k . v) in overlay-properties
- do (overlay-put ov k v)))))
- '((name . eglot-hacking-in-some-per-diag-overlay-properties))))
-
-
(provide 'eglot)
;;; eglot.el ends here
- [elpa] externals/eglot updated (f291816 -> 23accee), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 11eb256 02/26: Fix #164: CodeAction command can be a Command object (#165), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 10b238b 03/26: Revert "Fix #164: CodeAction command can be a Command object (#165)", Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot cddab30 06/26: * eglot.el (eglot--current-column): New helper., Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 53bfdb7 19/26: Per #173: adjust previous fix, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 9fb5f0c 05/26: Per #52, #127: Improve performance of xref summary line collection, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 5bbf884 11/26: Use eglot--dbind for destructuring, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 81d035f 04/26: Fix #52: Use entire line as xref summary when available, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 96169d8 18/26: Per #173: fix bug introduced by previous fix, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 4874c22 14/26: Use javascript-typescript-langserver for typescript-mode (#174), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 66a1704 22/26: Scratch/use elpa flymake (#178),
Jo�o T�vora <=
- [elpa] externals/eglot f63bedb 20/26: Fix #144: Use eglot--dbind and eglot--lambda throughout, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 3922cf3 01/26: Per #144, #156: control strictness towards incoming LSP messages, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 8140be5 07/26: Touch up last commit, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 95ef9e1 08/26: Robustify tests against (M)ELPA eglot installations, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 38da3d3 15/26: Fix #159: Properly clear old diagnostics when making new ones, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 444a8c3 16/26: Per #173: robustify previous fix against non-standard insertion bindings, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 1d42be4 13/26: Close #173: support completionContext to help servers like ccls, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot e2200ce 09/26: Simplify interface of eglot--dbind macro, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot c1848c3 23/26: Handle array params to server notification or requests, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 23accee 26/26: * eglot.el (Version): Bump to 1.3, Jo�o T�vora, 2018/12/09