Improve Edebug error for attempting to instrument built-in functions.

* lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use it to
signal an error for built-in functions.

* lisp/emacs-lisp/find-func.el (find-function-noselect): New arg
lisp-only.

Fixes: debbugs:6664
This commit is contained in:
Chong Yidong 2011-08-21 13:43:31 -04:00
parent 1e91d50696
commit 23a8a5ab69
3 changed files with 16 additions and 2 deletions

View file

@ -3408,7 +3408,7 @@ go to the end of the last sexp, or if that is the same point, then step."
(message "%s is already instrumented." func)
func)
(t
(let ((loc (find-function-noselect func)))
(let ((loc (find-function-noselect func t)))
(unless (cdr loc)
(error "Could not find the definition in its file"))
(with-current-buffer (car loc)