branch: elpa/idris-mode
commit e3d1266db6765bf2e1a24fb4e86090a8bbc12a72
Author: Ohad Kammar <[email protected]>
Commit: Ohad Kammar <[email protected]>
Fix more 'bounds' to spec in newer IDE protocols
---
idris-warnings.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/idris-warnings.el b/idris-warnings.el
index bec2ad1a53..927d6a9cc8 100644
--- a/idris-warnings.el
+++ b/idris-warnings.el
@@ -81,10 +81,18 @@ WARNING is of form (filename (startline startcolumn)
(endline endcolumn) message
As of 20140807 (Idris 0.9.14.1-git:abee538) (endline endcolumn) is mostly the
same as (startline startcolumn)
"
(cl-destructuring-bind (filename sl1 sl2 message spans) warning
- (let ((startline (nth 0 sl1))
- (startcol (1- (nth 1 sl1)))
- (endline (nth 0 sl2))
- (endcol (1- (nth 1 sl2))))
+ (let ((startline (if (>=-protocol-version 2 1)
+ (1+ (nth 0 sl1))
+ (nth 0 sl1)))
+ (startcol (if (>=-protocol-version 2 1)
+ (nth 1 sl1)
+ (1- (nth 1 sl1))))
+ (endline (if (>=-protocol-version 2 1)
+ (1+ (nth 0 sl2))
+ (nth 0 sl2)))
+ (endcol (if (>=-protocol-version 2 1)
+ (nth 1 sl2)
+ (1- (nth 1 sl2)))))
(push (list filename startline startcol message spans)
idris-raw-warnings)
(let* ((fullpath (concat (file-name-as-directory
idris-process-current-working-directory)
filename))