Source

eieio / eieio-opt.el

Diff from to

eieio-opt.el

 ;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar)
 
-;;; Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002 Eric M. Ludlam
+;;; Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Eric M. Ludlam
 ;;
 ;; Author: <zappo@gnu.org>
 ;; RCS: $Id$
 ;; GNU General Public License for more details.
 ;;
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, you can either send email to this
-;; program's author (see below) or write to:
-;;
-;;              The Free Software Foundation, Inc.
-;;              675 Mass Ave.
-;;              Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 ;;
 ;; Please send bug reports, etc. to zappo@gnu.org
 
 (require 'eieio)
 
 ;;; Code:
+;;;###autoload
 (defun eieio-browse (&optional root-class)
   "Create an object browser window to show all objects.
 If optional ROOT-CLASS, then start with that, otherwise start with
 	(princ " Inherits from ")
 	(while pl
 	  (princ "`") (prin1 (car pl)) (princ "'")
-	  (if pl (princ ", "))
-	  (setq pl (cdr pl)))
+	  (setq pl (cdr pl))
+	  (if pl (princ ", ")))
 	(terpri)))
     (let ((ch (class-children class)))
       (when ch
 	(princ " Children ")
 	(while ch
 	  (princ "`") (prin1 (car ch)) (princ "'")
-	  (if ch (princ ", "))
-	  (setq ch (cdr ch)))
+	  (setq ch (cdr ch))
+	  (if ch (princ ", ")))
 	(terpri)))
     (terpri)
     ;; System documentation
 	      (princ "  Undocumented")
 	    (if (car doc)
 		(progn
+		  (princ "  :STATIC ")
+		  (prin1 (car (car doc)))
+		  (terpri)
+		  (princ (cdr (car doc)))))
+	    (setq doc (cdr doc))
+	    (if (car doc)
+		(progn
 		  (princ "  :BEFORE ")
 		  (prin1 (car (car doc)))
 		  (terpri)
     (terpri)
     (terpri)
     (let ((i 3)
-	  (prefix [ ":BEFORE" ":PRIMARY" ":AFTER" ] ))
+	  (prefix [ ":STATIC" ":BEFORE" ":PRIMARY" ":AFTER" ] ))
       ;; Loop over fanciful generics
       (while (< i 6)
 	(let ((gm (aref (get generic 'eieio-method-tree) i)))
 
 ;;; Help system augmentation
 ;;
-(defun eieio-help-mode-augmentation-maybee (&optional ignored)
-  "For buffers thrown into help mode, augment for eieio."
+(defun eieio-help-mode-augmentation-maybee (&rest unused)
+  "For buffers thrown into help mode, augment for eieio.
+Arguments UNUSED are not used."
   ;; Scan created buttons so far if we are in help mode.
   (when (eq major-mode 'help-mode)
     (save-excursion
 	(while (re-search-forward "^\\(Instance\\|Class\\) Allocated Slots:$" nil t)
 	    (put-text-property (match-beginning 0) (match-end 0) 'face 'bold))
 	(goto-char (point-min))
-	(while (re-search-forward ":\\(BEFORE\\|AFTER\\|PRIMARY\\)" nil t)
+	(while (re-search-forward ":\\(STATIC\\|BEFORE\\|AFTER\\|PRIMARY\\)" nil t)
 	    (put-text-property (match-beginning 0) (match-end 0) 'face 'bold))
 	(goto-char (point-min))
 	(while (re-search-forward "^\\(Private \\)?Slot:" nil t)
 				class
 				'speedbar-directory-face
 				depth)
-      (speedbar-make-tag-line 'angle ? nil nil
+      (speedbar-make-tag-line 'angle ?  nil nil
 			      (symbol-name class)
 			      'eieio-describe-class-sb
 			      class