;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*- ;;; Patch file for System version 124.114 ;;; Reason: ;;; Fix up ZWEI mini-buffer default strings. C-Sh-Y gives a ;;; user-meaningful message if there is no default. Tags Search and Set ;;; Package have meaningful defaults. The generalized interface ;;; READ-FUNCTION-NAME-OR-STRING respects the externally bound default. ;;; Written 28-Jun-88 11:05:06 by keith (Keith Corbett) at site Gigamos Cambridge ;;; while running on Breaking Glass from band 2 ;;; with Experimental System 124.113, Experimental Local-File 74.3, Experimental File-Server 23.1, Experimental Unix-Interface 12.0, Experimental ZMail 72.1, Experimental Tape 23.6, Experimental Lambda-Diag 16.2, Tiger 28.0, microcode 1761, SDU Boot Tape 3.14, SDU ROM 103, Beta 3 plus patches. ; From modified file DJ: L.ZWEI; MOUSE.LISP#106 at 28-Jun-88 11:05:46 #8R ZWEI#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "ZWEI"))) (COMPILER::PATCH-SOURCE-FILE "SYS: ZWEI; MOUSE  " (defun read-function-name-or-string (&optional reverse-p prompt comtab (default *mini-buffer-default-string*)) (declare (values search-function key)) (let ((*mini-buffer-default-string* default) (read-function-name-must-be-defined nil) (read-function-name-old-global-mouse-char-blinker-handler *global-mouse-char-blinker-handler*) (read-function-name-old-global-mouse-char-blinker-documentation-string *global-mouse-char-blinker-documentation-string*) (read-function-name-old-mouse-font-char *mouse-font-char*) (read-function-name-old-mouse-x-offset *mouse-x-offset*) (read-function-name-old-mouse-y-offset *mouse-y-offset*)) (declare (special read-function-name-must-be-defined read-function-name-old-global-mouse-char-blinker-handler read-function-name-old-global-mouse-char-blinker-documentation-string read-function-name-old-mouse-font-char read-function-name-old-mouse-x-offset read-function-name-old-mouse-y-offset)) (let ((*post-command-hook* (append *post-command-hook* '(read-function-name-command-hook))) (*mini-buffer-value-history* *definition-name-history*)) (let ((*batch-undo-save* t)) (delete-interval (window-interval *mini-buffer-window*))) (unwind-protect (progn (read-function-name-command-hook nil) (get-extended-string-search-strings reverse-p prompt comtab)) (read-function-name-command-hook t))))) )) ; From modified file DJ: L.ZWEI; COMD.LISP#176 at 28-Jun-88 11:06:03 #8R ZWEI#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "ZWEI"))) (COMPILER::PATCH-SOURCE-FILE "SYS: ZWEI; COMD  " (DEFCOM COM-YANK-DEFAULT-STRING "Insert the default string into the mini buffer." () (IF (NULL *MINI-BUFFER-DEFAULT-STRING*) (BARF "There is no default in this context.") (INSERT-MOVING (POINT) *MINI-BUFFER-DEFAULT-STRING*)) DIS-TEXT) )) ; From modified file DJ: L.ZWEI; ZMNEW.LISP#56 at 28-Jun-88 11:17:30 #8R ZWEI#: (COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "ZWEI"))) (COMPILER::PATCH-SOURCE-FILE "SYS: ZWEI; ZMNEW  " (DEFCOM COM-SET-PACKAGE "Change the package associated with buffer or file. Specify a new package to be used when interning symbols read from this buffer; for example, evaluating or compiling parts of the buffer. This much does not affect operations on the file itself, only this ZMACS buffer. To specify a package that doesn't already exist, you must exit the first prompt with Control-Return, or type Return twice. Then you must confirm with /"Yes/". If you answer the first prompt with just Return, you will be asked whether to use a package chosen by default based on the current environment. Then you must confirm whether to use the default. You will also be asked whether to change the attribute list in the text. If you answer yes, the buffer's first line is modified to say that it belongs in the new package. This will affect all operations on the file, once you save the buffer. Then you will be asked whether to resectionize the buffer. If you say yes, all the functions definitions in the buffer will be recorded under symbols in the new package." () (LET ((ALIST nil) (default-package (or *DEFAULT-PACKAGE* *package* (find-package "USER")))) (DOLIST (PKG *ALL-PACKAGES*) (PUSH (CONS (PACKAGE-NAME PKG) PKG) ALIST) (DOLIST (N (PACKAGE-NICKNAMES PKG)) (PUSH (CONS N PKG) ALIST))) (LET ((PKG (let((*mini-buffer-default-string* (and default-package (package-name default-package)))) (COMPLETING-READ-FROM-MINI-BUFFER "Set package:" ALIST 'MAYBE)))) (OR (STRINGP PKG) (SETQ PKG (CAR PKG))) (cond ((not (EQUAL PKG ""))) ((and (SETQ PKG default-package) (or (YES-OR-NO-P (format nil "Use package ~A by default? " pkg)) (barf "You must specify a package or take the default.")))) (t (barf "There is no default package; cannot Set Package in this context."))) (IF (FIND-PACKAGE PKG) (PKG-GOTO PKG) (progn (SETQ PKG (STRING-UPCASE PKG)) (IF (YES-OR-NO-P (FORMAT NIL "Package ~A does not exist. Create? " PKG)) (PKG-GOTO (MAKE-PACKAGE PKG)) (BARF)))))) (SETF (BUFFER-PACKAGE *INTERVAL*) *PACKAGE*) (SEND *INTERVAL* ':SET-ATTRIBUTE ':PACKAGE (PACKAGE-NAME *PACKAGE*) ':QUERY) (WHEN (FQUERY NIL "Resectionize the buffer? ") (SEND *INTERVAL* ':REMPROP ':DONT-SECTIONIZE) (SECTIONIZE-BUFFER *INTERVAL*)) DIS-NONE) ))