cd516d74 |
(in-package :cl-user)
|
08b030a9 |
(defun read-evaluated-form (&optional (prompt-control nil promptp)
&rest prompt-args)
(apply #'format *query-io*
(if promptp prompt-control "~&Enter a form to be evaluated: ")
prompt-args)
(finish-output *query-io*)
(list (eval (read *query-io*))))
|
64b97809 |
(defun load-init-file (filename &optional (conf-dir ".lispworks.d"))
|
08b030a9 |
(let ((fn (merge-pathnames (make-pathname :directory `(:relative ,conf-dir)
:name filename
:type "lisp")
(user-homedir-pathname))))
(tagbody
top
(restart-case (if (probe-file fn)
(load fn)
(cerror "skip this init file" "file ~s not found" fn))
(store-value (value)
:report (lambda (stream)
(format stream "Supply a new value for ~S." filename))
:interactive read-evaluated-form
(setf fn value)
(goto top))))))
|
64b97809 |
(change-directory (user-homedir-pathname))
(load-init-file "editor-color-theme")
|
e6ffd8c6 |
(editor-color-theme:color-theme "zenburn")
(editor-color-theme:zenburn-paren-colors)
|
64b97809 |
(setf (editor:variable-value "Input Format Default")
:default)
(setf (editor:variable-value "Output Format Default")
'(:utf-8 :eol-style :lf))
|
7756b46d |
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "~/quicklisp/setup.lisp"))
|
08b030a9 |
(ql:quickload :lw-add-ons)
|
cd516d74 |
(editor:bind-key "Insert Space And Show Arglist" "Space")
|
919d40b9 |
(editor:bind-key "Indent Form" #("Control-c" "Meta-q"))
(editor:bind-key "Insert Parentheses For Selection" #\( :mode "Lisp")
(editor:bind-key "Indent New Line" "Return" :mode "Lisp")
|
fc1517a4 |
(editor:bind-key "Compile and Load Buffer File" #("Control-c" "Control-k"))
|
08b030a9 |
|
919d40b9 |
(editor:defcommand "Move Over ()" (p)
|
08b030a9 |
"Move past the next close parenthesis.
|
919d40b9 |
Any indentation preceeding the parenthesis is deleted."
|
08b030a9 |
(declare (ignore p))
(let ((point (editor:current-point)))
(editor:with-point ((m point))
(cond ((editor::forward-up-list m)
(editor:move-point point m)
(editor::point-before point)
(loop (editor:with-point ((back point))
(editor::back-to-indentation back)
(unless (editor:point= back point)
(return)))
(editor::delete-indentation point))
(editor::point-after point))
(t (editor:editor-error))))))
|
919d40b9 |
(editor:bind-key "Move Over ()" #\) :mode "Lisp")
|
cd516d74 |
(defun ed-asdf-component (system component)
(let ((component (asdf:find-component system component)))
(ed (asdf:component-pathname component))))
(defun utf-8-file-encoding (pathname ef-spec buffer length)
(declare (ignore pathname buffer length))
(system:merge-ef-specs ef-spec :utf-8))
(setq system:*file-encoding-detection-algorithm*
(substitute 'utf-8-file-encoding
'system:locale-file-encoding
system:*file-encoding-detection-algorithm*))
(set-default-character-element-type 'simple-char)
|