aboutsummaryrefslogtreecommitdiffstats
path: root/sbcl/sbclrc
diff options
context:
space:
mode:
Diffstat (limited to 'sbcl/sbclrc')
-rw-r--r--sbcl/sbclrc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sbcl/sbclrc b/sbcl/sbclrc
index 228ae53..47baaef 100644
--- a/sbcl/sbclrc
+++ b/sbcl/sbclrc
@@ -7,12 +7,20 @@
(when (probe-file quicklisp-init)
(load quicklisp-init)))
+(require :linedit)
+
;;; Enable linedit, a readline-like module for SBCL. Install through
;;; (ql:quickload "linedit").
(if (member "--no-linedit" sb-ext:*posix-argv* :test 'equal)
(setf sb-ext:*posix-argv*
(remove "--no-linedit" sb-ext:*posix-argv* :test 'equal))
(when (interactive-stream-p *terminal-io*)
+ (require :asdf)
(require :sb-aclrepl)
- (require :linedit)
- (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t)))
+ (funcall (intern "INSTALL-REPL" :linedit) :wrap-current t)
+
+ (defun delete-char-forwards-or-quit (chord editor)
+ (if (equal "" (linedit::get-string editor))
+ (sb-ext:quit)
+ (linedit::delete-char-forwards chord editor)))
+ (linedit::defcommand "C-D" 'delete-char-forwards-or-quit)))