;;; eieio-speedbar.el -- Classes for managing speedbar displays.
-;; Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1999-2002, 2005, 2007-2012 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 0.2
;; Keywords: OO, tools
+;; Package: eieio
;; This file is part of GNU Emacs.
map))
(defvar eieio-speedbar-key-map (eieio-speedbar-make-map)
- "A Generic object based speedbar display keymap.")
+ "A generic object based speedbar display keymap.")
(defvar eieio-speedbar-menu
'([ "Edit Object/Field" speedbar-edit-line t]
(defun eieio-speedbar-create-engine (map-fn map-var menu-var modename fetcher)
"Create a speedbar mode for displaying an object hierarchy.
Called from `eieio-speedbar-create', or the speedbar load-hook.
-MAP-FN, MAP-VAR, MENU-VAR, MODENAME, and FETCHER are the same as
+MAP-FN, MAP-VAR, MENU-VAR, MODENAME, and FETCHER are the same as in
`eieio-speedbar-create'."
;; make sure the keymap exists
(funcall map-fn)
(defun eieio-speedbar-buttons (dir-or-object depth fetcher)
"Create buttons for the speedbar display.
Start in directory DIR-OR-OBJECT. If it is an object, just display that
-objects subelements.
+object's subelements.
Argument DEPTH specifies how far down we have already been displayed.
If it is a directory, use FETCHER to fetch all objects associated with
that path."
object edit buffer doing an in-place edit.
If your object represents some other item, override this method
-and take the apropriate action."
+and take the appropriate action."
(require 'eieio-custom)
(speedbar-with-attached-buffer
(eieio-customize-object object))
"State of an object being expanded in speedbar.")
)
"Class which provides basic speedbar support for child classes.
-Add one of thie child classes to this class to the parent list of a class."
+Add one of the child classes to this class to the parent list of a class."
:method-invocation-order :depth-first
:abstract t)
(defclass eieio-speedbar-file-button (eieio-speedbar)
((buttontype :initform bracket)
(buttonface :initform speedbar-file-face))
- "Class providing support for objects which behave like a directory."
+ "Class providing support for objects which behave like a file."
:method-invocation-order :depth-first
:abstract t)
\f
-;;; Methods to eieio-speedbar-* which do not need to be overriden
+;;; Methods to eieio-speedbar-* which do not need to be overridden
;;
(defmethod eieio-speedbar-make-tag-line ((object eieio-speedbar)
depth)
"Insert a tag line into speedbar at point for OBJECT.
-All objects a child of symbol `eieio-speedbar' can be created from this
-method. Override this if you need non-traditional tag lines.
+All objects a child of symbol `eieio-speedbar' can be created from
+this method. Override this if you need non-traditional tag lines.
Argument DEPTH is the depth at which the tag line is inserted."
(let ((children (eieio-speedbar-object-children object))
(exp (oref object expanded)))
(defmethod eieio-speedbar-expand ((object eieio-speedbar) depth)
"Expand OBJECT at indentation DEPTH.
-Inserts a list of new tag lines representing expanded elements withing
+Inserts a list of new tag lines representing expanded elements within
OBJECT."
(let ((children (eieio-speedbar-object-children object)))
(cond ((eieio-object-p (car children))
(eieio-speedbar-handle-click token))
(defun eieio-speedbar-object-expand (text token indent)
- "Expand object represented by TEXT. TOKEN is the object.
-INDENT is the current indentation level."
+ "Expand object represented by TEXT.
+TOKEN is the object. INDENT is the current indentation level."
(cond ((string-match "+" text) ;we have to expand this file
(speedbar-change-expand-button-char ?-)
(oset token expanded t)
default-directory))))
\f
-;;; Methods to the eieio-speedbar-* classes which need to be overriden.
+;;; Methods to the eieio-speedbar-* classes which need to be overridden.
;;
(defmethod eieio-speedbar-object-children ((object eieio-speedbar))
- "Return a list of children to be displayed in SPEEDBAR.
+ "Return a list of children to be displayed in speedbar.
If the return value is a list of OBJECTs, then those objects are
queried for details. If the return list is made of strings,
then this object will be queried for the details needed
(provide 'eieio-speedbar)
-;; arch-tag: eaac1283-10b0-4419-a929-982b87e83234
;;; eieio-speedbar.el ends here