;;; -*- Mode: Common-Lisp; Package: User; Base: 10.; Patch-File: T -*-

;;; Reason: Added zwei:find-spr bound to ctrl-meta-s to allow quick
;;; location of a bug report by the SPR number.

;;;                           RESTRICTED RIGHTS LEGEND
;;;
;;; Use, duplication, or disclosure by the Government is subject to
;;; restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
;;; Technical Data and Computer Software clause at 52.227-7013.
;;;
;;;   TEXAS INSTRUMENTS INCORPORATED      
;;;   P.O. BOX 2909, M/S 2151             
;;;   AUSTIN, TEXAS 78769                 
;;;
;;; Copyright (C) 1988 Texas Instruments Incorporated.
;;; All rights reserved.

;;; Patch file for BUG version 10.4
;;; Written 01/09/89 17:34:56 by MARKY,
;;; while running on LIBRA from band LOD9
;;; With SYSTEM 4.74, VIRTUAL-MEMORY 4.4, EH 4.5, MAKE-SYSTEM 4.6, MICRONET 4.5, Experimental LOCAL-FILE 4.2,
;;;  BASIC-PATHNAME 4.13, NETWORK-SUPPORT-COLD 4.1, NAMESPACE 4.23, NETWORK-NAMESPACE 4.3,
;;;  DISK-IO 4.16, DISK-LABEL 4.0, BASIC-FILE 4.13, MAC-PATHNAME 4.10, NETWORK-PATHNAME 4.1,
;;;  COMPILER 4.13, TV 4.121, DATALINK 4.16, CHAOSNET 4.19, GC 4.3, MEMORY-AUX 4.1,
;;;  NVRAM 4.6, SYSLOG 4.0, STREAMER-TAPE 4.8, UCL 4.1, INPUT-EDITOR 4.0, METER 4.3,
;;;  ZWEI 4.37, DEBUG-TOOLS 4.2, NETWORK-SUPPORT 4.6, NETWORK-SERVICE 4.0, DATALINK-DISPLAYS 4.0,
;;;  FONT-EDITOR 4.0, SERIAL 4.0, PRINTER 4.10, PRINTER-TYPES 4.5, IMAGEN 4.1, SUGGESTIONS 4.0,
;;;  MAIL-DAEMON 4.9, MAIL-READER 4.9, TELNET 4.1, VT100 4.6, NAMESPACE-EDITOR 4.5,
;;;  PROFILE 4.4, VISIDOC 4.5, IP 3.21, Experimental BUG 10.3,  microcode 3, Band Name: Rel 4.1.1 + IP 6/15

#!C
; From file UPDATE-BUG.LISP#> BUG; SYS:
#10R USER#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "USER"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* SYS:COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* SYS::*COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: BUG; UPDATE-BUG.#"


;; may 01-09-89 Added code below.
(DEFUN zwei:find-spr (&optional (spr-number nil supplied-p) &aux buffer)
  "If SPR-NUMBER is supplied, then the SPR is read into a edit buffer and NOT selected.
   This allows multiple SPR's to be read in at one time. If SPR-NUMBER is NOT supplied
   then the user is prompted to enter the number of the SPR. Alternately a numeric arg
   can be used to supply the spr-number. For example: \"ctrl-U 1 2 3 4 ctrl-meta-s\"."
  (OR spr-number
      (SETQ spr-number (IF (> zwei:*numeric-arg* 1)
			   zwei:*numeric-arg*
			   (zwei:TYPEIN-LINE-READLINE "Enter SPR number :" spr-number))))
  (SETQ buffer (zwei:FIND-FILE (PATHNAME (FORMAT nil "bug:bug-info.reports;p~d.dat#>"  spr-number)) (NULL supplied-p)))
;  (AND buffer (zwei:MAKE-BUFFER-READ-ONLY buffer))
  (zwei:MAYBE-DISPLAY-DIRECTORY :READ);; This is interesting. (setq zwei:*AUTO-DIRECTORY-DISPLAY* :read) to see what happens
  zwei:DIS-TEXT)

(zwei:bind-key #\c-m-s 'zwei:find-spr)


))
