@@ -227,7 +227,7 @@ A prefix argument SET-LINE forces loading but only up to the current line."
227227 (lambda (_condition )
228228 (when (member 'warnings-tree idris-warnings-printing)
229229 (idris-list-compiler-notes))))))
230- (error " Cannot find file for current buffer " )))
230+ (user- error " Cannot find file for current buffer" )))
231231
232232(defun idris-view-compiler-log ()
233233 " Jump to the log buffer, if it is open."
@@ -244,7 +244,7 @@ A prefix argument SET-LINE forces loading but only up to the current line."
244244 #' (lambda (w1 w2 ) (<= (overlay-start w1) (overlay-start w2))))))
245245 (if warnings-forward
246246 (goto-char (overlay-start (car warnings-forward)))
247- (error " No warnings or errors until end of buffer " ))))
247+ (user- error " No warnings or errors until end of buffer" ))))
248248
249249(defun idris-previous-error ()
250250 " Jump to the previous error overlay in the buffer."
@@ -253,7 +253,7 @@ A prefix argument SET-LINE forces loading but only up to the current line."
253253 #' (lambda (w1 w2 ) (>= (overlay-end w1) (overlay-end w2))))))
254254 (if warnings-backward
255255 (goto-char (overlay-end (car warnings-backward)))
256- (error " No warnings or errors until beginning of buffer " ))))
256+ (user- error " No warnings or errors until beginning of buffer" ))))
257257
258258(defun idris-load-file-sync ()
259259 " Pass the current buffer's file synchronously to the inferior Idris process.
@@ -280,7 +280,7 @@ This sets the load position to point, if there is one."
280280 (setq idris-currently-loaded-buffer (current-buffer ))
281281 (idris-make-clean)
282282 (idris-update-loaded-region (car result)))))
283- (error " Cannot find file for current buffer " )))
283+ (user- error " Cannot find file for current buffer" )))
284284
285285
286286
@@ -512,9 +512,9 @@ Useful for writing papers or slides."
512512 (fmt (completing-read " What format? " '(" html" , " latex" ) nil t nil nil " latex" ))
513513 (width (read-string " How wide? " nil nil " 80" )))
514514 (if (<= (string-to-number width) 0 )
515- (error " Width must be positive " )
515+ (user- error " Width must be positive" )
516516 (if (< (length what) 1 )
517- (error " Nothing to pretty-print " )
517+ (user- error " Nothing to pretty-print" )
518518 (let ((text (idris-eval `(:interpret ,(concat " :pprint " fmt " " width " " what)))))
519519 (with-idris-info-buffer
520520 (insert (car text))
@@ -773,15 +773,15 @@ A plain prefix ARG causes the command to prompt for hints and recursion
773773 (idris-eval `(:proof-search ,(cdr what) ,(car what) , hints ,@depth ))
774774 ))))
775775 (if (string= result " " )
776- (error " Nothing found " )
776+ (user- error " Nothing found" )
777777 (idris-replace-hole-with result))))))
778778
779779(defun idris-proof-search-next ()
780780 " Replace the previous proof search result with the next one, if it exists.
781781Idris 2 only."
782782 (interactive )
783783 (if (not proof-region-start)
784- (error " You must proof search first before looking for subsequent proof results " )
784+ (user- error " You must proof search first before looking for subsequent proof results" )
785785 (let ((result (car (idris-eval `:proof-search-next))))
786786 (if (string= result " No more results" )
787787 (message " No more results " )
@@ -805,7 +805,7 @@ Idris 2 only."
805805 final-point
806806 (prefix (idris-line-indentation-for what)))
807807 (if (string= result " " )
808- (error " Nothing found " )
808+ (user- error " Nothing found" )
809809 (beginning-of-line )
810810 (forward-line )
811811 (while (and (not (eobp ))
@@ -825,7 +825,7 @@ Idris 2 only."
825825Idris 2 only."
826826 (interactive )
827827 (if (not def-region-start)
828- (error " You must program search first before looking for subsequent program results " )
828+ (user- error " You must program search first before looking for subsequent program results" )
829829 (let ((result (car (idris-eval `:generate-def-next))))
830830 (if (string= result " No more results" )
831831 (message " No more results " )
@@ -841,7 +841,7 @@ Idris 2 only."
841841 (interactive )
842842 (let ((what (idris-thing-at-point)))
843843 (unless (car what)
844- (error " Could not find a hole at point to refine by " ))
844+ (user- error " Could not find a hole at point to refine by" ))
845845 (idris-load-file-sync)
846846 (let ((results (car (idris-eval `(:intro ,(cdr what) ,(car what))))))
847847 (pcase results
@@ -853,7 +853,7 @@ Idris 2 only."
853853 (interactive " MRefine by: " )
854854 (let ((what (idris-thing-at-point)))
855855 (unless (car what)
856- (error " Could not find a hole at point to refine by " ))
856+ (user- error " Could not find a hole at point to refine by" ))
857857 (idris-load-file-sync)
858858 (let ((result (car (idris-eval `(:refine ,(cdr what) ,(car what) , name )))))
859859 (idris-replace-hole-with result))))
@@ -1015,7 +1015,7 @@ performed silently without confirmation from the user."
10151015 (ibc (concat (file-name-sans-extension fname) " .ibc" )))
10161016 (if (not (member (file-name-extension fname)
10171017 '(" idr" " lidr" " org" " markdown" " md" )))
1018- (error " The current file is not an Idris file " )
1018+ (user- error " The current file is not an Idris file" )
10191019 (when (or no-confirmation (y-or-n-p (concat " Really delete " ibc " ?" )))
10201020 (when (file-exists-p ibc)
10211021 (delete-file ibc)
@@ -1027,7 +1027,7 @@ performed silently without confirmation from the user."
10271027It is an error if POS is not in the specified term. TERM should
10281028be Idris's own serialization of the term in question."
10291029 (unless (equal (get-char-property pos 'idris-tt-term ) term )
1030- (error " Term not present at %s " pos))
1030+ (user- error " Term not present at %s" pos))
10311031 (save-excursion
10321032 ; ; Find the beginning of the active term
10331033 (goto-char pos)
@@ -1260,7 +1260,7 @@ of the term to replace."
12601260 (interactive )
12611261 (let ((files (idris-find-file-upwards " ipkg" )))
12621262 (cond ((= (length files ) 0 )
1263- (error " No .ipkg file found " ))
1263+ (user- error " No .ipkg file found" ))
12641264 ((= (length files ) 1 )
12651265 (find-file (car files )))
12661266 (t (find-file (completing-read " Package file: " files nil t ))))))
@@ -1280,7 +1280,7 @@ of the term to replace."
12801280 (first-mod (read-string
12811281 (format " First module name (%s ): " module-name-suggestion)
12821282 nil nil module-name-suggestion)))
1283- (when (file-exists-p create-in) (error " %s already exists" create-in))
1283+ (when (file-exists-p create-in) (user- error " %s already exists" create-in))
12841284 (when (string= src-dir " " ) (setq src-dir nil ))
12851285 (make-directory create-in t )
12861286 (when src-dir (make-directory (concat (file-name-as-directory create-in) src-dir) t ))
0 commit comments