display patch, was: get name of variable as string in function?



On Feb. 6, 2012, Robert Dodier wrote:
-----------------------
>Well, OK. No need to invent a work-around, it's easier to fix the bug.
>Here is a patch. Can someone commit this? My git sandbox
>is messed up (OH WONDERS OF GIT WILL YOU NEVER CEASE)
>and I can't take the time to straighten it out right now.
[snip]

>diff --git a/src/comm.lisp b/src/comm.lisp
>index 1282784..94c3823 100644
>--- a/src/comm.lisp
>+++ b/src/comm.lisp
>@@ -753,7 +753,9 @@
>        (setq ans (list '(mequal simp) (disp2 l) ans)))
>     (if lablist (nconc lablist (cons (elabel ans) nil)))
>     (setq tim (get-internal-run-time))
>-    (displa (list '(mlable) (if lablist linelable) ans))
>+    (let ((*display-labels-p* nil))
>+      (declare (special *display-labels-p*))
>+      (displa (list '(mlable) (if lablist linelable) ans)))
>     (mterpri)
>     (timeorg tim)))

----------------------------------------
I am using the new version of comm.lisp downloaded from
git, and find a peculiar interaction with integrate
resulting in a lisp error:

------------------------------------

Maxima 5.26.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)


(%i1) integrate(-1/(x^2-x),x,-1/2,1/2);
Principal Value
(%o1) log(3)
(%i2) load ("comm-new.lisp")$
(%i3) integrate(-1/(x^2-x),x,-1/2,1/2);
Maxima encountered a Lisp error:

 Error in COND [or a callee]: The variable NUM is unbound.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

(%i4) build_info()$
Maxima version: 5.26.0
Maxima build date: 22:48 1/15/2012
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

------------------------------------

Ted