summaryrefslogtreecommitdiff
path: root/elisp/geiser-repl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-04 21:17:12 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-04 21:17:12 +0200
commit8c71db0234142c3b45352773ab98e68b0bc7ad11 (patch)
treef6fe5ed2fb54d37cb3d4ff53b152859a1b43e3e5 /elisp/geiser-repl.el
parent04420adfbae0e37207700ebe0aca01f92012adcf (diff)
downloadgeiser-8c71db0234142c3b45352773ab98e68b0bc7ad11.tar.gz
geiser-8c71db0234142c3b45352773ab98e68b0bc7ad11.tar.bz2
REPL: (optionally) forget old errors on new expressions
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r--elisp/geiser-repl.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index dd85808..b8bb86d 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -79,6 +79,16 @@ implementation name gets appended to it."
:type 'boolean
:group 'geiser-repl)
+(geiser-custom--defcustom geiser-repl-forget-old-errors-p t
+ "Whether to forget old errors upon entering a new expression.
+
+When on (the default), every time a new expression is entered in
+the REPL old error messages are flushed, and using [[next-error]]
+afterwards will jump only to error locations produced by the new
+expression, if any."
+ :type 'boolean
+ :group 'geiser-repl)
+
;;; Geiser REPL buffers and processes:
@@ -402,6 +412,9 @@ module command as a string")
(pmark (and proc (process-mark proc)))
(intxt (and pmark (buffer-substring pmark (point)))))
(when intxt
+ (when (and geiser-repl-forget-old-errors-p
+ (not (geiser-con--is-debugging)))
+ (compilation-forget-errors))
(comint-send-input)
(when (string-match "^\\s-*$" intxt)
(comint-send-string proc