summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-07-28 11:28:48 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2017-07-28 11:28:48 -0400
commitb2225a374f24f1ee1a881bfd5d3c1f7b57447e47 (patch)
tree7324b2e0af30247b2f7cbaa7b0cfffd31035dbe6 /lisp/subr.el
parentdc9c6a071c0c12be2bd490f85107486bca44623e (diff)
downloademacs-b2225a374f24f1ee1a881bfd5d3c1f7b57447e47.tar.gz
* lisp/subr.el (method-files): Move function to cl-generic.el
* lisp/emacs-lisp/cl-generic.el (cl-generic-p): New function. (cl--generic-method-files): New function, moved from subr.el. * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use them. * test/lisp/emacs-lisp/cl-generic-tests.el: * test/lisp/subr-tests.el: Move and adjust method-files tests accordingly.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el19
1 files changed, 0 insertions, 19 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 79a28d301e7..90a78cf68a0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2031,25 +2031,6 @@ definition, variable definition, or face definition only."
(setq files (cdr files)))
file)))
-(defun method-files (method)
- "Return a list of files where METHOD is defined by `cl-defmethod'.
-The list will have entries of the form (FILE . (METHOD ...))
-where (METHOD ...) contains the qualifiers and specializers of
-the method and is a suitable argument for
-`find-function-search-for-symbol'. Filenames are absolute."
- (let ((files load-history)
- result)
- (while files
- (let ((defs (cdr (car files))))
- (while defs
- (let ((def (car defs)))
- (if (and (eq (car-safe def) 'cl-defmethod)
- (eq (cadr def) method))
- (push (cons (car (car files)) (cdr def)) result)))
- (setq defs (cdr defs))))
- (setq files (cdr files)))
- result))
-
(defun locate-library (library &optional nosuffix path interactive-call)
"Show the precise file name of Emacs library LIBRARY.
LIBRARY should be a relative file name of the library, a string.