[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode d965f35f9a 1/2: [ fix ] remove ibc deletions fo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode d965f35f9a 1/2: [ fix ] remove ibc deletions for idris2 |
Date: |
Thu, 19 May 2022 05:58:31 -0400 (EDT) |
branch: elpa/idris-mode
commit d965f35f9a4131765bc34778e5b228af21bb291c
Author: Guillaume Allais <guillaume.allais@ens-lyon.org>
Commit: Guillaume Allais <guillaume.allais@ens-lyon.org>
[ fix ] remove ibc deletions for idris2
Idris2 does not have .ibc files so this code is useless (and
actively harmful if you try to load a .tex file that happens
to be a literate idris file).
---
idris-commands.el | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/idris-commands.el b/idris-commands.el
index 00fb152590..de5d81deae 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -969,19 +969,19 @@ type-correct, so loading will fail."
"Delete the IBC file for the current buffer. A prefix argument
means to not ask for confirmation."
(interactive "P")
- (let* ((fname (buffer-file-name))
- (ibc (concat (file-name-sans-extension fname) ".ibc")))
- (if (not (or (string= (file-name-extension fname) "idr")
- (string= (file-name-extension fname) "lidr")
- (string= (file-name-extension fname) "org")
- (string= (file-name-extension fname) "markdown")
- (string= (file-name-extension fname) "md")
- ))
- (error "The current file is not an Idris file")
- (when (or no-confirmation (y-or-n-p (concat "Really delete " ibc "?")))
- (when (file-exists-p ibc)
- (delete-file ibc)
- (message "%s deleted" ibc))))))
+ (unless (> idris-protocol-version 1)
+ (let* ((fname (buffer-file-name))
+ (ibc (concat (file-name-sans-extension fname) ".ibc")))
+ (if (not (or (string= (file-name-extension fname) "idr")
+ (string= (file-name-extension fname) "lidr")
+ (string= (file-name-extension fname) "org")
+ (string= (file-name-extension fname) "markdown")
+ (string= (file-name-extension fname) "md")))
+ (error "The current file is not an Idris file")
+ (when (or no-confirmation (y-or-n-p (concat "Really delete " ibc
"?")))
+ (when (file-exists-p ibc)
+ (delete-file ibc)
+ (message "%s deleted" ibc)))))))
(defun idris--active-term-beginning (term pos)
"Find the beginning of active term TERM that occurs at POS.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/idris-mode d965f35f9a 1/2: [ fix ] remove ibc deletions for idris2,
ELPA Syncer <=