[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix for the ,show REPL meta-command
From: |
Andreas Rottmann |
Subject: |
Fix for the ,show REPL meta-command |
Date: |
Sun, 30 Jan 2011 17:14:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi!
As indicated by Mark Harig[0], the ,show REPL meta-command is broken (my
fault, oversight in 8fdd85f83..).
The attached patch should make it work again.
From: Andreas Rottmann <address@hidden>
Subject: Fix `show' REPL meta-command
* module/system/repl/command.scm (warranty, copying, version): Use
`define-meta-command' to define these procedures, so they are entered
into the *command-infos* table.
---
module/system/repl/command.scm | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index 2897b9b..d4b3e4a 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -311,19 +311,23 @@ Without any argument, a list of topics is displayed."
(else
(format #t "Bad arguments: ~A~%" args))))
-(define (warranty repl)
+;;; `warranty', `copying' and `version' are "hidden" meta-commands, only
+;;; accessible via `show'. They have an entry in *command-infos* but not
+;;; in *command-table*.
+
+(define-meta-command (warranty repl)
"show warranty
Details on the lack of warranty."
(display *warranty*)
(newline))
-(define (copying repl)
+(define-meta-command (copying repl)
"show copying
Show the LGPLv3."
(display *copying*)
(newline))
-(define (version repl)
+(define-meta-command (version repl)
"show version
Version information."
(display *version*)
--
tg: (074c414..) t/fix-show-meta-commands (depends on: master)
Regarding the other issues pointed out in Mark's mail, here's a quick
analysis:
- Error 2, ",statistics": This seems to be due to the ,statistics
meta-command expecting the result of invoking `repl-gc-stats' (which
is based on `gc-stats') to carry several fields that are not present
with current Guile. For example, the ,statistics code references
these fields in the gc-stats alist: `cells-allocated',
`cell-heap-size', `cells-marked', `cells-swept', etc. None of these
are present anymore:
scheme@(guile-user)> (gc-stats)
$1 = ((gc-time-taken . 0) (heap-size . 12034048) (heap-free-size . 167936)
(heap-total-allocated . 12935072) (protected-objects . 95) (gc-times . 7))
So the solution would be to significantly cut down the implementation
of ,statistics, to make use only of the fields that are currently
present. I assume that none of the now-missing fields can be
reinstated, since BDW-GC doesn't provide that information, right? If
this is correct, I can give this bug a whirl, hopefully providing a
fix by Wednesday.
- Errors 3-11: These are not really "errors" in my view, but rather
suboptimal presentation of the doc-strings associated with the
meta-commands by ,help. Probably the docstrings should be changed not
to duplicate the summary (which is the first line) in the rest of the
docstring; another possible way to fix this would be to not show theq
summary if there's more documentation after the first line. Thoughts?
[0] http://lists.gnu.org/archive/html/bug-guile/2011-01/msg00070.html
Regards, Rotty
--
Andreas Rottmann -- <http://rotty.yi.org/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix for the ,show REPL meta-command,
Andreas Rottmann <=