summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-01 01:00:20 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-03-01 01:00:20 +0100
commit1492336888d8eb9bf959b36e5e84190b8f1ec79d (patch)
treed3b4c0ea1759b124d0978ae799c4c5a247700a62 /elisp
parentb87e894c6d68a6c2b24bc75b65a76e1a12b3791b (diff)
downloadgeiser-chez-1492336888d8eb9bf959b36e5e84190b8f1ec79d.tar.gz
geiser-chez-1492336888d8eb9bf959b36e5e84190b8f1ec79d.tar.bz2
REPL: customizable auto-indenting of new lines.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el11
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-`")