From c54ebd679ac7702dd92da9686f0d2ec2f229b0d5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 5 Nov 2010 02:57:15 +0100 Subject: Fix for TAB in REPL, and BACKTAB going to previous error --- doc/cheat.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/cheat.texi') diff --git a/doc/cheat.texi b/doc/cheat.texi index 6087949..d83a540 100644 --- a/doc/cheat.texi +++ b/doc/cheat.texi @@ -110,6 +110,13 @@ @item M-. @tab geiser-edit-symbol-at-point @tab Edit identifier at point +@item TAB +@tab geiser-completion--tab +@tab Complete identifier at point or indent if none; away from +last prompt, go to next error in the buffer. +@item S-TAB (backtab) +@tab geiser-completion--previous-error +@tab Go to previous error in the REPL buffer @item TAB, M-TAB @tab geiser-completion--complete-symbol @tab Complete identifier at point -- cgit v1.2.3 From d27e2f151dde318731616d585e83ae8d5cea5ad6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 5 Nov 2010 03:01:07 +0100 Subject: Documentation fix --- doc/cheat.texi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/cheat.texi') diff --git a/doc/cheat.texi b/doc/cheat.texi index d83a540..6a9f88f 100644 --- a/doc/cheat.texi +++ b/doc/cheat.texi @@ -112,12 +112,11 @@ @tab Edit identifier at point @item TAB @tab geiser-completion--tab -@tab Complete identifier at point or indent if none; away from -last prompt, go to next error in the buffer. +@tab Complete, indent or go to next error @item S-TAB (backtab) @tab geiser-completion--previous-error @tab Go to previous error in the REPL buffer -@item TAB, M-TAB +@item M-TAB @tab geiser-completion--complete-symbol @tab Complete identifier at point @item M-`, C-. -- cgit v1.2.3 From b420c68157f3fb000be1cd6d20bb016d0f369aa1 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 5 Nov 2010 03:15:15 +0100 Subject: Documentation tweaking --- doc/cheat.texi | 13 +++++++------ doc/fun.texi | 18 +++++++++--------- doc/geiser.texi | 4 ++-- doc/repl.texi | 2 +- doc/web.texi | 2 +- 5 files changed, 20 insertions(+), 19 deletions(-) (limited to 'doc/cheat.texi') diff --git a/doc/cheat.texi b/doc/cheat.texi index 6a9f88f..adcc4d8 100644 --- a/doc/cheat.texi +++ b/doc/cheat.texi @@ -1,4 +1,4 @@ -@node Cheat sheet, No hacker is an island, Fun between the parens, Top +@node Cheat sheet, No hacker is an island, Between the parens, Top @chapter Cheat sheet @menu @@ -106,7 +106,7 @@ @tab Kill Scheme process @item C-c C-k @tab geiser-repl-nuke -@tab Nuke REPL: use it if the REPL becomes unresponsive +@tab Soft restart for unresponsive REPL @item M-. @tab geiser-edit-symbol-at-point @tab Edit identifier at point @@ -177,8 +177,9 @@ @tab Bury buffer @end multitable -@flushright -. -@end flushright - +@ifhtml +@html +
+@end html +@end ifhtml diff --git a/doc/fun.texi b/doc/fun.texi index 76301e2..f7a5238 100644 --- a/doc/fun.texi +++ b/doc/fun.texi @@ -1,5 +1,5 @@ -@node Fun between the parens, Cheat sheet, The REPL, Top -@chapter Fun between the parens +@node Between the parens, Cheat sheet, The REPL, Top +@chapter Between the parens A good @repl{} is a must, but just about half the story of a good Scheme hacking environment. Well, perhaps a bit more than a half; but, at any @@ -23,7 +23,7 @@ process giving you the @repl{}, make those Scheme buffers come to life. * Geiser writes for you:: @end menu -@node Activating Geiser, The source and the REPL, Fun between the parens, Fun between the parens +@node Activating Geiser, The source and the REPL, Between the parens, Between the parens @section Activating Geiser @cindex geiser-mode @@ -78,7 +78,7 @@ provides require a @repl{} up and running, preferably corresponding to the correct Scheme implementation. In the following section, we'll see how to make sure that that's actually the case. -@node The source and the REPL, Documentation helpers, Activating Geiser, Fun between the parens +@node The source and the REPL, Documentation helpers, Activating Geiser, Between the parens @section The source and the REPL As i've already mentioned a couple of times, @i{geiser-mode} needs a @@ -201,7 +201,7 @@ Now that we have @code{geiser-mode} happily alive in our Scheme buffers and communicating with the right @repl{} instance, let us see what it can do for us, besides jumping to and fro. -@node Documentation helpers, To eval or not to eval, The source and the REPL, Fun between the parens +@node Documentation helpers, To eval or not to eval, The source and the REPL, Between the parens @section Documentation helpers @subsubheading Autodoc redux @@ -312,7 +312,7 @@ form of a list of its exported identifiers, using @kbd{C-c C-d C-m}, exactly as you would do @ref{repl-mod,,in the REPL}. This commands works with all supported Schemes, no strings attached. -@node To eval or not to eval, To err perchance to debug, Documentation helpers, Fun between the parens +@node To eval or not to eval, To err perchance to debug, Documentation helpers, Between the parens @section To eval or not to eval @cindex philosophy @@ -378,7 +378,7 @@ macro-expand them. The corresponding keybindings start with the prefix @kbd{C-r}. The result of the macro expansion always appears in a pop up buffer. -@node To err perchance to debug, Jumping around, To eval or not to eval, Fun between the parens +@node To err perchance to debug, Jumping around, To eval or not to eval, Between the parens @section To err: perchance to debug @cindex to err is schemey @@ -423,7 +423,7 @@ offer no further explanation here. The customization group tune how Geiser interacts with Guile's debugger (and more). Same thing for racketeers and @i{geiser-racket}. -@node Jumping around, Geiser writes for you, To err perchance to debug, Fun between the parens +@node Jumping around, Geiser writes for you, To err perchance to debug, Between the parens @section Jumping around @cindex jumping in scheme buffers @@ -448,7 +448,7 @@ You can control how the destination buffer pops up by setting in the current window), @code{'window} (other window in the same frame) or @code{'frame} (in a new frame). -@node Geiser writes for you, , Jumping around, Fun between the parens +@node Geiser writes for you, , Jumping around, Between the parens @section Geiser writes for you @cindex completion in scheme buffers diff --git a/doc/geiser.texi b/doc/geiser.texi index 2e7ef93..3a65e22 100644 --- a/doc/geiser.texi +++ b/doc/geiser.texi @@ -50,7 +50,7 @@ The document was typeset with * Introduction:: * Installation:: * The REPL:: -* Fun between the parens:: +* Between the parens:: * Cheat sheet:: * No hacker is an island:: * Index:: @@ -78,7 +78,7 @@ The REPL * Autodoc and friends:: * Customization and tips:: -Fun between the parens +Between the parens * Activating Geiser:: * The source and the REPL:: diff --git a/doc/repl.texi b/doc/repl.texi index 169d782..9adb971 100644 --- a/doc/repl.texi +++ b/doc/repl.texi @@ -1,4 +1,4 @@ -@node The REPL, Fun between the parens, Installation, Top +@node The REPL, Between the parens, Installation, Top @chapter The REPL @anchor{quick-start} If you've followed the indications in @ref{Setting it up}, your Emacs is diff --git a/doc/web.texi b/doc/web.texi index 99f5165..19633c1 100644 --- a/doc/web.texi +++ b/doc/web.texi @@ -12,7 +12,7 @@ * Introduction:: * Installation:: * The REPL:: -* Fun between the parens:: +* Between the parens:: * Cheat sheet:: * No hacker is an island:: * Index:: -- cgit v1.2.3 From 06ade45ac52d5597dc04655f4668b02f9b3ebdf2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 8 Nov 2010 05:44:18 +0100 Subject: geiser-squarify to toggle between () and [] --- README | 1 + doc/cheat.texi | 3 +++ doc/parens.texi | 4 ++++ elisp/geiser-mode.el | 19 +++++++++++++++++++ 4 files changed, 27 insertions(+) (limited to 'doc/cheat.texi') diff --git a/README b/README index 8134f97..b10af2a 100644 --- a/README +++ b/README @@ -111,6 +111,7 @@ | M-. | Go to definition of identifier at point | | M-, | Go back to where M-. was last invoked | | C-c C-e m | Ask for a module and open its file | + | C-c C-e [ | Toggle between () and [] for current form | |---------------------+-------------------------------------------------| | C-M-x | Eval definition around point | | C-c M-e | Eval definition around point and switch to REPL | diff --git a/doc/cheat.texi b/doc/cheat.texi index adcc4d8..4e81b92 100644 --- a/doc/cheat.texi +++ b/doc/cheat.texi @@ -31,6 +31,9 @@ @item C-c C-e C-m @tab geiser-edit-module @tab Ask for a module and open its file +@item C-c C-e C-[ +@tab geiser-squarify +@tab Toggle between () and [] for current form @item @tab @tab @item C-M-x @tab geiser-eval-definition diff --git a/doc/parens.texi b/doc/parens.texi index 9ce0d05..9839892 100644 --- a/doc/parens.texi +++ b/doc/parens.texi @@ -482,6 +482,10 @@ try to find a module name that matches it. You can also request explicitly completion only over module names using @kbd{M-`} (that's a backtick). +There's also this little command, @code{geiser-squarify}, which will +toggle the delimiters of the innermost list around point between round +and square brackets. It is bound to @key{C-c C-e [}. + @c Local Variables: @c mode: texinfo @c TeX-master: "geiser" diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el index e9e5563..3575474 100644 --- a/elisp/geiser-mode.el +++ b/elisp/geiser-mode.el @@ -176,6 +176,24 @@ With prefix, try to enter the current's buffer module." (goto-char (point-max)) (pop-to-buffer b))) +(defun geiser-squarify () + "Toggle between () and [] for current form." + (interactive) + (let ((pared (and (boundp 'paredit-mode) paredit-mode))) + (when pared (paredit-mode -1)) + (unwind-protect + (save-excursion + (unless (looking-at-p "\\s(") (backward-up-list)) + (let ((p (point)) + (round (looking-at-p "("))) + (forward-sexp) + (backward-delete-char 1) + (insert (if round "]" ")")) + (goto-char p) + (delete-char 1) + (insert (if round "[" "(")))) + (when pared (paredit-mode 1))))) + ;;; Geiser mode: @@ -258,6 +276,7 @@ interacting with the Geiser REPL is at your disposal. ("Complete module name" ((kbd "M-`") (kbd "C-.")) geiser-completion--complete-module) ("Edit module" ("\C-c\C-e\C-m" "\C-c\C-em") geiser-edit-module) + ("Toggle ()/[]" ("\C-c\C-e\C-[" "\C-c\C-e[") geiser-squarify) -- ("Callers" ((kbd "C-c <")) geiser-xref-callers :enable (and (geiser-eval--supported-p 'callers) (symbol-at-point))) -- cgit v1.2.3