]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-speedbar.el
Update copyright year to 2015
[gnu-emacs] / lisp / emacs-lisp / eieio-speedbar.el
index f169e3f0cd20c22132a6ceb3ea9dc80f50a69ec1..cf676256d43e3127238b95752f4d1affe7389991 100644 (file)
@@ -1,9 +1,9 @@
 ;;; eieio-speedbar.el -- Classes for managing speedbar displays.
 
-;; Copyright (C) 1999-2002, 2005, 2007-2012  Free Software Foundation, Inc.
+;; Copyright (C) 1999-2002, 2005, 2007-2015 Free Software Foundation,
+;; Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
-;; Version: 0.2
 ;; Keywords: OO, tools
 ;; Package: eieio
 
@@ -191,23 +191,24 @@ that path."
 \f
 ;;; DEFAULT SUPERCLASS baseline methods
 ;;
-;; First, define methods onto the superclass so all classes
-;; will have some minor support.
+;; First, define methods with no class defined.  These will work as if
+;; on the default superclass.  Specifying no class will allow these to be used
+;; when no other methods are found, allowing multiple inheritance to work
+;; reliably with eieio-speedbar.
 
-(defmethod eieio-speedbar-description ((object eieio-default-superclass))
+(defmethod eieio-speedbar-description (object)
   "Return a string describing OBJECT."
-  (object-name-string object))
+  (eieio-object-name-string object))
 
-(defmethod eieio-speedbar-derive-line-path ((object eieio-default-superclass))
+(defmethod eieio-speedbar-derive-line-path (object)
   "Return the path which OBJECT has something to do with."
   nil)
 
-(defmethod eieio-speedbar-object-buttonname ((object eieio-default-superclass))
+(defmethod eieio-speedbar-object-buttonname (object)
   "Return a string to use as a speedbar button for OBJECT."
-  (object-name-string object))
+  (eieio-object-name-string object))
 
-(defmethod eieio-speedbar-make-tag-line ((object eieio-default-superclass)
-                                        depth)
+(defmethod eieio-speedbar-make-tag-line (object depth)
   "Insert a tag line into speedbar at point for OBJECT.
 By default, all objects appear as simple TAGS with no need to inherit from
 the special `eieio-speedbar' classes.  Child classes should redefine this
@@ -220,7 +221,7 @@ Argument DEPTH is the depth at which the tag line is inserted."
                          'speedbar-tag-face
                          depth))
 
-(defmethod eieio-speedbar-handle-click ((object eieio-default-superclass))
+(defmethod eieio-speedbar-handle-click (object)
   "Handle a click action on OBJECT in speedbar.
 Any object can be represented as a tag in SPEEDBAR without special
 attributes.  These default objects will be pulled up in a custom
@@ -229,9 +230,9 @@ object edit buffer doing an in-place edit.
 If your object represents some other item, override this method
 and take the appropriate action."
   (require 'eieio-custom)
-  (speedbar-with-attached-buffer
+  (dframe-with-attached-buffer
    (eieio-customize-object object))
-  (speedbar-maybee-jump-to-attached-frame))
+  (dframe-maybee-jump-to-attached-frame))
 
 \f
 ;;; Class definitions
@@ -323,7 +324,7 @@ Argument DEPTH is the depth at which the tag line is inserted."
 (defmethod eieio-speedbar-child-make-tag-lines ((object eieio-speedbar) depth)
   "Base method for creating tag lines for non-object children."
   (error "You must implement `eieio-speedbar-child-make-tag-lines' for %s"
-        (object-name object)))
+        (eieio-object-name object)))
 
 (defmethod eieio-speedbar-expand ((object eieio-speedbar) depth)
   "Expand OBJECT at indentation DEPTH.
@@ -364,7 +365,7 @@ TOKEN is the object.  INDENT is the current indentation level."
 (defmethod eieio-speedbar-child-description ((obj eieio-speedbar))
   "Return a description for a child of OBJ which is not an object."
   (error "You must implement `eieio-speedbar-child-description' for %s"
-        (object-name obj)))
+        (eieio-object-name obj)))
 
 (defun eieio-speedbar-item-info ()
   "Display info for the current line when in EDE display mode."