Question about manual content: example(append); example("lambda");
Subject: Question about manual content: example(append); example("lambda");
From: Robert Dodier
Date: Fri, 8 Nov 2013 16:38:55 +0000 (UTC)
On 2013-11-08, edgar <edgar-rft at web.de> wrote:
> (%i2) example(lambda);
> example: ambda not found. 'example();' returns the list of known
> examples.
Oh -- that's a bug. The parser puts '$' on most Maxima symbols but not
'lambda', and the problem is that 'example' assumes that all symbols
have the dollar sign. That's easy to fix -- I'll commit this patch.
best
Robert Dodier
PS.
git diff src/macdes.lisp
diff --git a/src/macdes.lisp b/src/macdes.lisp
index fdb66a3..2bcdcee 100644
--- a/src/macdes.lisp
+++ b/src/macdes.lisp
@@ -14,9 +14,9 @@
(declare (special *need-prompt*))
(let ((example (second l)))
(when (symbolp example)
- ;; Coerce a symbol to be a string. Remove the first character,
- ;; it is a $-char.
- (setq example (coerce (cdr (exploden example)) 'string)))
+ ;; Coerce a symbol to be a string.
+ ;; Remove the first character if it is a dollar sign.
+ (setq example (coerce (exploden (stripdollar example)) 'string)))
(unless (stringp example)
(merror
(intl:gettext "example: argument must be a symbol or a string; found: ~M") example))