From: Masatake YAMATO Date: Mon, 30 May 2005 18:06:02 +0000 (+0000) Subject: * emacs-lisp/find-func.el (find-function-noselect): Handle X-Git-Tag: emacs-pretest-22.0.90~9405 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6dfa731f20bc5702c88f99297e60e41f1e27cbea;p=emacs.git * emacs-lisp/find-func.el (find-function-noselect): Handle subroutines. * help-fns.el (help-C-file-name): Added autoload mark for `find-function-noselect'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b67921f88b..f09d6f816b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-05-31 Masatake YAMATO + + * 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 * calendar/diary-lib.el (mark-included-diary-files): Only kill diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index eab957e5671..9a0a1606953 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -246,8 +246,6 @@ searched for in `find-function-source-path' if non nil, otherwise 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 @@ in `load-path'." (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)))) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c11aaf6da76..b5e22bf1855 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -224,7 +224,7 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." ;;; (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."