comparison 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
comparison
equal deleted inserted replaced
90187:587ea1490d70 90188:01137c1fdbe9
244 If the file where FUNCTION is defined is not known, then it is 244 If the file where FUNCTION is defined is not known, then it is
245 searched for in `find-function-source-path' if non nil, otherwise 245 searched for in `find-function-source-path' if non nil, otherwise
246 in `load-path'." 246 in `load-path'."
247 (if (not function) 247 (if (not function)
248 (error "You didn't specify a function")) 248 (error "You didn't specify a function"))
249 (and (subrp (symbol-function function))
250 (error "%s is a primitive function" function))
251 (let ((def (symbol-function function)) 249 (let ((def (symbol-function function))
252 aliases) 250 aliases)
253 (while (symbolp def) 251 (while (symbolp def)
254 (or (eq def function) 252 (or (eq def function)
255 (if aliases 253 (if aliases
263 (if aliases 261 (if aliases
264 (message aliases)) 262 (message aliases))
265 (let ((library 263 (let ((library
266 (cond ((eq (car-safe def) 'autoload) 264 (cond ((eq (car-safe def) 'autoload)
267 (nth 1 def)) 265 (nth 1 def))
266 ((subrp def)
267 (help-C-file-name def 'subr))
268 ((symbol-file function 'defun))))) 268 ((symbol-file function 'defun)))))
269 (find-function-search-for-symbol function nil library)))) 269 (find-function-search-for-symbol function nil library))))
270 270
271 (defun find-function-read (&optional type) 271 (defun find-function-read (&optional type)
272 "Read and return an interned symbol, defaulting to the one near point. 272 "Read and return an interned symbol, defaulting to the one near point.