]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-opt.el
Add 2010 to copyright years.
[gnu-emacs] / lisp / emacs-lisp / eieio-opt.el
index 12fd666f4152691bd3d022b221bf5cb53a0ab95c..375ce0bc6d6bf9e4c0c78d0764cc4e2e4bc05b74 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;; Version: 0.2
@@ -43,15 +43,14 @@ variable `eieio-default-superclass'."
   (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."
@@ -80,7 +79,7 @@ Optional HEADERFCN should be called to insert a few bits of info first."
   (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))
 
@@ -161,8 +160,7 @@ Optional HEADERFCN should be called to insert a few bits of info first."
            (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)
@@ -312,7 +310,8 @@ Also extracts information about all methods specific to this generic."
   (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")
@@ -375,8 +374,7 @@ 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)
@@ -388,7 +386,8 @@ Also extracts information about all methods specific to this generic."
 
 (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)
@@ -551,7 +550,7 @@ Optional argument HISTORYVAR is the variable to use as history."
 ;;; 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)
@@ -599,13 +598,13 @@ Arguments UNUSED are not used."
 (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
@@ -636,8 +635,8 @@ Arguments UNUSED are not used."
 
 (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.
@@ -693,4 +692,5 @@ INDENT is the current indentation level."
 
 (provide 'eieio-opt)
 
+;; arch-tag: 71eab5f5-462f-4fa1-8ed1-f5ca1bf9adb6
 ;;; eieio-opt.el ends here