[slime-cvs] CVS slime

trittweiler trittweiler at common-lisp.net
Mon May 14 18:56:56 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv3810

Modified Files:
	swank.lisp 
Log Message:
* swank.lisp: Liberated from unnecessary style-warnings!

  (eval-for-emacs): Don't use SLOT-VALUE on condition objects!
  (inspect-bigger-piece-actions): Changed from DEFMETHOD to DEFUN.
  (inspect-whole-thing-action): Likewise.
  (inspect-show-more-action): Likewise.
  (make-symbols-listing): Adds an explicit DEFGENERIC.
  (menu-choices-for-presentation): Likewise.
   	(make-symbols-listing (eql :classification)): Use `(loop for k
  being EACH hash-key ...)' rather than `(loop for k being THE
  hash-key)', to omit the justified style-warning from CLISP.


--- /project/slime/cvsroot/slime/swank.lisp	2007/05/14 15:21:18	1.484
+++ /project/slime/cvsroot/slime/swank.lisp	2007/05/14 18:56:56	1.485
@@ -2520,7 +2520,7 @@
                     (setq ok t))
                 (request-abort (c)
                   (setf ok nil
-                        reason (list (slot-value c 'swank-backend::reason))))))
+                        reason (list (swank-backend::reason c))))))
          (force-user-output)
          (send-to-emacs `(:return ,(current-thread)
                                   ,(if ok
@@ -4544,7 +4544,7 @@
                                   (lambda () (remhash key ht))))
                           (:newline))))))
 
-(defmethod inspect-bigger-piece-actions (thing size)
+(defun inspect-bigger-piece-actions (thing size)
   (append 
    (if (> size *slime-inspect-contents-limit*)
        (list (inspect-show-more-action thing)
@@ -4553,14 +4553,14 @@
    (list (inspect-whole-thing-action thing  size)
 	 '(:newline))))
 
-(defmethod inspect-whole-thing-action (thing size)
+(defun inspect-whole-thing-action (thing size)
   `(:action ,(format nil "Inspect all ~a elements." 
 		      size)
 	    ,(lambda() 
 	       (let ((*slime-inspect-contents-limit* nil))
 		 (swank::inspect-object thing)))))
 
-(defmethod inspect-show-more-action (thing)
+(defun inspect-show-more-action (thing)
   `(:action ,(format nil "~a elements shown. Prompt for how many to inspect..." 
 		     *slime-inspect-contents-limit* )
 	    ,(lambda() 
@@ -4957,6 +4957,7 @@
   (%%make-package-symbols-container :title title :description description
                                     :symbols symbols :grouping-kind :symbol))
 
+(defgeneric make-symbols-listing (grouping-kind symbols))
 
 (defmethod make-symbols-listing ((grouping-kind (eql :symbol)) symbols)
   "Returns an object renderable by Emacs' inspector side that
@@ -5004,7 +5005,7 @@
 SPECIAL-OPERATOR groups."
   (let ((table (make-hash-table :test #'eq)))
     (flet ((maybe-convert-fboundps (classifications)
-             ;; Convert an :FBOUNDP in CLASSIFICATION to :FUNCTION if possible.
+             ;; Convert an :FBOUNDP in CLASSIFICATIONS to :FUNCTION if possible.
              (if (and (member :fboundp classifications)
                       (not (member :macro classifications))
                       (not (member :special-operator classifications)))
@@ -5013,9 +5014,9 @@
       (loop for symbol in symbols do
             (loop for classification in (maybe-convert-fboundps (classify-symbol symbol))
                   ;; SYMBOLS are supposed to be sorted alphabetically;
-                  ;; this property is preserved here expect for reversing.
+                  ;; this property is preserved here except for reversing.
                   do (push symbol (gethash classification table)))))
-    (let* ((classifications (loop for k being the hash-key in table collect k))
+    (let* ((classifications (loop for k being each hash-key in table collect k))
            (classifications (sort classifications #'string<)))
       (loop for classification in classifications
             for symbols = (gethash classification table)
@@ -5743,10 +5744,9 @@
     (let ((action (second (nth (1- count) (cdr *presentation-active-menu*)))))
       (swank-ioify (funcall action item ob id)))))
 
-;; Default method
-(defmethod menu-choices-for-presentation (ob)
-  (declare (ignore ob))
-  nil)
+
+(defgeneric menu-choices-for-presentation (object)
+  (:method (ob) (declare (ignore ob)) nil)) ; default method
 
 ;; Pathname
 (defmethod menu-choices-for-presentation ((ob pathname))




More information about the slime-cvs mailing list