diff lisp/emacs-lisp/find-func.el @ 62908:af6dffb5d180

* emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. * help-fns.el (help-C-file-name): Added autoload mark for `find-function-noselect'.
author Masatake YAMATO <jet@gyve.org>
date Mon, 30 May 2005 18:06:02 +0000
parents 532be1846a28
children 18a818a2ee7c 01137c1fdbe9
line wrap: on
line diff
--- a/lisp/emacs-lisp/find-func.el	Mon May 30 17:13:58 2005 +0000
+++ b/lisp/emacs-lisp/find-func.el	Mon May 30 18:06:02 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))))