;;; 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.
+;; 2009, 2010, 2011 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 0.2
(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."
(interactive (list (eieio-read-class "Class: ")))
(with-output-to-temp-buffer (help-buffer) ;"*Help*"
(help-setup-xref (list #'eieio-describe-class class headerfcn)
- (interactive-p))
+ (called-interactively-p 'interactive))
(when headerfcn (funcall headerfcn))
(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)
(if (not (generic-p generic))
(signal 'wrong-type-argument '(generic-p generic)))
(with-output-to-temp-buffer (help-buffer) ; "*Help*"
- (help-setup-xref (list #'eieio-describe-generic generic) (interactive-p))
+ (help-setup-xref (list #'eieio-describe-generic generic)
+ (called-interactively-p 'interactive))
(prin1 generic)
(princ " is a generic function")
(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
;;
(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)
+;; arch-tag: 71eab5f5-462f-4fa1-8ed1-f5ca1bf9adb6
;;; eieio-opt.el ends here