]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/eieio-opt.el
Update copyright year to 2015
[gnu-emacs] / lisp / emacs-lisp / eieio-opt.el
index 9269c744b9fdb85beeecb43f56ba398c4812a677..bef7ceb259a68ea6b7162e47a83ba30a7e5ba789 100644 (file)
@@ -1,6 +1,6 @@
 ;;; eieio-opt.el -- eieio optional functions (debug, printing, speedbar)
 
-;; Copyright (C) 1996, 1998-2003, 2005, 2008-2014 Free Software
+;; Copyright (C) 1996, 1998-2003, 2005, 2008-2015 Free Software
 ;; Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -124,7 +124,7 @@ If CLASS is actually an object, then also display current values of that object.
   ;; Describe all the methods specific to this class.
   (let ((methods (eieio-all-generic-functions class))
        (type [":STATIC" ":BEFORE" ":PRIMARY" ":AFTER"])
-       counter doc argshl dochl)
+       counter doc)
     (when methods
       (insert (propertize "Specialized Methods:\n\n" 'face 'bold))
       (while methods
@@ -141,7 +141,7 @@ If CLASS is actually an object, then also display current values of that object.
              (insert " " (aref type counter) " "
                      (prin1-to-string (car cur) (current-buffer))
                      "\n"
-                     (cdr cur)))
+                     (or (cdr cur) "")))
            (setq counter (1+ counter))))
        (insert "\n\n")
        (setq methods (cdr methods))))))
@@ -315,7 +315,7 @@ are not abstract."
 ;;;###autoload
 (defun eieio-help-generic (generic)
   "Describe GENERIC if it is a generic function."
-  (when (generic-p generic)
+  (when (and (symbolp generic) (generic-p generic))
     (save-excursion
       (goto-char (point-min))
       (when (re-search-forward " in `.+'.$" nil t)
@@ -356,7 +356,7 @@ are not abstract."
              (insert "' " (aref prefix i) " ")
              ;; argument list
              (let* ((func (cdr (car gm)))
-                    (arglst (eieio-lambda-arglist func)))
+                    (arglst (help-function-arglist func)))
                (prin1 arglst (current-buffer)))
              (insert "\n"
                      (or (documentation (cdr (car gm)))
@@ -374,13 +374,6 @@ are not abstract."
              (insert "\n")))
          (setq i (1+ i)))))))
 
-(defun eieio-lambda-arglist (func)
-  "Return the argument list of FUNC, a function body."
-  (if (symbolp func) (setq func (symbol-function func)))
-  (if (byte-code-function-p func)
-      (eieio-compiled-function-arglist func)
-    (car (cdr func))))
-
 (defun eieio-all-generic-functions (&optional class)
   "Return a list of all generic functions.
 Optional CLASS argument returns only those functions that contain
@@ -419,15 +412,15 @@ function has no documentation, then return nil."
                   (fboundp after)))
          nil
        (list (if (fboundp before)
-                 (cons (eieio-lambda-arglist before)
+                 (cons (help-function-arglist before)
                        (documentation before))
                nil)
              (if (fboundp primary)
-                 (cons (eieio-lambda-arglist primary)
+                 (cons (help-function-arglist primary)
                        (documentation primary))
                nil)
              (if (fboundp after)
-                 (cons (eieio-lambda-arglist after)
+                 (cons (help-function-arglist after)
                        (documentation after))
                nil))))))
 
@@ -692,4 +685,8 @@ INDENT is the current indentation level."
 
 (provide 'eieio-opt)
 
+;; Local variables:
+;; generated-autoload-file: "eieio.el"
+;; End:
+
 ;;; eieio-opt.el ends here