changeset 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 88db2adda4b7
children 86b398407446
files lisp/ChangeLog lisp/emacs-lisp/find-func.el lisp/help-fns.el
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon May 30 17:13:58 2005 +0000
+++ b/lisp/ChangeLog	Mon May 30 18:06:02 2005 +0000
@@ -1,3 +1,11 @@
+2005-05-31  Masatake YAMATO  <jet@gyve.org>
+
+	* emacs-lisp/find-func.el (find-function-noselect): Handle
+	subroutines.
+
+	* help-fns.el (help-C-file-name): Added autoload mark for 
+	`find-function-noselect'.
+
 2005-05-30  Glenn Morris  <gmorris@ast.cam.ac.uk>
 
 	* calendar/diary-lib.el (mark-included-diary-files): Only kill
--- 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))))
 
--- a/lisp/help-fns.el	Mon May 30 17:13:58 2005 +0000
+++ b/lisp/help-fns.el	Mon May 30 18:06:02 2005 +0000
@@ -224,7 +224,7 @@
 ;;;   (symbol-file (if (symbolp subr-or-var) subr-or-var
 ;;; 		 (subr-name subr-or-var))
 ;;; 	       (if (eq kind 'var) 'defvar 'defun)))
-
+;;;###autoload
 (defun help-C-file-name (subr-or-var kind)
   "Return the name of the C file where SUBR-OR-VAR is defined.
 KIND should be `var' for a variable or `subr' for a subroutine."