diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-01 01:00:20 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-03-01 01:00:20 +0100 |
commit | 007f18d2a76e15f64ceacbb94f5280cdd29266e7 (patch) | |
tree | ed7858b71b32b2e09de3ebb66b09df7b3bba7fec /elisp | |
parent | a4805ebb7e61118626bbe12cafaa117353e43feb (diff) | |
download | geiser-007f18d2a76e15f64ceacbb94f5280cdd29266e7.tar.gz geiser-007f18d2a76e15f64ceacbb94f5280cdd29266e7.tar.bz2 |
REPL: customizable auto-indenting of new lines.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index e19d7b7..4be3ce5 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -68,6 +68,11 @@ implementation name gets appended to it." :type 'boolean :group 'geiser-repl) +(geiser-custom--defcustom geiser-repl-auto-indent-p t + "Whether newlines for incomplete sexps are autoindented." + :type 'boolean + :group 'geiser-repl) + ;;; Geiser REPL buffers and processes: @@ -316,7 +321,9 @@ If no REPL is running, execute `run-geiser' to start a fresh one." (if (zerop (geiser-syntax--nesting-level)) (comint-send-input) (goto-char p) - (geiser-repl--newline-and-indent)))) + (if geiser-repl-auto-indent-p + (geiser-repl--newline-and-indent) + (insert "\n"))))) (define-derived-mode geiser-repl-mode comint-mode "REPL" "Major mode for interacting with an inferior scheme repl process. @@ -361,8 +368,6 @@ If no REPL is running, execute `run-geiser' to start a fresh one." (define-key geiser-repl-mode-map "\C-c\M-p" 'comint-previous-input) (define-key geiser-repl-mode-map "\C-c\M-n" 'comint-next-input) -(define-key geiser-repl-mode-map (kbd "TAB") - 'geiser-completion--complete-symbol) (define-key geiser-repl-mode-map (kbd "M-TAB") 'geiser-completion--complete-symbol) (define-key geiser-repl-mode-map (kbd "M-`") |