;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar)
-;; Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2008,
-;; 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998-2003, 2005, 2008-2012
+;; Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 0.2
;; Keywords: OO, lisp
+;; Package: eieio
;; This file is part of GNU Emacs.
(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
(if (not root-class) (setq root-class 'eieio-default-superclass))
(if (not (class-p root-class)) (signal 'wrong-type-argument (list 'class-p root-class)))
(display-buffer (get-buffer-create "*EIEIO OBJECT BROWSE*") t)
- (save-excursion
- (set-buffer (get-buffer "*EIEIO OBJECT BROWSE*"))
+ (with-current-buffer (get-buffer "*EIEIO OBJECT BROWSE*")
(erase-buffer)
(goto-char 0)
(eieio-browse-tree root-class "" "")
))
(defun eieio-browse-tree (this-root prefix ch-prefix)
- "Recursively, draws the children of the given class on the screen.
+ "Recursively draw the children of the given class on the screen.
Argument THIS-ROOT is the local root of the tree.
Argument PREFIX is the character prefix to use.
Argument CH-PREFIX is another character prefix to display."
;;; CLASS COMPLETION / DOCUMENTATION
+;;;###autoload
(defalias 'describe-class 'eieio-describe-class)
+;;;###autoload
(defun eieio-describe-class (class &optional headerfcn)
"Describe a CLASS defined by a string or symbol.
If CLASS is actually an object, then also display current values of that object.
(princ "Class ")
(prin1 class)
(terpri)
- ;; Inheritence tree information
+ ;; Inheritance tree information
(let ((pl (class-parents class)))
(when pl
(princ " Inherits from ")
(terpri)
(terpri))
(setq methods (cdr methods))))))
- (save-excursion
- (set-buffer (help-buffer))
+ (with-current-buffer (help-buffer)
(buffer-string)))
(defun eieio-describe-class-slots (class)
prot (cdr prot)
i (1+ i)))))
+;;;###autoload
(defun eieio-describe-constructor (fcn)
"Describe the constructor function FCN.
Uses `eieio-describe-class' to describe the class being constructed."
;;; METHOD COMPLETION / DOC
(defalias 'describe-method 'eieio-describe-generic)
+;;;###autoload
(defalias 'describe-generic 'eieio-describe-generic)
(defalias 'eieio-describe-method 'eieio-describe-generic)
+;;;###autoload
(defun eieio-describe-generic (generic)
"Describe the generic function GENERIC.
Also extracts information about all methods specific to this generic."
(terpri)
(terpri)))
(setq i (1+ i)))))
- (save-excursion
- (set-buffer (help-buffer))
+ (with-current-buffer (help-buffer)
(buffer-string)))
(defun eieio-lambda-arglist (func)
(defun eieio-all-generic-functions (&optional class)
"Return a list of all generic functions.
-Optional CLASS argument returns only those functions that contain methods for CLASS."
+Optional CLASS argument returns only those functions that contain
+methods for CLASS."
(let ((l nil) tree (cn (if class (symbol-name class) nil)))
(mapatoms
(lambda (symbol)
;;; HELP AUGMENTATION
;;
+;;;###autoload
(defun eieio-help-mode-augmentation-maybee (&rest unused)
- "For buffers thrown into help mode, augment for eieio.
+ "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)
(eval-when-compile
(condition-case nil
(require 'speedbar)
- (error (message "Error loading speedbar... ignored."))))
+ (error (message "Error loading speedbar... ignored"))))
(defvar eieio-class-speedbar-key-map nil
"Keymap used when working with a project in speedbar.")
(defun eieio-class-speedbar-make-map ()
- "Make a keymap for eieio under speedbar."
+ "Make a keymap for EIEIO under speedbar."
(setq eieio-class-speedbar-key-map (speedbar-make-specialized-keymap))
;; General viewing stuff
(defun eieio-class-speedbar (dir-or-object depth)
"Create buttons in speedbar that represents the current project.
-DIR-OR-OBJECT is the object to expand, or nil, and DEPTH is the current
-expansion depth."
+DIR-OR-OBJECT is the object to expand, or nil, and DEPTH is the
+current expansion depth."
(when (eq (point-min) (point-max))
;; This function is only called once, to start the whole deal.
;; Ceate, and expand the default object.
(provide 'eieio-opt)
+;; Local variables:
+;; generated-autoload-file: "eieio.el"
+;; End:
+
;;; eieio-opt.el ends here