[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode 3e7cbb331f 3/5: Idris2: Use `:interpret .. :pri
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode 3e7cbb331f 3/5: Idris2: Use `:interpret .. :printdef` command to fetch symbol definition |
Date: |
Fri, 6 Jan 2023 05:59:20 -0500 (EST) |
branch: elpa/idris-mode
commit 3e7cbb331fb28256b1a3964113c1ebd7d04f0161
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>
Idris2: Use `:interpret .. :printdef` command to fetch symbol definition
Why:
Because `:print-definition` command is not yet implemented in Idris2
while the `:interpret xx` provides the expected result already.
---
idris-commands.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/idris-commands.el b/idris-commands.el
index dba49f034b..5f07be25a9 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -307,7 +307,9 @@ This sets the load position to point, if there is one."
(let ((name (if thing (read-string "Print definition: ")
(idris-name-at-point))))
(when name
- (idris-info-for-name :print-definition name))))
+ (if (>=-protocol-version 2 1)
+ (idris-info-for-name :interpret (concat ":printdef " name))
+ (idris-info-for-name :print-definition name)))))
(defun idris-who-calls-name (name)
"Show the callers of NAME in a tree."