[Small-cl-src] Useless piece of code, with Important Information in comments

Ingvar ingvar at cathouse.bofh.se
Fri Jul 9 16:52:36 UTC 2004


;;; No More Mr Nice Listadmin...
;;; Remember, small-cl-src is "source code only" and "plain text".
;;; ALL comments on code SHOULD be sent to small-cl-src-discuss at hexapodia.net
;;; Attachments MUST NOT be used when mailing small-cl-src
;;; In theory, in a unix environment, with an mh-style mailfile 
;;; the following should result in a loadable lisp file (when called with the
;;; file name of the mh-style mail file and a suitable output stream):

(defun extract-small-cl-source (filename &optional (outstream t))
  (let ((extract nil))
    (with-open-file (infile filename)
     (do ((line (read-line infile nil infile) (read-line infile nil infile)))
	 ((or (eq line infile) (string= line "_______________________________________________") (string= line "-- ")) nil)
        (setf extract (or extract (string= line "")))
	(when extract
	  (format outstream "~a~%" line))))))






More information about the Small-cl-src mailing list