summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-20 20:47:53 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-08-20 20:47:53 +0200
commit0f441d62d9cd89e6e1486af1b4283abe77d30822 (patch)
tree478647c88de720e4796d1af0ab659625aca48093
parent7614e02ca555a166c29b110f83e7033339e0abd1 (diff)
downloadgeiser-0f441d62d9cd89e6e1486af1b4283abe77d30822.tar.gz
geiser-0f441d62d9cd89e6e1486af1b4283abe77d30822.tar.bz2
REPL: new customizable faces for input and prompt
Namely, geiser-font-lock-repl-prompt and geiser-font-lock-repl-input.
-rw-r--r--NEWS11
-rw-r--r--doc/repl.texi30
-rw-r--r--elisp/geiser-repl.el11
3 files changed, 41 insertions, 11 deletions
diff --git a/NEWS b/NEWS
index b679990..b9321dd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+* Version 0.1.4
+
+New features:
+
+ - New customizable faces: geiser-font-lock-repl-prompt and
+ geiser-font-lock-repl-input.
+
+Bug fixes:
+
+ - Racket: autodoc in R5RS modules
+
* Version 0.1.3 (Jun 24, 2011)
Bug fixes:
diff --git a/doc/repl.texi b/doc/repl.texi
index d1e1f6b..99b928c 100644
--- a/doc/repl.texi
+++ b/doc/repl.texi
@@ -37,18 +37,24 @@ implementation-dependent banner, followed by an interactive prompt.
Going according to plan includes having the executable of the Scheme you
chose in your path. If that's not the case, you can tell Emacs where it
is, as described in @altr{impl-binary,a moment,Customization and tips,.}
-Returning to our REPL,
-the first thing to notice is that the funny prompt is telling you your
-current module: its name is the part just after the @@ sign (in Guile,
-that means @code{guile-user}, while Racket's top namespace doesn't have
-a name; cf. discussion in @altr{Switching context,,Switching context,).}
-Other than that, this is
+Returning to our REPL, the first thing to notice is that the funny
+prompt is telling you your current module: its name is the part just
+after the @@ sign (in Guile, that means @code{guile-user}, while
+Racket's top namespace doesn't have a name; cf. discussion in
+@altr{Switching context,,Switching context,).} Other than that, this is
pretty much equivalent to having a command-line interpreter in a
-terminal, with a bunch of add-ons that we'll be reviewing below. You can
-start typing sexps right there: Geiser will only dispatch them for
+terminal, with a bunch of add-ons that we'll be reviewing below. You
+can start typing sexps right there: Geiser will only dispatch them for
evaluation when they're complete, and will indent new lines properly
-until then. It will also keep track of your input, maintaining a history
-file that will be reloaded whenever you restart the REPL.
+until then. It will also keep track of your input, maintaining a
+history file that will be reloaded whenever you restart the REPL.
+
+@cindex REPL, faces
+@cindex faces, in the REPL
+If you're not happy with the faces Geiser is using for the REPL's prompt
+and evaluated input, you can customise
+@code{geiser-font-lock-repl-prompt} and
+@code{geiser-font-lock-repl-input} to better looking faces.
@subsubheading Connecting to an external Scheme
@cindex remote REPL
@@ -331,11 +337,13 @@ set @code{geiser-guile-load-init-file-p} to @code{t} instead.
@subsubheading Racket startup time
+@cindex startup timeout
+@cindex timeout
When starting Racket in little computers, Geiser might have to wait a
bit more than it expects (which is ten seconds, or ten thousand
milliseconds, by default). If you find that Geiser is giving up too
quickly and complaining that no prompt was found, try to increase the
-value of @c{geiser-repl-startup-time} to, say, twenty seconds:
+value of @code{geiser-repl-startup-time} to, say, twenty seconds:
@example
(setq geiser-repl-startup-time 20000)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 770b5ca..8615bf3 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -113,6 +113,13 @@ If you have a slow system, try to increase this time."
:type 'integer
:group 'geiser-repl)
+(geiser-custom--defface repl-input
+ 'comint-highlight-input geiser-repl "evaluated input highlighting")
+
+(geiser-custom--defface repl-prompt
+ 'comint-highlight-prompt geiser-repl "REPL prompt")
+
+
;;; Implementation-dependent parameters
@@ -517,10 +524,14 @@ buffer."
(interactive "p")
(compilation-next-error (- n)))
+
(define-derived-mode geiser-repl-mode comint-mode "REPL"
"Major mode for interacting with an inferior scheme repl process.
\\{geiser-repl-mode-map}"
(scheme-mode-variables)
+ (set (make-local-variable 'face-remapping-alist)
+ '((comint-highlight-prompt geiser-font-lock-repl-prompt)
+ (comint-highlight-input geiser-font-lock-repl-input)))
(set (make-local-variable 'mode-line-process) nil)
(set (make-local-variable 'comint-use-prompt-regexp) t)
(set (make-local-variable 'comint-prompt-read-only)