summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-06 07:26:54 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-06 07:26:54 +0200
commitc6acac244447cac2b4580658b40f3bde2425b8c4 (patch)
tree26ade244f3c36de04a5cebebc235b737de9481a4
parent1891a799d793ac980be066a617b5ef542f431b52 (diff)
downloadgeiser-chez-c6acac244447cac2b4580658b40f3bde2425b8c4.tar.gz
geiser-chez-c6acac244447cac2b4580658b40f3bde2425b8c4.tar.bz2
Allow loading byte-compiled Geiser without make install
-rw-r--r--README14
-rw-r--r--configure.ac3
-rw-r--r--doc/install.texi20
-rw-r--r--elisp/Makefile.am8
-rw-r--r--elisp/geiser-load.el.in8
-rw-r--r--elisp/geiser-reload.el14
-rw-r--r--elisp/geiser.el26
7 files changed, 63 insertions, 30 deletions
diff --git a/README b/README
index d2acd6f..001bd63 100644
--- a/README
+++ b/README
@@ -43,12 +43,20 @@
$ mkdir build; cd build
- Configure and make:
$ ../configure && make
- - Install it with:
+
+ Now, you can use the byte-compiled Geiser in place by adding to
+ your .emacs:
+
+ (load "<path-to-geiser>/build/elisp/geiser-load")
+
+ or, alternatively, install it with:
+
$ make install
(you might need to get root access, depending on your installation
- directory) and require 'geiser-install (not 'geiser, mind you) in
- your emacs initialization file:
+ directory) and, instead of the above load forms, require
+ 'geiser-install (not 'geiser, mind you) in your emacs
+ initialization file:
(require 'geiser-install)
diff --git a/configure.ac b/configure.ac
index f8770ab..1a70214 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-AC_INIT([GNU Geiser],[0.0.7],[jao@gnu.org],geiser)
+AC_INIT([GNU Geiser],[0.1],[jao@gnu.org],geiser)
AC_CONFIG_SRCDIR([elisp/geiser.el])
AM_INIT_AUTOMAKE
@@ -23,6 +23,7 @@ AC_CONFIG_FILES([
Makefile
elisp/Makefile
elisp/geiser-version.el
+elisp/geiser-load.el
scheme/Makefile
doc/Makefile
])
diff --git a/doc/install.texi b/doc/install.texi
index 69cc4c6..2362aa9 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -53,12 +53,14 @@ sake of concreteness, let's assume you put its source in the directory
line to your Emacs initialisation file (be it @file{~/.emacs} or any of
its moral equivalents):
@example
-(load-file "~/lisp/geiser/geiser.el")
+(load-file "~/lisp/geiser/elisp/geiser.el")
@end example
@noindent
or simply evaluate that form inside Emacs (you wouldn't kill a friend
just to start using Geiser, would you?). That's it: you're ready to
-@ref{quick-start,,go}.
+@ref{quick-start,,go}. You can even continue to read this fine manual
+inside Emacs by opening @file{doc/geiser.info} using @kbd{C-u C-h
+i}.
@cindex byte-compilation
What? You still here? I promise the above is all that's needed to start
@@ -79,9 +81,21 @@ $ ../configure
<some drivel here>
$ make all
<more of the above>
+@end example
+Now you have two options: loading the byte-compiled Geiser from the
+@file{elisp} subdirectory, or installing it system-wide. To load the
+bytecode from here, add this line to your initialisation file:
+@example
+(load "~/lisp/geiser/build/elisp/geiser-load")
+@end example
+and eval that form or (gasp!) restart Emacs and you're done. Yes, that's
+@code{load} and @file{geiser-load} instead of @code{load-file} and
+@file{geiser.el}.
+
+If you prefer a system-wide installation, just type:
+@example
$ sudo make install
@end example
-@noindent
With the above spell, Geiser will be compiled and installed in a safe
place inside Emacs load path. To load it into Emacs you'll need,
@i{instead} of the @code{load-file} form above, the following line in
diff --git a/elisp/Makefile.am b/elisp/Makefile.am
index 11f2178..1f1ca76 100644
--- a/elisp/Makefile.am
+++ b/elisp/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = geiser-install.el.in
+EXTRA_DIST = geiser-install.el.in geiser-load.el.in
dist_lisp_LISP = \
geiser-autodoc.el \
@@ -27,9 +27,11 @@ dist_lisp_LISP = \
geiser-version.el
lisp_LISP = geiser-install.el
+noinst_LISP = geiser-load.el
-CLEANFILES = geiser-install.el
+CLEANFILES = geiser-install.el geiser-load.el
geiser-install.el: $(srcdir)/geiser.el $(srcdir)/geiser-install.el.in
- @sed -e "s|@SCHEME_DIR[@]|$(datarootdir)/geiser|" $(srcdir)/geiser-install.el.in >$@
+ @sed -e "s|@SCHEME_DIR[@]|$(datarootdir)/geiser|" \
+ $(srcdir)/geiser-install.el.in >$@
diff --git a/elisp/geiser-load.el.in b/elisp/geiser-load.el.in
new file mode 100644
index 0000000..746558f
--- /dev/null
+++ b/elisp/geiser-load.el.in
@@ -0,0 +1,8 @@
+(setq geiser-elisp-dir (file-name-directory load-file-name))
+(add-to-list 'load-path geiser-elisp-dir)
+
+(require 'geiser)
+
+(setq geiser-scheme-dir "@abs_top_srcdir@/scheme")
+
+(provide 'geiser-load)
diff --git a/elisp/geiser-reload.el b/elisp/geiser-reload.el
index 5602cd1..a5c0125 100644
--- a/elisp/geiser-reload.el
+++ b/elisp/geiser-reload.el
@@ -16,6 +16,8 @@
(require 'geiser-custom)
(require 'geiser-base)
(require 'geiser)
+(require 'geiser-load nil t)
+(require 'geiser-install nil t)
;;; Reload:
@@ -24,8 +26,8 @@
(quote '(
geiser-mode
geiser-repl
- geiser-xref
geiser-doc
+ geiser-xref
geiser-compile
geiser-debug
geiser-company
@@ -35,15 +37,15 @@
geiser-eval
geiser-connection
geiser-syntax
- geiser-log
geiser-menu
geiser-impl
geiser-custom
- geiser-base
+ geiser-log
geiser-popup
+ geiser-base
+ geiser-version
geiser-install
geiser
- geiser-version
)))
(defun geiser-unload ()
@@ -66,8 +68,7 @@ loaded again."
(unless (or (file-exists-p (expand-file-name "geiser-reload.el" dir))
(file-exists-p (expand-file-name "geiser-reload.elc" dir)))
(error "%s does not contain Geiser!" dir))
- (let ((installed (featurep 'geiser-install))
- (memo (geiser-custom--memoized-state))
+ (let ((memo (geiser-custom--memoized-state))
(repls (geiser-repl--repl-list))
(buffers (geiser-mode--buffers)))
(geiser-unload)
@@ -75,7 +76,6 @@ loaded again."
(add-to-list 'load-path dir)
(mapc (lambda (x) (set (car x) (cdr x))) memo)
(require 'geiser-reload)
- (when installed (require 'geiser-install nil t))
(geiser-repl--restore repls)
(geiser-mode--restore buffers)
(message "Geiser reloaded!"))))
diff --git a/elisp/geiser.el b/elisp/geiser.el
index b241b78..8034803 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -26,40 +26,40 @@
;;; Autoloads:
-(autoload 'geiser-version "geiser-version.el" "Echo Geiser's version." t)
+(autoload 'geiser-version "geiser-version" "Echo Geiser's version." t)
-(autoload 'geiser-unload "geiser-reload.el" "Unload all Geiser code." t)
+(autoload 'geiser-unload "geiser-reload" "Unload all Geiser code." t)
-(autoload 'geiser-reload "geiser-reload.el" "Reload Geiser code." t)
+(autoload 'geiser-reload "geiser-reload" "Reload Geiser code." t)
-(autoload 'geiser "geiser-repl.el"
+(autoload 'geiser "geiser-repl"
"Start a Geiser REPL, or switch to a running one." t)
-(autoload 'run-geiser "geiser-repl.el"
+(autoload 'run-geiser "geiser-repl"
"Start a Geiser REPL." t)
-(autoload 'switch-to-geiser "geiser-guile.el"
+(autoload 'switch-to-geiser "geiser-guile"
"Switch to a running one Geiser REPL." t)
-(autoload 'run-guile "geiser-guile.el"
+(autoload 'run-guile "geiser-guile"
"Start a Geiser Guile REPL, or switch to a running one." t)
-(autoload 'switch-to-guile "geiser-guile.el"
+(autoload 'switch-to-guile "geiser-guile"
"Start a Geiser Guile REPL, or switch to a running one." t)
-(autoload 'run-racket "geiser-racket.el"
+(autoload 'run-racket "geiser-racket"
"Start a Geiser Racket REPL, or switch to a running one." t)
-(autoload 'switch-to-racket "geiser-guile.el"
+(autoload 'switch-to-racket "geiser-guile"
"Start a Geiser Racket REPL, or switch to a running one." t)
-(autoload 'geiser-mode "geiser-mode.el"
+(autoload 'geiser-mode "geiser-mode"
"Minor mode adding Geiser REPL interaction to Scheme buffers." t)
-(autoload 'turn-on-geiser-mode "geiser-mode.el"
+(autoload 'turn-on-geiser-mode "geiser-mode"
"Enable Geiser's mode (useful in Scheme buffers)." t)
-(autoload 'turn-off-geiser-mode "geiser-mode.el"
+(autoload 'turn-off-geiser-mode "geiser-mode"
"Disable Geiser's mode (useful in Scheme buffers)." t)
(mapc (lambda (group)