aboutsummaryrefslogtreecommitdiffstats
path: root/sbcl/sbclrc
blob: 47baaef784ba263f000d9104bcdd380d46a344b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;; -*- mode: lisp; -*-

;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (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)
      (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)))