Index: swank-backend.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-backend.lisp,v
retrieving revision 1.174
diff -u -r1.174 swank-backend.lisp
--- swank-backend.lisp	26 Feb 2009 19:57:35 -0000	1.174
+++ swank-backend.lisp	28 Apr 2009 13:28:41 -0000
@@ -521,7 +521,8 @@
       (ignorable      '(&rest vars))
       (special        '(&rest vars))
       (inline         '(&rest function-names))
-      (notinline      '(&rest function-name))
+      (notinline      '(&rest function-names))
+      (declaration    '(&rest names))
       (optimize       '(&any compilation-speed debug safety space speed))  
       (type           '(type-specifier &rest args))
       (ftype          '(type-specifier &rest function-names))
Index: swank-openmcl.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank-openmcl.lisp,v
retrieving revision 1.160
diff -u -r1.160 swank-openmcl.lisp
--- swank-openmcl.lisp	27 Mar 2009 12:58:45 -0000	1.160
+++ swank-openmcl.lisp	28 Apr 2009 13:28:42 -0000
@@ -219,6 +219,12 @@
 (defimplementation function-name (function)
   (ccl:function-name function))
 
+(defmethod declaration-arglist ((decl-identifier (eql 'optimize)))
+  (let ((flags (ccl:declaration-information decl-identifier)))
+    (if flags
+        `(&any ,flags)
+        (call-next-method))))
+
 ;;; Compilation
 
 (defvar *buffer-offset* nil)
@@ -871,6 +877,9 @@
                                         `(setf ,symbol))))
                (when (fboundp setf-function-name)
                  (doc 'function setf-function-name))))
+      (maybe-push
+       :type (when (ccl:type-specifier-p symbol)
+               (doc 'type)))
        result)))
 
 (defimplementation describe-definition (symbol namespace)
Index: contrib/slime-parse.el
===================================================================
RCS file: /project/slime/cvsroot/slime/contrib/slime-parse.el,v
retrieving revision 1.19
diff -u -r1.19 slime-parse.el
--- contrib/slime-parse.el      27 Feb 2009 21:35:35 -0000      1.19
+++ contrib/slime-parse.el      28 Apr 2009 13:38:53 -0000
@@ -130,36 +130,39 @@
 
 (defun slime-parse-extended-operator/declare
     (name user-point current-forms current-indices current-points)
-  (when (string= (thing-at-point 'char) "(")
-    (let ((orig-point (point)))
-      (goto-char user-point)
-      (slime-end-of-symbol)
-      ;; Head of CURRENT-FORMS is "declare" at this point, but we're
-      ;; interested in what comes next.
-      (let* ((decl-ops     (rest current-forms))
-             (decl-indices (rest current-indices))
-             (decl-points  (rest current-points))
-             (decl-pos     (1- (first decl-points)))
-             (nesting      (slime-nesting-until-point decl-pos))
-             (declspec-str (concat (slime-incomplete-sexp-at-point nesting)
-                                   (make-string nesting ?\)))))
-        (save-match-data ; `(declare ((foo ...))' or `(declare (type (foo ...)))' ?
-          (if (or (eql 0 (string-match "\\s-*(\\((\\(\\sw\\|\\s_\\|\\s-\\)*)\\))$"
-                                       declspec-str))
-                  (eql 0 (string-match "\\s-*(type\\s-*\\((\\(\\sw\\|\\s_\\|\\s-\\)*)\\))$"
-                                       declspec-str)))
-              (let* ((typespec-str (match-string 1 declspec-str))
-                     (typespec (slime-make-form-spec-from-string typespec-str)))
-                (setq current-forms   (list `(:type-specifier ,typespec)))
-                (setq current-indices (list (second decl-indices)))
-                (setq current-points  (list (second decl-points))))
-              (let ((declspec (slime-make-form-spec-from-string declspec-str)))
-                (setq current-forms   (list `(,name) `(:declaration ,declspec)))
-                (setq current-indices (list (first current-indices)
-                                           (first decl-indices)))
-                (setq current-points  (list (first current-points)
-                                           (first decl-points)))))))))
-  (values current-forms current-indices current-points))
+  (if (string= (thing-at-point 'char)
+               (if (equalp (caar current-forms) "proclaim")
+                   "'"
+                   "("))
+      (progn
+        (goto-char user-point)
+        (slime-end-of-symbol)
+        ;; Head of CURRENT-FORMS is "declare" at this point, but we're
+        ;; interested in what comes next.
+        (let* ((decl-indices (rest current-indices))
+               (decl-points  (rest current-points))
+               (decl-pos     (1- (first decl-points)))
+               (nesting      (slime-nesting-until-point decl-pos))
+               (declspec-str (concat (slime-incomplete-sexp-at-point nesting)
+                                     (make-string nesting ?\)))))
+          (save-match-data ; `(declare ((foo ...))' or `(declare (type (foo ...)))' ?
+            (if (or (eql 0 (print (string-match "\\s-*(\\((\\(\\sw\\|\\s_\\|\\s-\\)*)\\))$"
+                                          (print declspec-str))))
+                    (eql 0 (string-match "\\s-*(type\\s-*\\((\\(\\sw\\|\\s_\\|\\s-\\)*)\\))$"
+                                         declspec-str)))
+                (let* ((typespec-str (match-string 1 declspec-str))
+                       (typespec (slime-make-form-spec-from-string typespec-str)))
+                  (values (list `(:type-specifier ,typespec))
+                          (list (second decl-indices))
+                          (list (second decl-points))))
+                (let ((declspec (slime-make-form-spec-from-string declspec-str)))
+                  (values
+                   (list `(,name) `(:declaration ,declspec))
+                   (list (first current-indices)
+                         (first decl-indices))
+                   (list (first current-points)
+                         (first decl-points))))))))
+      (values current-forms current-indices current-points)))
 
 (defun slime-nesting-until-point (target-point)
   "Returns the nesting level between current point and TARGET-POINT.