
The following excerpts from the historical maclisp update files
may help the luser of the Kludgy Binford Editor


5/15/71   -JONL-
.  .  .
8) THE BINFORD EDITOR HAS BEEN IN LISP FOR SOME TIME, BUT WAS 
UNDOCUMENTED [EXCEPT BY WORD OF MOUTH.] FOR THOSE WHO HAVE ALREADY 
USED IT, NOTE THAT IT HAS BEEN CHANGED EVER SO SLIGHTLY IN LISP 190]
EVAL'ING (EDIT) ENTERS EDIT MODE, WHEREIN COMMANDS ARE GIVEN SIMILAR 
TO TECO COMMANDS, ACTION IS TAKEN ON SOME EXPRESSION CURRENTLY IN THE
WORKING SPACE,  AND A WINDOW AROUND THE POINTER IS PRINTED OUT AFTER
EVERY COMMAND EXECUTION.  (EDIT T) ENTERS EDIT MODE BUT DOES NOT 
TYPE OUT THE WINDOW AFTER EVERY COMMAND. [THE P COMMAND WILL CAUSE
PRINTING OF THE WINDOW - USEFUL WHEN AT A TELETYPE]. COMMANDS ARE:
	Q<SPACE> EXIT FROM THE EDITOR BACK TO LISP.
	Y<SPACE>ATOM<SAPCE> CAUSES THE FUNCTION PROPERTY OF ATOM TO 
		BE BROUGHT IN  FOR EDITING.
	YP<SPACE>ATOM<SPACE>PROP<SPACE> YANK IN THE PROP PROPERTY OF 
		THE ATOM ATOM.
	YP<SPACE>ATOM<SPACE> YANKS THE WHOLE PROPERTY LIST OF ATOM.
	J<SPACE> CAUSES THE POINTER [WHICH IS PRINTED OUT AS ] TO 
		JUMP TO THE TOP OF THE WORKING EXPRESSION.
	S<SPACE>E1 . . . EN<SPACE><SPACE> SEARCHES FOR AN OCCURENCE
		OF THE SEQUENCE OF S-EXPRESSIONS E1 . . . EN AND
		MOVES THE POINTER JUST TO THE RIGHT IF SUCCESSFUL.
		NOTE THAT THE LISP READER IS USED FOR READ-IN BY THE 
		EDITOR, SO THAT THE ATOM <ALTMODE><ALTMODE> MUST BE 
		FOLLOWED BY SOME ATOM TERMINATING CHARACTER 
		[SUCH AS <SPACE>].
	I<SPACE>E1 . . . EN<SPACE><SPACE> INSERTS AT THE CURRENT 
		POINTER POSITION THE SEQUENCE E1 . . . EN
	K<SPACE> KILLS THE S-EXPRESSION JUST TO THE RIGHT OF THE 
		POINTER, AND SAVES IT AS THE VALUE OF THE ATOM .
	IV<SPACE>EXP INSERTS THE VALUE OF THE S-EXPRESSION EXP. 
		ESPECIALLY USEFUL WHEN INSERTING STUFF DELETED FROM 
		SOME PRIOR POINT.
	EV<SPACE>EXP MERELY EVALUATES EXP.
HENCEFORWARD, <SPACE> WILL NOT BE EXPLICITLY WRITTEN OUT, BUT WILL BE
UNDERSTOOD TO BE THE COMMAND TERMINATION CHARACTER. THE NEXT GROUP
OF COMMANDS ADMIT AN OPTIONAL NUMERIC ARGUMENT [BASE 10.], PRECEEDING
THE COMMAND, TO BE INTERPRETED AS A REPLICATION NUMBER:
	F MOVE FORWARD [RIGHTWARDS] PAST ONE TOKEN.  A TOKEN IS 
		EITHER A PARENTHESIS OR AN ATOM.
	C SAME AS F
	-B SAME AS F
	B MOVE BACK [LEFTWARDS] OVER ONE TOKEN.
	-C SAME AS B
	-F SAME AS B
	R MOVE RIGHTWARDS PAST THE NEXT S-EXPRESSION.
	L MOVE LEFT OVER ONE S-EXPRESSION.
	D MOVE "DOWN" INTO THE FIRST NON-ATOMIC S-EXPRESSION TO THE
		RIGHT OF THE POINTER.
	U MOVE "UP" OUT OF THE S-EXPRESSION CONTAINING THE POINTER.
	K KILL ALSO ADMITS A REPLICATION  NUMBER.
	PW ARG IS NOT REALLY A REPLICATION NUMBER,
		BUT RATHER THE "WINDOW WIDTH" IN NUMBER OF TOKENS.
THE FOLLOWING LITTLE USED COMMANDS MAY POSSIBLY BE OF SOME INTEREST:
	( INSERT A VIRTUAL OPEN PARENTHESIS.
	) INSERT A VIRTUAL CLOSE PARENTHESIS.
	D( VIRTUALLY DELETE AN OPEN PARENS
	D) VIRTUALLY DELETE A CLOSE PARENS
	() RESTRUCTURE THE WORKING S-EXPRESSION ACCORDING TO THE 
		VIRTUAL PARENTHESES AND DELETIONS.
[[Note: the "virtual parens" stuff probably doesn't work right -- JONL]]


7/8/73 - JONL -
.  .  .
THE VALUE OF THE VARIABLE EDIT IS NOW (AS OF LISP 486) A LIST OF FLAGS
THAT THE IN-CORE EDITOR WILL USE WHEN SEARCHING FOR A FUNCTION 
DEFINITION.  THUS TO EDIT CNVR FUNCTIONS, ONE MAY WANT TO DO
		(SETQ EDIT (CONS 'CEXPR EDIT))
THE VALUE OF THE VARIABLE  IS THE BACK-UP CHAIN FOR THE EDITOR, 
THE CAR OF WHICH WILL BE POINTING TO THE PLACE IN YOUR FUNCTION WHERE
THE CURRENT EDIT CURSOR IS. THUS, ONE MAY USE THE EDITOR TO POSITION
THE EDIT-CURSOR, AND THEN RUN OTHER PROGRAMS THAT "TAKE IT FROM THERE"


AUG 17, 1974    LISP 893    - GLS AND JONL -
.  .  .
[3] NEW COMMANDS FOR THE BINFORD EDITOR:
	SS (SAVE SPOT) GOBBLES THE NAME OF AN ATOMIC
	    SYMBOL, AND SETQ'S IT TO THE CURRENT EDITOR
	    CONTEXT.
	RS (RESTORE SPOT) GOBBLES SUCH A SETQ'D ATOMIC SYMBOL
	    AND MAGICALLY MOVES THE EDITOR'S CURSOR TO THE
	    SAVED SPOT.
	PC (PRINT CONTEXT) GOBBLES UP TO TWO FLONUMS (TERMINATE
	    WITH $$) AND, USING THEM FOR THE PRINLEVEL AND
	    PRINLENGTH, PRINTS THE CURRENT LEVEL OF LIST
	    STRUCTURE. IF YOU DON'T SUPPLY TWO ARGS,
	    DEFAULTS OF 4 ARE USED.


TUESDAY  SEPT 14,1976   FM+6D.1H.33M.7S.   LISP 1211  -GLS,JONL-
.  .  .
[7] CHANGES TO THE "BINFORD EDITOR" (EDIT FUNCTION):
	  [7.1] THE COMMANDS "C" AND "-C" HAVE DISAPPEARED.
		THEY WERE EQUIVALENT TO THE STILL-EXISTING
		"F" AND "-F" COMMANDS.
	  [7.2]	"SS" = "SAVE SPOT", "RS" = "RESTORE SPOT"
		BOTH TAKE AN ATOMIC SYMBOL AS AN ARGUMENT.
		SS SAVES THE CURRENT "SPOT" (WHERE THE $$ APPEARS)
		AS THE VALUE OF THE SPECIFIED VARIABLE, AND RS
		RETURNS TO THAT SPOT.  THUS:
			SS FOO
			... LOTSA EDITING ...
			RS FOO
			<NOW CURSOR IS WHERE IT WAS BEFORE THE SS>
	  [7.3]	AN ARGUMENT TO EDIT NO LONGER CONTROLS THE AUTO-PRINT
		FEATURE (SEE [7.4] BELOW);  INSTEAD, IT SHOULD BE AN
		ATOMIC SYMBOL, THE NAME OF A FUNCTION.  AS THE EDITOR
		IS ENTERED, THAT FUNCTION IS "YANKED" SO THAT EDITING 
		MAY BEGIN ON ITS CODE WITHOUT EXPLICITLY USING THE 
		"Y" COMMAND.  THE VALUE OF THE VARIABLE "EDIT" 
		CONTROLS WHICH PROPERTIES WILL BE HUNTED FOR BY THE 
		"Y" OPERATION [INITIAL VALUE IS (EXPR FEXPR MACRO)].
	  [7.4] "SP" = "START/STOP PRINTING" TOGGLES THE STATE OF
		THE AUTOMATIC PRINTOUT AFTER EACH COMMAND.
	  [7.5]	"-KI" IS LIKE "L KI"; THAT IS, IT REPLACES THE
		PRECEDING S-EXPRESSION WITH ITS ARGUMENT.
	  [7.6]	AN "S" COMMAND IMMEDIATELY FOLLOWED BY "$$"
		(I.E. A NULL SEARCH STRING" WILL REPEAT THE PREVIOUS
		SEARCH, AS IN TECO.
	  [7.7]	YANKING IN A VALUE PROPERTY NOW WINS.  THUS:
			YP FOO VALUE $$
		ALLOWS YOU TO EDIT THE VALUE PROPERTY OF FOO.


WEDNESDAY  DEC 29,1976  FQ+1D.9H.29M.54S.  LISP 1251  -JONL-
.  .  .
8) EDIT ALLOWS THE USER TO DEFINE NEW EDITING FUNCTIONS.  PUTTING AN 
   "EDIT" PROPERTY ON AN ATOM MAKES IT AN EDITOR COMMAND, AND WHEN 
   INVOKED, THAT FUNCTIONS IS CALLED WITH THREE ARGUMENTS:
	  I) REPEAT COUNT
	 II) THE CURRENT "LEFT-LIST"  (VALUE OF THE ATOM )
	III) THE CURRENT "UP-LIST"
   FOR MORE DETAILS, SEE THE FILE MC:LISP;EDITOR >


THURSDAY  JAN 06,1977  FM+1D.23H.52M.11S.   LISP 1252  - GLS -
.  .  .
[4] IF EDIT READS A COMMAND WHOSE NAME IS NOT RECOGNIZED, THEN IF THE
    ATOM OF THAT NAME HAS AN EDIT PROPERTY, THEN THAT PROPERTY SHOULD
    BE A FUNCTION.  IT WILL BE CALLED WITH THE REPEAT COUNT AS AN ARGUMENT
    (0 IS SUPPLIED IF NO ARGUMENT IS GIVEN).  THE FUNCTION MAY
    DO ANYTHING IT LIKES, BUT WILL PROBABLY WANT TO OPERATE ON THE
    FUNCTION BEING EDITED.  THE EDITOR'S CURSOR IS REPRESENTED BY
    TWO DATA STRUCTURES, THE "LEFT-LIST" AND THE "UP-LIST".
    THE FORMER SAYS HOW TO BACK UP AT THE CURRENT LEVEL OF LIST;
    THE LATTER SAYS HOW TO BACK UP A LEVEL OF LIST STRUCTURE.
    THE LEFT-LIST IS THE VALUE OF THE ATOM  (THREE ALTMODES),
    AND THE UP-LIST IS THE VALUE OF THE ATOM ^^^ (THREE UPARROWS OR
    CIRCUMFLEXES, ASCII 136).
    THE CAR OF THE LEFT-LIST IS THE LEVEL OF LIST STRUCTURE BEING
    EDITED; THE CURSOR IS CONSIDERED TO BE BEFORE THE CAAR
    OF THE LEFT-LIST.  THE CDR OF THE LEFT-LIST IS THE LEFT-LIST
    FOR THE PREVIOUS POINT IN THIS LEVEL OF LIST.  THE UP-LIST
    IS A STACK OF OLD LEFT-LISTS.
    THE FOLLOWING FUNCTIONS ARE USEFUL UTILITIES FOR BUILDING
    NEW EDITOR FUNCTIONS, AND ILLUSTRATE THE CORRECT WAY TO MANIPULATE
    THE LEFT-LIST AND UP-LIST.
	(DEFUN RIGHT () (AND (EDCAR) (SETQ  (CONS (CDAR ) ))))
	(DEFUN LEFT () (AND  (CDR ) (SETQ  (CDR ))))
	(DEFUN DOWN () (AND (EDCAAR)
			    (SETQ ^^^ (CONS  ^^^)  (NCONS (CAAR )))))
	(DEFUN UP () (AND ^^^ (CAR ^^^) (CDR ^^^)
			  (SETQ  (CAR ^^^) ^^^ (CDR ^^^))))
	(DEFUN YANK (FN)
	       ((LAMBDA (PL)
			(COND (PL (SETQ ^^^ NIL)
				  (SETQ  (NCONS PL)))
			      (T (PRINC '|??|))))
		(GETL FN EDIT)))
	(DEFUN SPLICE (IT)
	       (COND ((AND (LEFT) (EDCAR))
		      (RPLACD (CAR ) IT)
		      (RIGHT))
		     ((AND (UP) (EDCAR))
		      (RPLACA (CAR ) IT)
		      (DOWN))))
	(DEFUN KILL ()
	       (PROG2 NIL (CAAR )
		      (SPLICE (COND ((EDCAR) (CDAR )) (T (CAR ))))))
	(DEFUN INSERT (IT)
	       (SPLICE (CONS IT (AND  (CAR ))))
	       (RIGHT))

	(DEFUN EDCAR () (AND  (NOT (ATOM (CAR )))))
	(DEFUN EDCAAR () (AND (EDCAR) (NOT (ATOM (CAAR )))))

    NOTICE THAT LEFT AND RIGHT AND UP AND DOWN RETURN NIL
    IF THEY FAIL.  KILL RETURNS THE THING KILLED (THE STANDARD
    EDITOR COMMAND "K" PUTS THIS THING INTO THE VALUE CELL OF "".)
    AS TWO EXAMPLES OF NEW EDITOR COMMANDS, CONSIDER
    "XCH" (NOTE THAT NAMES OF EDITOR COMMANDS MUST BE THREE CHARACTERS OR
    FEWER), WHICH TRANSPOSES THE NEXT TWO ITEMS AFTER THE CURSOR,
    AND "BRY", WHICH BURIES THE NEXT THING IN <ARGUMENT> LEVELS
    OF LIST STRUCTURE.

	(DEFPROP XCH ED-EXCHANGE EDIT)
	(DEFUN ED-EXCHANGE (N)		       ;ARGUMENT IS IGNORED
	       (INSERT (PROG2 NIL (KILL) (RIGHT))))

	(DEFPROP BRY ED-BURY EDIT)
	(DEFUN ED-BURY (N)
	       (AND (EDCAR)
		    (DO ((I (MAX N 1) (- I 1)))
			((ZEROP I))
			(SPLICE (RPLACA (CAR ) (NCONS (CAAR )))))))

    I HAVE TESTED THESE DEFINITIONS AND THEY SEEM TO WORK.


1/13/78   LISP 1383   
.  .  .
[3] THE EDITOR COMMAND  YV FOO  IS THE SAME AS  YP FOO VALUE .
    IT IS USEFUL FOR EDITING THE VALUE OF A SYMBOL.


Thursday  June 07,1979    FQ+5D.11H.58M.56S.		- Jonl - 
.  .  .
5) The famous but Kludgy Binford Editor is now autoloadable.
   Thus it is no longer part of the initial ITS maclisp environment.
   REMEMBER: 	 	holds the last thing killed
		 	holds the "back-upwards" list
		^^^ 	holds the "back-leftwards" list
		EDIT 	hold a list of the names for "editible" properties
		"S", that is the search command, with no trailing arguments,
		    means to search again for the same thing as before.
		Both "S" and "I" take arbitrarily many trailing arguments,
		    terminated by <alt-mode><altmode><space>
   Also, any symbol with an EDIT property may be an edit command,
   wherein the function stored under the EDIT property is applied
   to a number:   0      means no numeric arg to function
		  n > 0  is the numeric argument given to the command

