Commit 4086643b authored by unknown's avatar unknown

Enable slime-autodoc-use-multiline-p; git must ignore configure.el; fix...

Enable slime-autodoc-use-multiline-p; git must ignore configure.el; fix *gendl-slime-release* (wrong at last release, alas); fix line-endings in gendl.asd (for some reason, git fixes these for me for .el and .lisp, but not this one); more modern-mode; fix for LW and simple-text-string repl.
parent a389529c
......@@ -11,7 +11,7 @@ bin
*.log
*.toc
configure.el
# Ignore (generated) html files,
# *.html
......
......@@ -108,7 +108,7 @@
(defun gendl-quit () (interactive) (gdl-quit))
;; 4.2. Configure slime
;; 4.2. Locate Common Lisp / Locate SLIME
;;
;; Where is our Common Lisp implementation? Where is slime-helper.el?
;; Loading the latter means we can load slime-autoloads.el (which
......@@ -136,6 +136,7 @@
(slime-setup '(slime-fancy slime-banner))
(add-hook 'slime-connected-hook 'load-gendl t)
(add-hook 'slime-connected-hook 'set-slime-shortcuts)
(add-hook 'slime-connected-hook 'customise-slime)
(add-hook 'slime-repl-mode-hook 'remove-dos-eol)
(add-to-list 'auto-mode-alist '("\\.cl\\'" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.gdl\\'" . lisp-mode))
......@@ -154,6 +155,9 @@
(global-set-key "\C-x&" '(lambda()(interactive) (switch-to-buffer (slime-repl-buffer))))
(global-set-key "\C-x*" '(lambda()(interactive) (switch-to-buffer "*inferior-lisp*"))))
(defun customise-slime ()
(setq slime-autodoc-use-multiline-p t))
(defun remove-dos-eol ()
"Do not show ^M in files containing mixed UNIX and DOS line endings."
(interactive)
......
......@@ -24,7 +24,7 @@
;; This document is not confidential. See end for copyright
;; information.
(defparameter *gendl-slime-release* "0.1.0")
(defparameter *gendl-slime-release* "0.1.1")
;; 2. TESTS
......
(in-package :asdf)
(defsystem #:gendl
:description "The Gendl Project"
:author "Dave Cooper <david.cooper@genworks.com>"
:license "Affero Gnu General Public License (please see http://www.gnu.org/licenses/)"
:serial t
#+asdf-encoding :encoding #+asdf-encoding :utf-8
:version "2013031600"
:depends-on (:cl-lite :gwl-graphics :tasty :robot :yadd))
(defmethod perform :after ((op load-op) (system (eql (find-system "gendl"))))
(declare (ignore op))
;; Check whether GENDL has been configured yet.
(multiple-value-bind (found ignore system-pathname)
(locate-system system)
(declare (ignore ignore))
(if found
(let ((config-file (merge-pathnames "configure.el" system-pathname)))
(unless (probe-file config-file)
;; Looks like this is the first time around.
(configure-gendl config-file)))
(warn "ASDF cannot locate the GENDL which it just loaded. Further configuration not possible."))))
(defparameter *setup-gendl-template* "
;; CONFIGURE.EL
;;
;; The purpose of this document is to configure (a) the lisp
;; invocation to be used for running GENDL and (b) the location of
;; your quicklisp installation.
;;
;; This file will be written automatically when the GENDL system is
;; loaded for the first time. You may edit it yourself but do take
;; care: the file is loaded by both EMACS and Common Lisp. We suggest
;; you don't add any other forms to the file.~@{~2%~s~}")
(defparameter *setup-emacs-template* "
*********************************************************************
To configure your EMACS to work with GENDL, add the following to your
.emacs file:
(defun start-gendl () (interactive) (load ~s))
;; (global-set-key [f10] 'start-gendl)
")
(defun configure-gendl (config-file)
(unless (probe-file config-file)
(let ((lisp-invocation (funcall (find-symbol (string 'basic-command-line-arguments) :glisp)))
(path-to-quicklisp-helper (ql-setup:qmerge "slime-helper.el")))
;; This is unfortunate. Clozure won't give you the heap name
;; unless you chase after it specifically.
#+:ccl
(let ((heap ccl:*heap-image-name*))
(setf lisp-invocation `(,(car lisp-invocation) "-I" ,heap ,@(cdr lisp-invocation))))
;; 1. Write the config file.
(with-open-file (out config-file :direction :output)
(let ((*package* (find-package :common-lisp-user))
(*print-case* :downcase))
(format out *setup-gendl-template*
`(setq ,'cl-user::lisp-invocation ',lisp-invocation)
`(setq ,'cl-user::path-to-quicklisp-helper ,(namestring path-to-quicklisp-helper)))))
;; 2. Download quicklisp-slime-helper
(let* (;; We intend to overwrite the default output from quicklisp-slime-helper:install
(standard-output *standard-output*)
(*standard-output* (make-broadcast-stream)))
(handler-bind ((serious-condition (lambda (e) (declare (ignore e)) (setf *standard-output* standard-output))))
(ql:quickload :quicklisp-slime-helper)))
;; 3. Add GENDL-loading form to .emacs
(let ((path-to-gdl-loader (merge-pathnames "emacs/gdl.el" config-file)))
(format t *setup-emacs-template* (namestring path-to-gdl-loader)))
config-file)))
(in-package :asdf)
(defsystem #:gendl
:description "The Gendl Project"
:author "Dave Cooper <david.cooper@genworks.com>"
:license "Affero Gnu General Public License (please see http://www.gnu.org/licenses/)"
:serial t
#+asdf-encoding :encoding #+asdf-encoding :utf-8
:version "2013031600"
:depends-on (:cl-lite :gwl-graphics :tasty :robot :yadd))
(defmethod perform :after ((op load-op) (system (eql (find-system "gendl"))))
(declare (ignore op))
;; Check whether GENDL has been configured yet.
(multiple-value-bind (found ignore system-pathname)
(locate-system system)
(declare (ignore ignore))
(if found
(let ((config-file (merge-pathnames "configure.el" system-pathname)))
(unless (probe-file config-file)
;; Looks like this is the first time around.
(configure-gendl config-file)))
(warn "ASDF cannot locate the GENDL which it just loaded. Further configuration not possible."))))
(defparameter *setup-gendl-template* "~
;; CONFIGURE.EL
;;
;; The purpose of this document is to configure (a) the lisp
;; invocation to be used for running GENDL and (b) the location of
;; your quicklisp installation.
;;
;; This file will be written automatically when the GENDL system is
;; loaded for the first time. You may edit it yourself but do take
;; care: the file is loaded by both EMACS and Common Lisp. We suggest
;; you don't add any other forms to the file.~@{~2%~s~}")
(defparameter *setup-emacs-template* "
*********************************************************************
To configure your EMACS to work with GENDL, add the following to your
.emacs file:
(defun start-gendl () (interactive) (load ~s))
;; (global-set-key [f10] 'start-gendl)
")
(defun configure-gendl (config-file)
(unless (probe-file config-file)
(let ((lisp-invocation (funcall (find-symbol (string 'basic-command-line-arguments) :glisp)))
(path-to-quicklisp-helper (ql-setup:qmerge "slime-helper.el")))
;; This is unfortunate. Clozure won't give you the heap name
;; unless you chase after it specifically.
#+:ccl
(let ((heap ccl:*heap-image-name*))
(setf lisp-invocation `(,(car lisp-invocation) "-I" ,heap ,@(cdr lisp-invocation))))
;; 1. Write the config file.
(with-open-file (out config-file :direction :output)
(let ((*package* (find-package :common-lisp-user))
(*print-case* :downcase))
(format out *setup-gendl-template*
`(setq ,'cl-user::lisp-invocation ',lisp-invocation)
`(setq ,'cl-user::path-to-quicklisp-helper ,(namestring path-to-quicklisp-helper)))))
;; 2. Download quicklisp-slime-helper
(let* (;; We intend to overwrite the default output from quicklisp-slime-helper:install
(standard-output *standard-output*)
(*standard-output* (make-broadcast-stream)))
(handler-bind ((serious-condition (lambda (e) (declare (ignore e)) (setf *standard-output* standard-output))))
(ql:quickload :quicklisp-slime-helper)))
;; 3. Add GENDL-loading form to .emacs
(let ((path-to-gdl-loader (merge-pathnames "emacs/gdl.el" config-file)))
(format t *setup-emacs-template* (namestring path-to-gdl-loader)))
config-file)))
......@@ -56,7 +56,7 @@
;; 3. Load gendl plus dependencies.
(funcall (find-symbol "QUICKLOAD" "QL") :gendl)
(funcall (find-symbol (string 'quickload) :ql) :gendl)
;; 4. Load the slime integration. Ideally this should be done
;; (conditionally) by the quickload above.
......@@ -64,9 +64,16 @@
#+:swank
(load (compile-file (merge-pathnames "emacs/gendl.lisp" gendl)))
;; 4a. This is a workaround for https://bugs.launchpad.net/slime/+bug/1175550
;; "#+lispworks Gray slime-output-stream doesn't handle non base-chars"
#+:lispworks
(setf (slot-value *standard-output* 'swank-backend::buffer)
(coerce (slot-value *standard-output* 'swank-backend::buffer)
'lw:simple-text-string))
;; 5. Start gendl.
(let ((starter (find-symbol "START-GENDL!" "GENDL")))
(let ((starter (find-symbol (string 'start-gendl!) :gendl)))
(funcall starter)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment