diff options
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 89226d2..9f400a3 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -114,17 +114,19 @@ change that." :type 'boolean :group 'geiser-repl) -(geiser-custom--defcustom geiser-repl-context-sensitive-send nil - "Don't send input to REPL without the cursor being placed at the -end of prompt. - -When on, pressing \\[enter] when the cursor is placed inside a -balanced S-expression will introduce a new line without sending -input to the inferior Scheme process. - -When off (the default), pressing \\[enter] when the cursor is -placed inside a balanced S-expression will send the input to -the inferior Scheme process." +(geiser-custom--defcustom geiser-repl-send-on-return-p t + "Sends input to REPL when ENTER is pressed in a balanced S-expression, +regardless of cursor positioning. + +When off, pressing ENTER inside a balance S-expression will +introduce a new line without sending input to the inferior +Scheme process. This option is useful when using minor modes +which might do parentheses balancing, or when entering additional +arguments inside an existing expression. + +When on (the default), pressing ENTER inside a balanced S-expression +will send the input to the inferior Scheme process regardless of the +cursor placement." :type 'boolean :group 'geiser-repl) @@ -749,7 +751,7 @@ If SAVE-HISTORY is non-nil, save CMD in the REPL history." (geiser-repl--grab-input) (ignore-errors (compile-goto-error)))) ((let ((inhibit-field-text-motion t)) - (unless geiser-repl-context-sensitive-send + (when geiser-repl-send-on-return-p (end-of-line)) (<= (geiser-repl--nesting-level) 0)) (geiser-repl--send-input)) |