 ; Splurge - Purge a drawing using the purge command.
 ; Copyright 1995, 2004 by Rocket Software Ltd.
 ; New from Rocket - self igniting bridge incendiaries.
 (defun c:splurge (/ urgep num)
  (setvar "clayer" "0")
  (command "qsave")
  (setvar "cmdecho" 1)
  (setq urgep T)
  (setq num 0)
  (while urgep
        (command "purge" "a")
        (command "*")
        (command "y")
        (setq urgep ())
        (while (/= 0 (getvar "cmdactive"))
               (setq num (1+ num))
               (setq urgep T)
               (command "Y")))
  (setvar "cmdecho" 0)
  (write-line (strcat (itoa num) " thing" (if (= num 1) "" "s") " purged."))
  (command "resume")
 (princ))