;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*- ;;; Patch file for System version 123.269 ;;; Reason: ;;; The famous "why did my *print-base* become octal?" bug. ;;; ;;; It turns out that *read-base*, *print-base*, and *readtable* are set to ;;; those appropriate to the buffer you were in whenever you do Meta-. ;;; and the mouse points to a function name. ;;; ;;; (zwei:compute-buffer-package) sets *package*, and also (can't you tell ;;; from its name?) *read-base*, *print-base*, and *readtable*. ;;; It is intended to be called only from within an editor closure. ;;; HOWEVER, (zwei:atom-under-mouse) calls it, and THAT function is ;;; called by (zwei:blink-function) which is called by the Mouse process. ;;; Written 10-May-88 19:50:19 by pld at site Gigamos Cambridge ;;; while running on Azathoth from band 3 ;;; with Experimental System 123.268, Experimental Local-File 73.5, Experimental FILE-Server 22.5, Experimental Unix-Interface 11.0, Experimental KERMIT 34.3, Experimental ZMail 71.2, Experimental Lambda-Diag 15.0, Experimental Tape 22.4, microcode 1756, SDU Boot Tape 3.14, SDU ROM 8, the old ones. ; From modified file DJ: L.ZWEI; MOUSE.LISP#104 at 10-May-88 19:50:20 #8R ZWEI#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "ZWEI"))) (COMPILER::PATCH-SOURCE-FILE "SYS: ZWEI; MOUSE  " (DEFUN ATOM-UNDER-MOUSE (WINDOW &OPTIONAL CHAR X Y LINE INDEX &AUX SYMBOL END) "Returns the symbol which the mouse is pointing at in WINDOW. NIL if not pointing at one. Normally, CHAR, X, Y, LINE, and INDEX are set from the mouse position. If you pass them, then the mouse position is irrelevant. Actually, X and Y are irrelevant in any case. All that matters is LINE and INDEX, and CHAR which would be the character there. The values are the symbol pointed at, the line it is in, and the start and end indices of the symbol as a substring in that line. All values are NIL if the position is not on a valid symbol." (DECLARE (VALUES SYMBOL LINE START END)) (OR CHAR (MULTIPLE-VALUE (CHAR X Y LINE INDEX) (MOUSE-CHAR WINDOW))) (AND CHAR ( CHAR #/CR) (DO ((I INDEX (1- I))) ((OR (ZEROP I) ( (ATOM-WORD-SYNTAX (CHAR-CODE (AREF LINE I))) WORD-ALPHABETIC)) (AND ( I INDEX) (CATCH-ERROR (LET ((*PACKAGE* *PACKAGE*) (*read-base* *read-base*) (*print-base* *print-base*) (*readtable* *readtable*) (READ-PRESERVE-DELIMITERS T) (INTERVAL (WINDOW-INTERVAL WINDOW))) (COMPUTE-BUFFER-PACKAGE INTERVAL) (MULTIPLE-VALUE (SYMBOL END) (CLI:READ-FROM-STRING LINE NIL NIL ':START (SETQ I (1+ I)) ':PRESERVE-WHITESPACE T)) (SETQ END (MIN (ARRAY-ACTIVE-LENGTH LINE) END))) NIL) (SYMBOLP SYMBOL) (VALUES SYMBOL LINE I END)))))) ))