diff --recursive --new-file --unified cl-ppcre-1.2.4/api.lisp cl-ppcre-1.2.5/api.lisp
--- cl-ppcre-1.2.4/api.lisp	2005-03-07 16:02:52.000000000 -0600
+++ cl-ppcre-1.2.5/api.lisp	2005-03-08 23:04:13.207339000 -0600
@@ -49,12 +49,7 @@
                                                       single-line-mode
                                                       extended-mode
                                                       destructive)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (ignore destructive))
   ;; parse the string into a parse-tree and then call CREATE-SCANNER
   ;; again
@@ -77,12 +72,7 @@
                                                    single-line-mode
                                                    extended-mode
                                                    destructive)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (ignore destructive))
   (when (or case-insensitive-mode multi-line-mode single-line-mode extended-mode)
     (signal-ppcre-invocation-error
@@ -95,12 +85,7 @@
                                                single-line-mode
                                                extended-mode
                                                destructive)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (when extended-mode
     (signal-ppcre-invocation-error
      "Extended mode doesn't make sense in parse trees."))
@@ -233,12 +218,7 @@
 (defmethod scan ((regex-string string) target-string
                                        &key (start 0)
                                             (end (length target-string)))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   ;; note that the scanners are optimized for simple strings so we
   ;; have to coerce TARGET-STRING into one if it isn't already
   (funcall (create-scanner regex-string)
@@ -249,12 +229,7 @@
 (defmethod scan ((scanner function) target-string
                                     &key (start 0)
                                          (end (length target-string)))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (funcall scanner
            (maybe-coerce-to-simple-string target-string)
            start end))
@@ -263,12 +238,7 @@
 (defmethod scan ((parse-tree t) target-string
                                 &key (start 0)
                                      (end (length target-string)))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (funcall (create-scanner parse-tree)
            (maybe-coerce-to-simple-string target-string)
            start end))
@@ -311,12 +281,7 @@
 (defun scan-to-strings (regex target-string &key (start 0)
                                                  (end (length target-string))
                                                  sharedp)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Like SCAN but returns substrings of TARGET-STRING instead of
 positions, i.e. this function returns two values on success: the whole
 match as a string plus an array of substrings (or NILs) corresponding
@@ -538,12 +503,7 @@
 (defun all-matches (regex target-string
                           &key (start 0)
                                (end (length target-string)))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns a list containing the start and end positions of all
 matches of REGEX against TARGET-STRING, i.e. if there are N matches
 the list contains (* 2 N) elements. If REGEX matches an empty string
@@ -569,12 +529,7 @@
                                      &key (start 0)
                                           (end (length target-string))
                                           sharedp)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns a list containing all substrings of TARGET-STRING which
 match REGEX. If REGEX matches an empty string the scan is continued
 one position behind this match. If SHAREDP is true, the substrings may
@@ -601,12 +556,7 @@
                          with-registers-p
                          omit-unmatched-p
                          sharedp)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Matches REGEX against TARGET-STRING as often as possible and
 returns a list of the substrings between the matches. If
 WITH-REGISTERS-P is true, substrings corresponding to matched
@@ -679,12 +629,7 @@
         (t form)))
 
 (defun string-case-modifier (str from to start end)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum from to start end))
   "Checks whether all words in STR between FROM and TO are upcased,
 downcased or capitalized and returns a function which applies a
@@ -753,12 +698,7 @@
 (let* ((*use-bmh-matchers* nil)
        (reg-scanner (create-scanner "\\\\(?:\\\\|\\{\\d+\\}|\\d+|&|`|')")))
   (defmethod build-replacement-template ((replacement-string string))
-    (declare (optimize speed
-                       (safety 0)
-                       (space 0)
-                       (debug 1)
-                       (compilation-speed 0)
-                       #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
     "Converts a replacement string for REGEX-REPLACE or
 REGEX-REPLACE-ALL into a replacement template which is an
 S-expression."
@@ -817,12 +757,7 @@
 (let* ((*use-bmh-matchers* nil)
        (reg-scanner (create-scanner "\\\\(?:\\\\|\\{\\d+\\}|\\d+|&|`|')")))
   (defun build-replacement-template (replacement)
-    (declare (optimize speed
-                       (safety 0)
-                       (space 0)
-                       (debug 1)
-                       (compilation-speed 0)
-                       #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
     (typecase replacement
       (string
         (let ((from 0)
@@ -873,12 +808,7 @@
                           match-start match-end
                           reg-starts reg-ends
                           simple-calls)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Accepts a replacement template and the current values from the
 matching process in REGEX-REPLACE or REGEX-REPLACE-ALL and returns the
 corresponding template."
@@ -964,12 +894,7 @@
 
 (defun replace-aux (target-string replacement pos-list reg-list
                                   start end preserve-case simple-calls)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Auxiliary function used by REGEX-REPLACE and
 REGEX-REPLACE-ALL. POS-LIST contains a list with the start and end
 positions of all matches while REG-LIST contains a list of arrays
@@ -1013,12 +938,7 @@
                             (end (length target-string))
                             preserve-case
                             simple-calls)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Try to match TARGET-STRING between START and END against REGEX and
 replace the first match with REPLACEMENT.
 
@@ -1068,12 +988,7 @@
                                      (end (length target-string))
                                      preserve-case
                                      simple-calls)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Try to match TARGET-STRING between START and END against REGEX and
 replace all matches with REPLACEMENT.
 
@@ -1184,12 +1099,7 @@
         ,return-form))))
 
 (defun regex-apropos-list (regex &optional packages &key (case-insensitive t))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Similar to the standard function APROPOS-LIST but returns a list of
 all symbols which match the regular expression REGEX. If
 CASE-INSENSITIVE is true and REGEX isn't already a scanner, a
@@ -1201,12 +1111,7 @@
 (defun print-symbol-info (symbol)
   "Auxiliary function used by REGEX-APROPOS. Tries to print some
 meaningful information about a symbol."
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (handler-case
     (let ((output-list '()))
       (cond ((special-operator-p symbol)
@@ -1251,12 +1156,7 @@
 symbols which match the regular expression REGEX. If CASE-INSENSITIVE
 is true and REGEX isn't already a scanner, a case-insensitive scanner
 is used."
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (regex-apropos-aux (regex packages case-insensitive)
     (print-symbol-info symbol))
   (values))
diff --recursive --new-file --unified cl-ppcre-1.2.4/closures.lisp cl-ppcre-1.2.5/closures.lisp
--- cl-ppcre-1.2.4/closures.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/closures.lisp	2005-03-08 23:04:13.207342000 -0600
@@ -38,12 +38,7 @@
   "Like STRING=, i.e. compares the special string *STRING* from START1
 to END1 with STRING2 from START2 to END2. Note that there's no
 boundary check - this has to be implemented by the caller."
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum start1 end1 start2 end2))
   (loop for string1-idx of-type fixnum from start1 below end1
         for string2-idx of-type fixnum from start2 below end2
@@ -54,12 +49,7 @@
   "Like STRING-EQUAL, i.e. compares the special string *STRING* from
 START1 to END1 with STRING2 from START2 to END2. Note that there's no
 boundary check - this has to be implemented by the caller."
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum start1 end1 start2 end2))
   (loop for string1-idx of-type fixnum from start1 below end1
         for string2-idx of-type fixnum from start2 below end2
@@ -67,12 +57,7 @@
                            (schar string2 string2-idx))))
 
 (defgeneric create-matcher-aux (regex next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Creates a closure which takes one parameter,
 START-POS, and tests whether REGEX can match *STRING* at START-POS
 such that the call to NEXT-FN after the match would succeed."))
@@ -399,12 +384,7 @@
 
 (defun word-boundary-p (start-pos)
   "Check whether START-POS is a word-boundary within *STRING*."
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum start-pos))
   (let ((1-start-pos (1- start-pos)))
     ;; either the character before START-POS is a word-constituent and
diff --recursive --new-file --unified cl-ppcre-1.2.4/convert.lisp cl-ppcre-1.2.5/convert.lisp
--- cl-ppcre-1.2.4/convert.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/convert.lisp	2005-03-08 23:04:13.209342000 -0600
@@ -50,12 +50,7 @@
   `(third ,flags))
 
 (defun set-flag (token)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (special flags))
   "Reads a flag token and sets or unsets the corresponding entry in
 the special FLAGS list."
@@ -76,12 +71,7 @@
       (signal-ppcre-syntax-error "Unknown flag token ~A" token))))
 
 (defun add-range-to-hash (hash from to)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (special flags))
   "Adds all characters from character FROM to character TO (inclusive)
 to the char class hash HASH. Does the right thing with respect to
@@ -102,12 +92,7 @@
     hash))
 
 (defun convert-char-class-to-hash (list)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Combines all items in LIST into one char class hash and returns it.
 Items can be single characters, character ranges like \(:RANGE #\\A
 #\\E), or special character classes like :DIGIT-CLASS. Does the right
@@ -157,12 +142,7 @@
                                min-len
                                length
                                reg-seen)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum minimum)
            (type (or fixnum null) maximum))
   "Splits a REPETITION object into a constant and a varying part if
@@ -231,12 +211,7 @@
 ;; regex at the start (perhaps modulo #\Newline).
 
 (defun maybe-accumulate (str)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (special accumulate-start-p starts-with))
   (declare (ftype (function (t) fixnum) len))
   "Accumulate STR into the special variable STARTS-WITH if
@@ -291,12 +266,7 @@
   nil)
 
 (defun convert-aux (parse-tree)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (special flags reg-num accumulate-start-p starts-with max-back-ref))
   "Converts the parse tree PARSE-TREE into a REGEX object and returns it.
 
@@ -756,12 +726,7 @@
                                             parse-tree))))))))
 
 (defun convert (parse-tree)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Converts the parse tree PARSE-TREE into an equivalent REGEX object
 and returns three values: the REGEX object, the number of registers
 seen and an object the regex starts with which is either a STR object
diff --recursive --new-file --unified cl-ppcre-1.2.4/lexer.lisp cl-ppcre-1.2.5/lexer.lisp
--- cl-ppcre-1.2.4/lexer.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/lexer.lisp	2005-03-08 23:04:13.210342000 -0600
@@ -39,12 +39,7 @@
 
 (declaim (inline map-char-to-special-class))
 (defun map-char-to-special-char-class (chr)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Maps escaped characters like \"\\d\" to the tokens which represent
 their associated character classes."
   (case chr
@@ -62,12 +57,7 @@
       :non-whitespace-char-class)))
 
 (locally
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (defstruct (lexer (:constructor make-lexer-internal))
     "LEXER structures are used to hold the regex string which is
 currently lexed and to keep track of the lexer's state."
@@ -92,24 +82,14 @@
 
 (declaim (inline end-of-string-p))
 (defun end-of-string-p (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Tests whether we're at the end of the regex string."
   (<= (lexer-len lexer)
       (lexer-pos lexer)))
 
 (declaim (inline looking-at-p))
 (defun looking-at-p (lexer chr)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Tests whether the next character the lexer would see is CHR.
 Does not respect extended mode."
   (and (not (end-of-string-p lexer))
@@ -118,12 +98,7 @@
 
 (declaim (inline next-char-non-extended))
 (defun next-char-non-extended (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns the next character which is to be examined and updates the
 POS slot. Does not respect extended mode."
   (cond ((end-of-string-p lexer)
@@ -134,12 +109,7 @@
             (incf (lexer-pos lexer))))))
 
 (defun next-char (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns the next character which is to be examined and updates the
 POS slot. Respects extended mode, i.e.  whitespace, comments, and also
 nested comments are skipped if applicable."
@@ -203,12 +173,7 @@
 
 (declaim (inline fail))
 (defun fail (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Moves (LEXER-POS LEXER) back to the last position stored in
 \(LEXER-LAST-POS LEXER) and pops the LAST-POS stack."
   (unless (lexer-last-pos lexer)
@@ -217,12 +182,7 @@
   nil)
 
 (defun get-number (lexer &key (radix 10) max-length no-whitespace-p)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Read and consume the number the lexer is currently looking at and
 return it. Returns NIL if no number could be identified.
 RADIX is used as in PARSE-INTEGER. If MAX-LENGTH is not NIL we'll read
@@ -252,12 +212,7 @@
 
 (declaim (inline try-number))
 (defun try-number (lexer &key (radix 10) max-length no-whitespace-p)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Like GET-NUMBER but won't consume anything if no number is seen."
   ;; remember current position
   (push (lexer-pos lexer) (lexer-last-pos lexer))
@@ -269,12 +224,7 @@
 
 (declaim (inline make-char-from-code))
 (defun make-char-from-code (number error-pos)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Create character from char-code NUMBER. NUMBER can be NIL
 which is interpreted as 0. ERROR-POS is the position where
 the corresponding number started within the regex string."
@@ -288,12 +238,7 @@
          number))))
 
 (defun unescape-char (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Convert the characters(s) following a backslash into a token
 which is returned. This function is to be called when the backslash
 has already been consumed. Special character classes like \\W are
@@ -351,12 +296,7 @@
         chr))))
 
 (defun collect-char-class (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Reads and consumes characters from regex string until a right
 bracket is seen. Assembles them into a list \(which is returned) of
 characters, character ranges, like \(:RANGE #\\A #\\E) for a-e, and
@@ -437,12 +377,7 @@
        "Missing right bracket to close character class"))))
 
 (defun maybe-parse-flags (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Reads a sequence of modifiers \(including #\\- to reverse their
 meaning) and returns a corresponding list of \"flag\" tokens.  The
 \"x\" modifier is treated specially in that it dynamically modifies
@@ -478,12 +413,7 @@
     (decf (lexer-pos lexer))))
 
 (defun get-quantifier (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns a list of two values (min max) if what the lexer is looking
 at can be interpreted as a quantifier. Otherwise returns NIL and
 resets the lexer to its old position."
@@ -533,12 +463,7 @@
         (fail lexer)))))
 
 (defun get-token (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns and consumes the next token from the regex string (or NIL)."
   ;; remember starting position for UNGET-TOKEN function
   (push (lexer-pos lexer)
@@ -737,12 +662,7 @@
 
 (declaim (inline unget-token))
 (defun unget-token (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Moves the lexer back to the last position stored in the LAST-POS stack."
   (if (lexer-last-pos lexer)
     (setf (lexer-pos lexer)
@@ -751,12 +671,7 @@
 
 (declaim (inline start-of-subexpr-p))
 (defun start-of-subexpr-p (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Tests whether the next token can start a valid sub-expression, i.e.
 a stand-alone regex."
   (let* ((pos (lexer-pos lexer))
diff --recursive --new-file --unified cl-ppcre-1.2.4/optimize.lisp cl-ppcre-1.2.5/optimize.lisp
--- cl-ppcre-1.2.4/optimize.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/optimize.lisp	2005-03-08 23:04:13.212340000 -0600
@@ -33,12 +33,7 @@
 (in-package #:cl-ppcre)
 
 (defgeneric flatten (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Merges adjacent sequences and alternations, i.e. it
 transforms #<SEQ #<STR \"a\"> #<SEQ #<STR \"b\"> #<STR \"c\">>> to
 #<SEQ #<STR \"a\"> #<STR \"b\"> #<STR \"c\">>. This is a destructive
@@ -129,12 +124,7 @@
       regex)))
 
 (defgeneric gather-strings (regex)
-    (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
   (:documentation "Collects adjacent strings or characters into one
 string provided they have the same case mode. This is a destructive
 operation on REGEX."))
@@ -293,12 +283,7 @@
 ;; Note that START-ANCHORED-P will be called after FLATTEN and GATHER-STRINGS.
 
 (defgeneric start-anchored-p (regex &optional in-seq-p)
-    (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
   (:documentation "Returns T if REGEX starts with a \"real\" start
 anchor, i.e. one that's not in multi-line mode, NIL otherwise. If
 IN-SEQ-P is true the function will return :ZERO-LENGTH if REGEX is a
@@ -367,12 +352,7 @@
 ;; Note that END-STRING-AUX will be called after FLATTEN and GATHER-STRINGS.
 
 (defgeneric end-string-aux (regex &optional old-case-insensitive-p)
-    (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
   (:documentation "Returns the constant string (if it exists) REGEX
 ends with wrapped into a STR object, otherwise NIL.
 OLD-CASE-INSENSITIVE-P is the CASE-INSENSITIVE-P slot of the last STR
@@ -496,12 +476,7 @@
 
 (defmethod end-string ((regex regex))
   (declare (special end-string-offset))
-    (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
   "Returns the constant string (if it exists) REGEX ends with wrapped
 into a STR object, otherwise NIL."
   ;; LAST-STR points to the last STR object (seen from the end) that's
@@ -521,12 +496,7 @@
               end-string-offset (offset last-str))))))
 
 (defgeneric compute-min-rest (regex current-min-rest)
-    (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
   (:documentation "Returns the minimal length of REGEX plus
 CURRENT-MIN-REST. This is similar to REGEX-MIN-LENGTH except that it
 recurses down into REGEX and sets the MIN-REST slots of REPETITION
diff --recursive --new-file --unified cl-ppcre-1.2.4/packages.lisp cl-ppcre-1.2.5/packages.lisp
--- cl-ppcre-1.2.4/packages.lisp	2004-09-30 04:58:42.000000000 -0500
+++ cl-ppcre-1.2.5/packages.lisp	2005-03-08 23:04:13.213341000 -0600
@@ -59,7 +59,9 @@
            #:ppcre-syntax-error-string
            #:ppcre-syntax-error-pos
            #:register-groups-bind
-           #:do-register-groups))
+           #:do-register-groups
+           #:*standard-optimize-settings*
+           #:*special-optimize-settings*))
 
 #+:cormanlisp
 (defpackage "CL-PPCRE"
@@ -90,7 +92,9 @@
            "PPCRE-SYNTAX-ERROR-STRING"
            "PPCRE-SYNTAX-ERROR-POS"
            "REGISTER-GROUPS-BIND"
-           "DO-REGISTER-GROUPS"))
+           "DO-REGISTER-GROUPS"
+           "*STANDARD-OPTIMIZE-SETTINGS*"
+           "*SPECIAL-OPTIMIZE-SETTINGS*"))
 
 #-:cormanlisp
 (defpackage #:cl-ppcre-test
diff --recursive --new-file --unified cl-ppcre-1.2.4/parser.lisp cl-ppcre-1.2.5/parser.lisp
--- cl-ppcre-1.2.4/parser.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/parser.lisp	2005-03-08 23:04:13.217340000 -0600
@@ -36,12 +36,7 @@
 (in-package #:cl-ppcre)
 
 (defun group (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Parses and consumes a <group>.
 The productions are: <group> -> \"(\"<regex>\")\"
                                 \"(?:\"<regex>\")\"
@@ -154,12 +149,7 @@
             open-token))))
 
 (defun greedy-quant (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Parses and consumes a <greedy-quant>.
 The productions are: <greedy-quant> -> <group> | <group><quantifier>
 where <quantifier> is parsed by the lexer function GET-QUANTIFIER.
@@ -173,12 +163,7 @@
       group)))
 
 (defun quant (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Parses and consumes a <quant>.
 The productions are: <quant> -> <greedy-quant> | <greedy-quant>\"?\".
 Will return the <parse-tree> returned by GREEDY-QUANT and optionally
@@ -193,12 +178,7 @@
     greedy-quant))
 
 (defun seq (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Parses and consumes a <seq>.
 The productions are: <seq> -> <quant> | <quant><seq>.
 Will return <parse-tree> or (:SEQUENCE <parse-tree> <parse-tree>)."
@@ -263,12 +243,7 @@
       :void)))
   
 (defun reg-expr (lexer)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Parses and consumes a <regex>, a complete regular expression.
 The productions are: <regex> -> <seq> | <seq>\"|\"<regex>.
 Will return <parse-tree> or (:ALTERNATION <parse-tree> <parse-tree>)."
@@ -313,12 +288,7 @@
               seq)))))))
 
 (defun reverse-strings (parse-tree)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (cond ((stringp parse-tree)
           (nreverse parse-tree))
         ((consp parse-tree)
@@ -330,12 +300,7 @@
         (t parse-tree)))
 
 (defun parse-string (string)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Translate the regex string STRING into a parse tree."
   (let* ((lexer (make-lexer string))
          (parse-tree (reverse-strings (reg-expr lexer))))
@@ -344,4 +309,4 @@
       parse-tree
       (signal-ppcre-syntax-error*
        (lexer-pos lexer)
-       "Expected end of string"))))
\ No newline at end of file
+       "Expected end of string"))))
diff --recursive --new-file --unified cl-ppcre-1.2.4/ppcre-tests.lisp cl-ppcre-1.2.5/ppcre-tests.lisp
--- cl-ppcre-1.2.4/ppcre-tests.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/ppcre-tests.lisp	2005-03-08 23:04:13.218341000 -0600
@@ -52,12 +52,7 @@
                                multi-line-mode
                                single-line-mode
                                extended-mode)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Auxiliary function used by TEST to benchmark a regex scanner
 against Perl timings."
   (declare (type string string))
@@ -78,12 +73,7 @@
       lispworks
       (and sbcl sb-thread))
 (defun threaded-scan (scanner target-string &key (threads 10) (repetitions 5000))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Auxiliary function used by TEST to check whether SCANNER is thread-safe."
   (full-gc)
   (let ((collector (make-array threads))
@@ -143,12 +133,7 @@
                                   :defaults *cl-ppcre-test-base-directory*)
                    file-name-provided-p)
                   threaded)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (ignorable threaded))
   "Loop through all test cases in FILE-NAME and print report. Only in
 LispWorks and SCL: If THREADED is true, also test whether the scanners
diff --recursive --new-file --unified cl-ppcre-1.2.4/regex-class.lisp cl-ppcre-1.2.5/regex-class.lisp
--- cl-ppcre-1.2.4/regex-class.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/regex-class.lisp	2005-03-08 23:04:13.219342000 -0600
@@ -37,12 +37,7 @@
 ;; definitions aren't seen by the typep calls later in the file.
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (locally
-    (declare (optimize speed
-                       (safety 0)
-                       (space 0)
-                       (debug 1)
-                       (compilation-speed 0)
-                       #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
     (defclass regex ()
          ()
       (:documentation "The REGEX base class. All other classes inherit
@@ -257,12 +252,7 @@
       (:documentation "VOID objects represent empty regular expressions."))))
 
 (defmethod initialize-instance :after ((char-class char-class) &rest init-args)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Make large hash tables smaller, if possible."
   (let ((hash (getf init-args :hash)))
     (when (and hash
@@ -281,12 +271,7 @@
 ;;; zero-length STR object (only readers needed)
 
 (defmethod initialize-instance :after ((str str) &rest init-args)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (ignore init-args))
   "Automatically computes the length of a STR after initialization."
   (let ((str-slot (slot-value str 'str)))
@@ -295,48 +280,23 @@
   (setf (len str) (length (str str))))
 
 (defmethod len ((void void))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   0)
 
 (defmethod str ((void void))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "")
 
 (defmethod skip ((void void))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   nil)
 
 (defmethod start-of-end-string-p ((void void))
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   nil)
 
 (defgeneric case-mode (regex old-case-mode)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Utility function used by the optimizer (see GATHER-STRINGS).
 Returns a keyword denoting the case-(in)sensitivity of a STR or its
 second argument if the STR has length 0. Returns NIL for REGEX objects
@@ -355,12 +315,7 @@
   nil)
 
 (defgeneric copy-regex (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Implements a deep copy of a REGEX object."))
 
 (defmethod copy-regex ((anchor anchor))
@@ -461,12 +416,7 @@
 ;;; and therefore we stop REGISTER removal once we see an ALTERNATION.
 
 (defgeneric remove-registers (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Returns a deep copy of a REGEX (see COPY-REGEX) and
 optionally removes embedded REGISTER objects if possible and if the
 special variable REMOVE-REGISTERS-P is true."))
@@ -535,12 +485,7 @@
                  :elements (mapcar #'remove-registers (elements seq))))
 
 (defgeneric everythingp (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Returns an EVERYTHING object if REGEX is equivalent
 to this object, otherwise NIL. So, \"(.){1}\" would return true
 (i.e. the object corresponding to \".\", for example."))
@@ -587,12 +532,7 @@
   nil)
 
 (defgeneric regex-length (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Return the length of REGEX if it is fixed, NIL otherwise."))
 
 (defmethod regex-length ((seq seq))
@@ -663,12 +603,7 @@
   0)
 
 (defgeneric regex-min-length (regex)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Returns the minimal length of REGEX."))
 
 (defmethod regex-min-length ((seq seq))
@@ -719,12 +654,7 @@
   0)
 
 (defgeneric compute-offsets (regex start-pos)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (:documentation "Returns the offset the following regex would have
 relative to START-POS or NIL if we can't compute it. Sets the OFFSET
 slot of REGEX to START-POS if REGEX is a STR. May also affect OFFSET
diff --recursive --new-file --unified cl-ppcre-1.2.4/repetition-closures.lisp cl-ppcre-1.2.5/repetition-closures.lisp
--- cl-ppcre-1.2.4/repetition-closures.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/repetition-closures.lisp	2005-03-08 23:04:13.220341000 -0600
@@ -117,12 +117,7 @@
             (go backward-loop)))))))
 
 (defun create-greedy-everything-matcher (maximum min-rest next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum min-rest)
            (type function next-fn))
   "Creates a closure which just matches as far ahead as possible,
@@ -151,12 +146,7 @@
 
 (defmethod create-greedy-constant-length-matcher ((repetition repetition)
                                                   next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is greedy and the minimal number of repetitions is
 zero. It is furthermore assumed that the inner regex of REPETITION is
@@ -214,12 +204,7 @@
                    (funcall inner-matcher curr-pos)))))))))
   
 (defmethod create-greedy-no-zero-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is greedy and the minimal number of repetitions is
 zero. It is furthermore assumed that the inner regex of REPETITION can
@@ -284,12 +269,7 @@
           #'greedy-aux)))))
 
 (defmethod create-greedy-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is greedy and the minimal number of repetitions is
 zero."
@@ -410,12 +390,7 @@
             finally (return (funcall next-fn curr-pos)))))))
 
 (defmethod create-non-greedy-constant-length-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is non-greedy and the minimal number of repetitions is
 zero. It is furthermore assumed that the inner regex of REPETITION is
@@ -476,12 +451,7 @@
                    (funcall inner-matcher curr-pos)))))))))
 
 (defmethod create-non-greedy-no-zero-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is non-greedy and the minimal number of repetitions is
 zero. It is furthermore assumed that the inner regex of REPETITION can
@@ -544,12 +514,7 @@
           #'non-greedy-aux)))))
   
 (defmethod create-non-greedy-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION is non-greedy and the minimal number of repetitions is
 zero."
@@ -658,12 +623,7 @@
 
 (defmethod create-constant-repetition-constant-length-matcher
        ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION has a constant number of repetitions. It is
 furthermore assumed that the inner regex of REPETITION is of fixed
@@ -737,12 +697,7 @@
              (funcall inner-matcher curr-pos))))))))
   
 (defmethod create-constant-repetition-matcher ((repetition repetition) next-fn)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Creates a closure which tries to match REPETITION. It is assumed
 that REPETITION has a constant number of repetitions."
   (let ((repetitions (minimum repetition))
diff --recursive --new-file --unified cl-ppcre-1.2.4/scanner.lisp cl-ppcre-1.2.5/scanner.lisp
--- cl-ppcre-1.2.4/scanner.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/scanner.lisp	2005-03-08 23:04:13.221342000 -0600
@@ -53,12 +53,7 @@
                                  (return-from bmh-matcher (1+ i)))))))))
 
 (defun create-bmh-matcher (pattern case-insensitive-p)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns a Boyer-Moore-Horspool matcher which searches the (special)
 simple-string *STRING* for the first occurence of the substring
 PATTERN. The search starts at the position START-POS within *STRING*
@@ -103,12 +98,7 @@
             thereis (and (,char-compare (schar *string* i) chr) i)))))
 
 (defun create-char-searcher (chr case-insensitive-p)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns a function which searches the (special) simple-string
 *STRING* for the first occurence of the character CHR. The search
 starts at the position START-POS within *STRING* and stops before
@@ -121,12 +111,7 @@
 (declaim (inline newline-skipper))
 
 (defun newline-skipper (start-pos)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum start-pos))
   "Find the next occurence of a character in *STRING* which is behind
 a #\Newline."
@@ -335,12 +320,7 @@
                            rep-num
                            zero-length-num
                            reg-num)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   (declare (type fixnum min-len zero-length-num rep-num reg-num))
   "Auxiliary function to create and return a scanner \(which is
 actually a closure). Used by CREATE-SCANNER."
@@ -523,4 +503,4 @@
         ;; expression to optimize so we just return POS
         (insert-advance-fn
           (advance-fn (pos)
-            pos))))))
\ No newline at end of file
+            pos))))))
diff --recursive --new-file --unified cl-ppcre-1.2.4/specials.lisp cl-ppcre-1.2.5/specials.lisp
--- cl-ppcre-1.2.4/specials.lisp	2004-04-22 13:50:16.000000000 -0500
+++ cl-ppcre-1.2.5/specials.lisp	2005-03-08 23:04:13.222341000 -0600
@@ -31,6 +31,22 @@
 
 (in-package #:cl-ppcre)
 
+;;; special variables used to effect declarations
+
+(defvar *standard-optimize-settings*
+  '(optimize
+    speed
+    (safety 0)
+    (space 0)
+    (debug 1)
+    (compilation-speed 0)
+    #+:lispworks (hcl:fixnum-safety 0))
+  "The standard optimize settings used by most declaration expressions.")
+
+(defvar *special-optimize-settings*
+  '(optimize speed space)
+  "Special optimize settings used only be a few declaration expressions.")
+
 ;;; special variables used by the lexer/parser combo
 
 (defvar *extended-mode-p* nil
@@ -123,4 +139,4 @@
     (cdr (assoc symbol
                 exported-symbols-alist
                 :test #'eq))))
-               
\ No newline at end of file
+               
diff --recursive --new-file --unified cl-ppcre-1.2.4/util.lisp cl-ppcre-1.2.5/util.lisp
--- cl-ppcre-1.2.4/util.lisp	2005-03-07 16:02:53.000000000 -0600
+++ cl-ppcre-1.2.5/util.lisp	2005-03-08 23:04:13.223340000 -0600
@@ -101,7 +101,7 @@
   (declaim (type fixnum *regex-char-code-limit*))
   
   (defun make-char-hash (test)
-    (declare (optimize speed space))
+    (declare #.*special-optimize-settings*)
     "Returns a hash-table of all characters satisfying test."
     (loop with hash = (make-hash-table)
           for c of-type fixnum from 0 below char-code-limit
@@ -113,12 +113,7 @@
   (declaim (inline word-char-p))
   
   (defun word-char-p (chr)
-    (declare (optimize speed
-                       (safety 0)
-                       (space 0)
-                       (debug 1)
-                       (compilation-speed 0)
-                       #+:lispworks (hcl:fixnum-safety 0)))
+    (declare #.*standard-optimize-settings*)
     "Tests whether a character is a \"word\" character.
 In the ASCII charset this is equivalent to a-z, A-Z, 0-9, or _,
 i.e. the same as Perl's [\\w]."
@@ -134,7 +129,7 @@
 Same as Perl's [\\s]."))
 
   (defun whitespacep (chr)
-    (declare (optimize speed space))
+    (declare #.*special-optimize-settings*)
     "Tests whether a character is whitespace,
 i.e. whether it would match [\\s] in Perl."
     (find chr +whitespace-char-string+ :test #'char=)))
@@ -158,12 +153,7 @@
     "Hash-table containing all whitespace characters."))
 
 (defun merge-hash (hash1 hash2)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns the \"sum\" of two hashes. This is a destructive operation
 on HASH1."
   (cond ((> (hash-table-count hash2)
@@ -180,12 +170,7 @@
   hash1)
 
 (defun merge-inverted-hash (hash1 hash2)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Returns the \"sum\" of HASH1 and the \"inverse\" of HASH2. This is
 a destructive operation on HASH1."
   (loop for c of-type fixnum from 0 below *regex-char-code-limit*
@@ -195,12 +180,7 @@
   hash1)
 
 (defun create-ranges-from-hash (hash &key downcasep)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Tries to identify up to three intervals (with respect to CHAR<)
 which together comprise HASH. Returns NIL if this is not possible.
 If DOWNCASEP is true it will treat the hash-table as if it represents
@@ -289,12 +269,7 @@
           collect (list '(function identity) element)))
 
 (defun string-list-to-simple-string (string-list)
-  (declare (optimize speed
-                     (safety 0)
-                     (space 0)
-                     (debug 1)
-                     (compilation-speed 0)
-                     #+:lispworks (hcl:fixnum-safety 0)))
+  (declare #.*standard-optimize-settings*)
   "Concatenates a list of strings to one simple-string."
   ;; this function provided by JP Massar; note that we can't use APPLY
   ;; with CONCATENATE here because of CALL-ARGUMENTS-LIMIT
