diff --git a/changelog b/changelog
index 4aacc41..13e29ff 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20091001 tpd src/axiom-website/patches.html 20091001.01.tpd.patch
+20091001 tpd src/interp/msgdb.lisp cleanup
 20090930 tpd src/axiom-website/patches.html 20090930.04.tpd.patch
 20090930 tpd src/interp/nci.lisp cleanup
 20090930 tpd src/axiom-website/patches.html 20090930.03.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 3026334..5f1c3d8 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -2071,5 +2071,7 @@ src/interp/nrunfast.lisp cleanup<br/>
 src/interp/newfort.lisp cleanup<br/>
 <a href="patches/20090930.04.tpd.patch">20090930.04.tpd.patch</a>
 src/interp/nci.lisp cleanup<br/>
+<a href="patches/20091001.01.tpd.patch">20091001.01.tpd.patch</a>
+src/interp/msgdb.lisp cleanup<br/>
  </body>
 </html>
diff --git a/src/interp/msgdb.lisp.pamphlet b/src/interp/msgdb.lisp.pamphlet
index 3029d29..79c6af7 100644
--- a/src/interp/msgdb.lisp.pamphlet
+++ b/src/interp/msgdb.lisp.pamphlet
@@ -340,6 +340,7 @@ above for examples.
 
 (DEFUN |substituteSegmentedMsg| (|msg| |args|)
   (PROG (|nargs| |c| |n| |v| |a| |q| |arg| |head| |tail| |l|)
+  (declare (special |$texFormatting|))
     (RETURN
       (SEQ (PROGN
              (SPADLET |l| NIL)
@@ -632,6 +633,7 @@ above for examples.
 
 (DEFUN |noBlankBeforeP| (|word|)
   (PROG ()
+  (declare (special |$msgdbListPrims| |$msgdbNoBlanksBeforeGroup|))
     (RETURN
       (COND
         ((INTP |word|) NIL)
@@ -674,6 +676,7 @@ above for examples.
 
 (DEFUN |noBlankAfterP| (|word|)
   (PROG (|s|)
+  (declare (special |$msgdbListPrims| |$msgdbNoBlanksAfterGroup|))
     (RETURN
       (COND
         ((INTP |word|) NIL)
@@ -757,6 +760,7 @@ above for examples.
 ;  sayMSG flowSegmentedMsg(msg,$LINELENGTH,3)
 
 (DEFUN |sayPatternMsg| (|msg| |args|)
+  (declare (special $LINELENGTH))
   (PROGN
     (SPADLET |msg| (|segmentKeyedMsg| |msg|))
     (SPADLET |msg| (|substituteSegmentedMsg| |msg| |args|))
@@ -769,6 +773,7 @@ above for examples.
 ;  spadThrow()
 
 (DEFUN |throwPatternMsg| (|key| |args|)
+  (declare (special |$testingErrorPrefix| |$testingSystem|))
   (PROGN
     (|sayMSG| (MAKESTRING " "))
     (COND (|$testingSystem| (|sayMSG| |$testingErrorPrefix|)))
@@ -809,6 +814,8 @@ above for examples.
 
 (DEFUN |sayKeyedMsgLocal| (|key| |args|)
   (PROG (|msg| |msg'|)
+  (declare (special |$printMsgsToFile| $LINELENGTH $MARGIN 
+                    |$displayMsgNumber|))
     (RETURN
       (PROGN
         (SPADLET |msg| (|segmentKeyedMsg| (|getKeyedMsg| |key|)))
@@ -832,6 +839,7 @@ above for examples.
 ;  spadThrow()
 
 (DEFUN |throwKeyedErrorMsg| (|kind| |key| |args|)
+  (declare (special |$testingErrorPrefix| |$testingSystem|))
   (PROGN
     (BUMPERRORCOUNT |kind|)
     (|sayMSG| (MAKESTRING " "))
@@ -859,6 +867,7 @@ above for examples.
 ;  throwKeyedMsg1(key, args)
 
 (DEFUN |throwKeyedMsg| (|key| |args|)
+  (declare (special |$saturn|))
   (COND
     (|$saturn| (|saturnThrowKeyedMsg| |key| |args|))
     ('T (|throwKeyedMsg1| |key| |args|))))
@@ -874,7 +883,7 @@ above for examples.
 
 (DEFUN |saturnThrowKeyedMsg| (|key| |args|)
   (PROG (*STANDARD-OUTPUT* |last|)
-    (DECLARE (SPECIAL *STANDARD-OUTPUT*))
+    (DECLARE (SPECIAL *STANDARD-OUTPUT* |$texOutputStream|))
     (RETURN
       (PROGN
         (SPADLET *STANDARD-OUTPUT* |$texOutputStream|)
@@ -895,7 +904,8 @@ above for examples.
 
 (DEFUN |throwKeyedMsg1| (|key| |args|)
   (PROG (*STANDARD-OUTPUT*)
-    (DECLARE (SPECIAL *STANDARD-OUTPUT*))
+    (DECLARE (SPECIAL *STANDARD-OUTPUT* |$testingErrorPrefix|
+                      |$testingSystem| |$texOutputStream|))
     (RETURN
       (PROGN
         (SPADLET *STANDARD-OUTPUT* |$texOutputStream|)
@@ -920,6 +930,7 @@ above for examples.
 
 (DEFUN |throwListOfKeyedMsgs| (|descKey| |descArgs| |l|)
   (PROG (|key| |args| |n|)
+  (declare (special |$testingErrorPrefix| |$testingSystem|))
     (RETURN
       (SEQ (PROGN
              (|sayMSG| (MAKESTRING " "))
@@ -953,6 +964,7 @@ above for examples.
 ;  handleLispBreakLoop($BreakMode)
 
 (DEFUN |breakKeyedMsg| (|key| |args|)
+  (declare (special |$BreakMode|))
   (PROGN
     (BUMPCOMPERRORCOUNT)
     (|sayKeyedMsg| |key| |args|)
@@ -963,6 +975,7 @@ above for examples.
 ;  keyedSystemError1(key, args)
 
 (DEFUN |keyedSystemError| (|key| |args|)
+  (declare (special |$saturn|))
   (COND
     (|$saturn| (|saturnKeyedSystemError| |key| |args|))
     ('T (|keyedSystemError1| |key| |args|))))
@@ -980,7 +993,7 @@ above for examples.
 
 (DEFUN |saturnKeyedSystemError| (|key| |args|)
   (PROG (*STANDARD-OUTPUT*)
-    (DECLARE (SPECIAL *STANDARD-OUTPUT*))
+    (DECLARE (SPECIAL *STANDARD-OUTPUT* |$BreakMode| |$texOutputStream|))
     (RETURN
       (PROGN
         (SPADLET *STANDARD-OUTPUT* |$texOutputStream|)
@@ -1019,6 +1032,7 @@ above for examples.
 
 (DEFUN |pushSatOutput| (|arg|)
   (PROG (|was|)
+  (declare (special |$saturnMode|))
     (RETURN
       (COND
         ((BOOT-EQUAL |$saturnMode| |arg|) |arg|)
@@ -1045,6 +1059,7 @@ above for examples.
 ;  $saturnMode
 
 (DEFUN |popSatOutput| (|newmode|)
+  (declare (special |$saturnMode|))
   (COND
     ((BOOT-EQUAL |newmode| |$saturnMode|) NIL)
     ((BOOT-EQUAL |newmode| '|verb|) (SPADLET |$saturnMode| '|verb|)
@@ -1097,7 +1112,7 @@ above for examples.
 
 (DEFUN |sayKeyedMsgFromDb| (|key| |args| |dbName|)
   (PROG (|$msgDatabaseName| |msg| |u|)
-    (DECLARE (SPECIAL |$msgDatabaseName|))
+    (DECLARE (SPECIAL |$msgDatabaseName| $LINELENGTH |$displayMsgNumber|))
     (RETURN
       (PROGN
         (SPADLET |$msgDatabaseName| (|pathname| |dbName|))
@@ -1124,6 +1139,7 @@ above for examples.
 (DEFUN |returnStLFromKey| (&REST G166528 &AUX |optDbN| |argL| |key|)
   (DSETQ (|key| |argL| . |optDbN|) G166528)
   (PROG (|savedDbN| |text|)
+  (declare (special |$msgDatabaseName|))
     (RETURN
       (PROGN
         (SPADLET |savedDbN| |$msgDatabaseName|)
@@ -1142,6 +1158,7 @@ above for examples.
 ;  spadThrow()
 
 (DEFUN |throwKeyedMsgFromDb| (|key| |args| |dbName|)
+  (declare (special |$testingErrorPrefix| |$testingSystem|))
   (PROGN
     (|sayMSG| (MAKESTRING " "))
     (COND (|$testingSystem| (|sayMSG| |$testingErrorPrefix|)))
@@ -1228,6 +1245,7 @@ above for examples.
 (DEFUN |flowSegmentedMsg| (|msg| |len| |offset|)
   (PROG (|ISTMP#1| |ce| |a| |potentialMarg| |sbl| |tot| |firstLine|
                    |off1| |off| |actualMarg| |nl| |lnl|)
+  (declare (special |$texFormatting|))
     (RETURN
       (SEQ (COND
              ((AND (PAIRP |msg|) (EQ (QCDR |msg|) NIL)
@@ -1352,6 +1370,8 @@ above for examples.
 ;  THROW('mapCompiler,'tryInterpOnly)
 
 (DEFUN |keyedMsgCompFailure| (|key| |args|)
+  (declare (special |$compilingMap| |$reportInterpOnly| |$Coerce|
+                    |$useCoerceOrCroak|))
   (COND
     ((NULL |$useCoerceOrCroak|) (THROW '|coerceOrCroaker| '|croaked|))
     ('T
@@ -1378,6 +1398,8 @@ above for examples.
 
 (DEFUN |keyedMsgCompFailureSP| (|key| |args| |atree|)
   (PROG (|sp|)
+  (declare (special |$compilingMap| |$reportInterpOnly| |$Coerce|
+                    |$useCoerceOrCroak|))
     (RETURN
       (COND
         ((NULL |$useCoerceOrCroak|)
@@ -1402,6 +1424,7 @@ above for examples.
 
 (DEFUN |throwKeyedMsgCannotCoerceWithValue| (|val| |t1| |t2|)
   (PROG (|val'|)
+  (declare (special |$OutputForm|))
     (RETURN
       (COND
         ((NULL (SPADLET |val'|
@@ -1504,6 +1527,8 @@ above for examples.
 
 (DEFUN |spadStartUpMsgs| ()
   (PROG (|bar|)
+  (declare (special |$msgAlist| |$opSysName| $LINELENGTH *YEARWEEK*
+                    *BUILD-VERSION*))
     (RETURN
       (COND
         ((> 60 $LINELENGTH) NIL)
@@ -1525,7 +1550,9 @@ above for examples.
 
 ;version() == _*YEARWEEK_*
 
-(DEFUN |version| () *YEARWEEK*)
+(DEFUN |version| ()
+ (declare (special  *YEARWEEK*)) 
+  *YEARWEEK*)
 
 ;--% Some Advanced Formatting Functions
 ;brightPrint x ==
@@ -1582,6 +1609,8 @@ above for examples.
 
 (DEFUN |brightPrint0| (|x|)
   (PROG (|k|)
+  (declare (special |$highlightFontOff| |$highlightAllowed| $MARG
+                    |$highlightFontOn| |$texFormatting|))
     (RETURN
       (SEQ (COND
              (|$texFormatting| (|brightPrint0AsTeX| |x|))
@@ -1652,6 +1681,7 @@ above for examples.
 
 (DEFUN |brightPrint0AsTeX| (|x|)
   (PROG (|k|)
+  (declare (special $MARG))
     (RETURN
       (SEQ (COND
              ((BOOT-EQUAL |x| (MAKESTRING "%l"))
@@ -1745,6 +1775,7 @@ above for examples.
 
 (DEFUN |brightPrintHighlight| (|x|)
   (PROG (|pn| |key| |rst| |la|)
+  (declare (special $MARG |$texFormatting|))
     (RETURN
       (SEQ (COND
              (|$texFormatting| (|brightPrintHighlightAsTeX| |x|))
@@ -1819,6 +1850,7 @@ above for examples.
 
 (DEFUN |brightPrintHighlightAsTeX| (|x|)
   (PROG (|pn| |key| |rst| |la|)
+  (declare (special $MARG))
     (RETURN
       (SEQ (COND
              ((IDENTP |x|) (SPADLET |pn| (PNAME |x|))
@@ -1904,6 +1936,7 @@ above for examples.
 
 (DEFUN |brightPrintCenter| (|x|)
   (PROG (|ok| |wid| |f| |y|)
+  (declare (special $LINELENGTH |$texFormatting|))
     (RETURN
       (SEQ (COND
              (|$texFormatting| (|brightPrintCenterAsTeX| |x|))
@@ -2033,6 +2066,7 @@ above for examples.
 
 (DEFUN |brightPrintRightJustify| (|x|)
   (PROG (|ok| |wid| |y|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (COND
              ((ATOM |x|) (SPADLET |x| (|object2String| |x|))
@@ -2122,6 +2156,7 @@ above for examples.
 ;  2 + sayBrightlyLength x
 
 (DEFUN |sayBrightlyLength1| (|x|)
+  (declare (special |$highlightAllowed|))
   (COND
     ((|member| |x| '("%b" "%d" |%b| |%d|))
      (COND ((NULL |$highlightAllowed|) 1) ('T 1)))
@@ -2158,6 +2193,7 @@ above for examples.
 
 (DEFUN |sayAsManyPerLineAsPossible| (|l|)
   (PROG (|m| |w| |p| |n| |LETTMP#1| |c| |str|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (PROGN
              (SPADLET |l|
@@ -2225,6 +2261,7 @@ above for examples.
 ;say2PerLine l == say2PerLineWidth(l,$LINELENGTH / 2)
 
 (DEFUN |say2PerLine| (|l|)
+  (declare (special $LINELENGTH))
   (|say2PerLineWidth| |l| (QUOTIENT $LINELENGTH 2)))
 
 ;say2PerLineWidth(l,n) ==
@@ -2278,6 +2315,7 @@ above for examples.
 
 (DEFUN |sayLongOperation| (|x|)
   (PROG (|ISTMP#1| |front| |ISTMP#2| |back|)
+  (declare (special $LINELENGTH))
     (RETURN
       (COND
         ((AND (> (|sayWidth| |x|) $LINELENGTH)
@@ -2328,6 +2366,7 @@ above for examples.
 ;    sayBrightly '""
 
 (DEFUN |say2PerLineThatFit| (|l|)
+  (declare (special $LINELENGTH))
   (SEQ (DO () ((NULL |l|) NIL)
          (SEQ (EXIT (PROGN
                       (|sayBrightlyNT| (CAR |l|))
@@ -2361,6 +2400,7 @@ above for examples.
 
 (DEFUN |sayDisplayWidth,fn| (|y|)
   (PROG (|k|)
+  (declare (special |$quadSymbol|))
     (RETURN
       (SEQ (IF (OR (|member| |y| '(|%b| |%d| "%b" "%d"))
                    (BOOT-EQUAL |y| |$quadSymbol|))
@@ -2426,6 +2466,7 @@ above for examples.
 
 (DEFUN |pp2Cols| (|al|)
   (PROG (|LETTMP#1| |abb| |name|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (PROGN
              (DO () ((NULL |al|) NIL)
@@ -2465,6 +2506,7 @@ above for examples.
 
 (DEFUN |canFit2ndEntry| (|name| |al|)
   (PROG (|wid|)
+  (declare (special $LINELENGTH))
     (RETURN
       (PROGN
         (SPADLET |wid| (SPADDIFFERENCE (QUOTIENT $LINELENGTH 2) 10))
@@ -2481,6 +2523,7 @@ above for examples.
 ;center80 text == centerNoHighlight(text,$LINELENGTH,'" ")
 
 (DEFUN |center80| (|text|)
+  (declare (special $LINELENGTH))
   (|centerNoHighlight| |text| $LINELENGTH (MAKESTRING " ")))
 
 ;centerAndHighlight(text,:argList) ==
@@ -2499,6 +2542,7 @@ above for examples.
 (DEFUN |centerAndHighlight| (&REST G167236 &AUX |argList| |text|)
   (DSETQ (|text| . |argList|) G167236)
   (PROG (|width| |fillchar| |wid| |f| |fill1| |fill2|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (PROGN
              (SPADLET |width| (OR (IFCAR |argList|) $LINELENGTH))
@@ -2550,6 +2594,7 @@ above for examples.
 
 (DEFUN |center| (|text| |argList|)
   (PROG (|width| |fillchar| |u| |moreLines| |wid| |f| |fill1| |fill2|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (PROGN
              (SPADLET |width| (OR (IFCAR |argList|) $LINELENGTH))
@@ -2589,6 +2634,7 @@ above for examples.
 
 (DEFUN |splitSayBrightly| (|u|)
   (PROG (|width| |segment|)
+  (declare (special $LINELENGTH))
     (RETURN
       (SEQ (PROGN
              (SPADLET |width| 0)
@@ -2707,6 +2753,7 @@ above for examples.
 
 (DEFUN |escapeSpecialChars| (|s|)
   (PROG (|u| |buf|)
+  (declare (special |$saturn| |$htSpecialChars| |$htCharAlist|))
     (RETURN
       (SEQ (COND
              ((SPADLET |u| (LASSOC |s| |$htCharAlist|)) |u|)
