From 4622b4361a9da53cde53cd041abdfa5f2bd25adb Mon Sep 17 00:00:00 2001 From: Aaron Marks Date: Tue, 26 Nov 2019 19:30:36 +1000 Subject: Rename multiline expression option * Renames geiser-repl-context-sensitive-send to geiser-repl-send-on-return-p. This option's value is now inverted. * Update documentation accordingly. --- elisp/geiser-repl.el | 26 ++++++++++++++------------ 1 file 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)) -- cgit v1.2.3