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 | 1492336888d8eb9bf959b36e5e84190b8f1ec79d (patch) | |
tree | d3b4c0ea1759b124d0978ae799c4c5a247700a62 | |
parent | b87e894c6d68a6c2b24bc75b65a76e1a12b3791b (diff) | |
download | geiser-chez-1492336888d8eb9bf959b36e5e84190b8f1ec79d.tar.gz geiser-chez-1492336888d8eb9bf959b36e5e84190b8f1ec79d.tar.bz2 |
REPL: customizable auto-indenting of new lines.
-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-`") |