[Maxima-commits] [git] Maxima CAS branch, master, updated. branch-5_31-base-183-gf44d669



Rupert, I wonder if you won't reconsider & revert these commits. I
think they increase the complexity of the display machinery with, at
most, a small offsetting gain.

You can use the *prompt-prefix* & *prompt-suffix* to achieve what your
commit notes say motivated the commits. See below.

If you want to allow a full-blown note-taking mechanism to be hooked
in, then this is easily handled with the existing *alt-display1d* and
*alt-display2d* hooks provided within displa. You do not need to
modify any existing code.


(defun $set_ibase (&optional (ibase 10.) (note "Using ibase=~a.~%"))
  (setf *read-base* ibase)
  (if (= ibase 10.)
      (setf *prompt-prefix* "")
      (setf *prompt-prefix* (format nil note ibase)))
  (setf *prompt-suffix* "")
  ibase)

(%i1) load("/tmp/prompt.lisp");
(%o1)                          /tmp/prompt.lisp
(%i2) set_ibase(16);
(%o2)                                 16
Using ibase=16.
(%i3) 10+6;
(%o3)                                 22
Using ibase=16.
(%i4) set_ibase();
(%o4)                                 10
(%i5) 10+6;
(%o5)                                 16

Leo