diff lisp/emacs-lisp/find-func.el @ 90188:01137c1fdbe9

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-57 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 324-352) - Merge from gnus--rel--5.10 - Update from CVS - etc/emacs-buffer.gdb: Remove RCS keywords * gnus--rel--5.10 (patch 70-79) - Update from CVS - Merge from emacs--cvs-trunk--0
author Miles Bader <miles@gnu.org>
date Mon, 06 Jun 2005 02:39:45 +0000
parents 30ad2795fdab af6dffb5d180
children f9a65d7ebd29
line wrap: on
line diff
--- a/lisp/emacs-lisp/find-func.el	Sun Jun 05 01:58:02 2005 +0000
+++ b/lisp/emacs-lisp/find-func.el	Mon Jun 06 02:39:45 2005 +0000
@@ -246,8 +246,6 @@
 in `load-path'."
   (if (not function)
       (error "You didn't specify a function"))
-  (and (subrp (symbol-function function))
-       (error "%s is a primitive function" function))
   (let ((def (symbol-function function))
 	aliases)
     (while (symbolp def)
@@ -265,6 +263,8 @@
     (let ((library
 	   (cond ((eq (car-safe def) 'autoload)
 		  (nth 1 def))
+		 ((subrp def)
+		  (help-C-file-name def 'subr))
 		 ((symbol-file function 'defun)))))
       (find-function-search-for-symbol function nil library))))