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



On 2/5/12, Edwin Woollett <woollett at charter.net> wrote:
> On Feb. 4, 2012, Robert Dodier wrote:
> ----------------------------------
>>> I would like to define mprint(var) such that
>>> mprint(a) would give
>>>    a  =  (value of a)
>>>
>>Isn't that exactly what display(a) does?
> ---------------------------------------------
> See bug item #3484414 and recent mailing list about display.
> You are correct that this is what display used to do, but
> with ver. 5.26.0,  (false) precedes the display output
> if display2d is set to false.

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.

best

Robert Dodier

PS.


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)))