branch: elpa/idris-mode commit 3c1f8f8410d909229d12d0227399f2d5c16b1ea4 Merge: 65d6db1b75 d965f35f9a Author: Jan de Muijnck-Hughes <j...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #551 from idris-hackers/remove-ibc-deletion [ fix ] remove ibc deletions for idris2 --- 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.