🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cu.slug
Article #592

Some hacks

#592
From: Daniel Finster
Date: Mon, 27 Nov 1995 00:00
40 lines
2832 bytes
SLUG has been awful silent recently (besides those @#$!ing magazine
scams), has someone poured salt on it?

In the interest of increasing useful traffic, I am offering to my
fellow SLUGs a few hacks I've been playing with in my spare time
today.  Hope you find them useful.  Any comments/suggestions etc would
be appreciated.

What would be most appreicated is if other SLUGs would take the time
to mail their hacks in, and maybe even some slugful discussion.

1;;; -*- Syntax: Common-Lisp; Base: 10; Package: USER -*-

0(defmacro 20 (2args0 1&body0 2body0) `(function (lambda ,args ,@body))) 1; hacked from KWH's macro

0(defmacro 2SHRED0 (2arglist0 1&body0 2body0) `(disassemble (compile (defun ,(gensym) ,arglist ,@body))))

(defun 2PROCESS-APROPOS0 (2string0)
  (zl:remq 'nil (mapcar ( (2proc0) (when (string-search string (process-name proc)) proc)) process:*all-processes*)))

(defun 2WINDOW-APROPOS0 (2string0 1&optional0 (2s-s-w0 tv:all-the-screens) 1&aux0 2found-windows0)
  "STRING is the string to search for in window names.
S-S-W is the Screen, Sheet or Window in which to look for matching inferiors.
  It can be a list of SSWs, an SSW object, a string to search for in names of Screens,
  or NIL which means the same as \"\" (all screens)."
  (when (eq s-s-w 'nil) (setq s-s-w ""))
  (labels ((2find-inferiors0 (2ssw0 1&aux0 (2inferiors0 (tv:sheet-inferiors ssw)))
	     (when (string-search string (send ssw ':name)) (push ssw found-windows))
	     (unless (null inferiors) (mapcar ( (2w0) (find-inferiors w)) inferiors))))
    (cond ((listp s-s-w) (mapc #'find-inferiors s-s-w))
	  ((stringp s-s-w) (mapc #'find-inferiors (zl:remq 'nil (mapcar ( (2s0) (when (string-search s-s-w (send s ':name)) s))
									tv:all-the-screens))))
	  (t (find-inferiors s-s-w))))
  (nreverse found-windows))

(defun 2sharp-atsign-reader0 (ignore stream 1&aux0 (*read-base* 8))
  (list-in-area sys:read-area 'sys:%find-structure-header (read stream t nil t)))

(zl:set-syntax-#-macro-char #\@ 'sharp-atsign-reader)

Technical Details
Message-ID: <817507273.16058@news.Colorado.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10077e,9ab102f896ca50d4,start
X-Google-Attributes: gid10077e,public
From: Daniel Finster <DF@SDF.LONESTAR.ORG>
Subject: Some hacks
Date: 1995/11/27
Message-ID: <817507273.16058@news.Colorado.EDU>
X-Deja-AN: 120230120
distribution: cu
sender: daemon@lace.colorado.edu
character-type-mappings: (1 0 (NIL 0) (NIL :ITALIC NIL) "CPTFONTI")
fonts: CPTFONT, CPTFONTI, CPTFONTCB
x-note1: message-id generated by recnews
x-note2: mail msgid was   <m0tJwUi-0000chC@SDF.LONESTAR.ORG>
organization: University of Colorado at Boulder
                         (2 0 (nil 0) (nil : BOLD NIL) "CPTFONTCB")
reply-to: <DF@SDF.LONESTAR.ORG>
newsgroups: cu.slug