• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/emacs-lisp/

Lines Matching +defs:body +defs:begin +defs:function

39 ;; First evaluate a defun with C-M-x, then run the function.  Step
155 "*Non-nil means display a trace of function entry and exit.
157 function entry or exit per line, indented by the recursion level.
257 An extant spec symbol is a symbol that is not a function and has a
322 (defsubst edebug-lookup-function (object)
324 (setq object (symbol-function object)))
329 (setq object (edebug-lookup-function object))
335 (defun edebug-sort-alist (alist function)
336 ;; Return the ALIST sorted with comparison function FUNCTION.
338 (sort alist (function
340 (funcall function (car e1) (car e2))))))
345 '(defmacro edebug-save-restriction (&rest body)
355 (progn ,@body)
423 (mapcar (function (lambda (window)
436 (mapcar (function
439 (apply (function
460 ;; Save the original read function
462 (defalias 'edebug-original-read (symbol-function 'read)))
470 a function (call it with no arguments for each character,
485 (defalias 'edebug-original-eval-defun (symbol-function 'eval-defun)))
501 the prefix argument. Code is then instrumented when this function is
504 If acting on a `defun' for FUNCTION, and the function was
555 If you do this on a function definition
556 such as a defun or defmacro, it defines the function and instruments
609 (unless load-read-function
610 (setq load-read-function 'edebug-read)
615 (setq load-read-function nil)
616 (defalias 'eval-defun (symbol-function 'edebug-original-eval-defun)))
629 ;; @code{(@var{symbol} @var{begin-marker} @var{end-marker}). The markers
638 (defun edebug-make-form-data-entry (symbol begin end)
639 (list symbol begin end))
644 (defsubst edebug-form-data-begin (entry)
650 (defsubst edebug-set-form-data-entry (entry name begin end)
652 (set-marker (nth 1 entry) begin)
664 (begin (edebug-form-data-begin entry))
665 (dist (- pnt begin)))
844 (defmacro edebug-storing-offsets (point &rest body)
845 (declare (debug (form body)) (indent 1))
849 ,@body)
865 (hash . edebug-read-function)
922 (defun edebug-read-function (stream)
923 ;; Turn #'thing into (function thing)
929 (if (featurep 'cl) 'function* 'function))
1056 ;; The top level function for parsing forms is
1068 ;; exp at offset 1 of the current function. The expression is
1072 ;; The highest level expressions of the function are wrapped in a call to
1073 ;; edebug-enter, which supplies the function name and the actual
1074 ;; arguments to the function. See functions edebug-enter, edebug-before,
1172 '(mapcar (function
1195 (defvar edebug-def-interactive) ; is it an emacs interactive function?
1196 (defvar edebug-inside-func) ;; whether code is inside function context.
1197 ;; Currently def-form sets this to nil; def-body sets it to t.
1201 ;; status of interactive-p for this function.
1205 (defun edebug-wrap-def-body (forms)
1206 "Wrap the FORMS of a definition body."
1216 ;; This is not to be used for the body of other forms, e.g. `while',
1226 ;; Doesn't work with more than one def-body!!
1230 (function (lambda () ,@forms))
1234 (defvar edebug-form-begin-marker) ; the mark for def being instrumented
1244 (setq edebug-offset-list (cons (- offset edebug-form-begin-marker)
1250 ;; Return the edebug form for the current function at offset BEFORE-INDEX
1265 The SEXP might be the result of wrapping a body, which is a list of
1291 (defun edebug-defining-form (cursor form-begin form-end speclist)
1300 form-begin (1- form-end)
1303 (defun edebug-make-form-wrapper (cursor form-begin form-end
1309 (let* ((form-data-entry (edebug-get-form-data-entry form-begin form-end))
1311 (edebug-form-begin-marker
1313 (edebug-form-data-begin form-data-entry)
1315 (set-marker (make-marker) form-begin))))
1327 edebug-inside-func;; whether wrapped code executes inside a function.
1355 edebug-form-begin-marker
1361 form-begin form-end))
1386 (list edebug-form-begin-marker
1480 (t ;; Otherwise it is a function call.
1514 ;; assumption that the unquote form will place a proper function
1516 (edebug-match cursor '(("," def-form) body))
1517 ;; Process anonymous function and args.
1519 (edebug-match-specs cursor '(lambda-expr body) 'edebug-match-specs)))
1554 ;; Top level spec matching function.
1631 (body . edebug-match-body)
1636 (def-body . edebug-match-def-body)
1639 ;; (function . edebug-match-function)
1657 ;; Otherwise it should be the symbol name of a function.
1673 (t (error "%s is not a form-spec or function" symbol))
1688 (defsubst edebug-match-body (cursor) (edebug-forms cursor))
1771 (mapcar (function (lambda (pair)
1866 (defun edebug-match-function (cursor)
1867 (error "Use function-form instead of function in edebug spec"))
1873 ;; of the current list. e.g. ("lambda" &define args def-body)
1884 ;; The expression must be a function.
1944 ;; The form is assumed to be executing outside of the function context.
1950 (defun edebug-match-def-body (cursor)
1951 ;; Like body but body is wrapped in edebug-enter form.
1952 ;; The body is assumed to be executing inside of the function context.
1955 (list (edebug-wrap-def-body (edebug-forms cursor)))))
2006 def-body))
2008 (&define name lambda-list [&optional ("declare" &rest sexp)] def-body))
2021 ;; A function-form is for an argument that may be a function or a form.
2023 (def-edebug-spec function-form
2024 ;; form at the end could also handle "function",
2025 ;; but recognize it specially to avoid wrapping function forms.
2026 (&or ([&or "quote" "function"] &or symbolp lambda-expr) form))
2028 ;; function expects a symbol or a lambda or macro expression
2030 (def-edebug-spec function (&or symbolp lambda-expr))
2036 def-body))
2039 (def-edebug-spec macro (&define "lambda" lambda-list def-body))
2043 ;; Standard functions that take function-forms arguments.
2044 (def-edebug-spec mapcar (function-form form))
2045 (def-edebug-spec mapconcat (function-form form form))
2046 (def-edebug-spec mapatoms (function-form &optional form))
2047 (def-edebug-spec apply (function-form &rest form))
2048 (def-edebug-spec funcall (function-form &rest form))
2052 body))
2064 &rest ([&or symbolp (&rest symbolp)] body)))
2093 ;; arguments must be instrumented, if at all, with def-form not def-body.
2136 (def-edebug-spec ad-dolist ((symbolp form &optional form) body))
2146 def-body))
2148 (def-edebug-spec easy-menu-define (symbolp body))
2150 (def-edebug-spec with-custom-print body)
2174 ;; Each function adds one cons. Top is modified with setcar.
2184 ;; Name of function to use for debugging when error or quit occurs.
2190 (defvar edebug-function) ; the function being executed. change name!!
2191 (defvar edebug-args) ; the arguments of the function
2192 (defvar edebug-data) ; the edebug data for the function
2197 (defvar edebug-coverage) ; the coverage results of each expression of function.
2199 (defvar edebug-buffer) ; which buffer the function is in.
2200 (defvar edebug-result) ; the result of the function call returned by body
2240 (let ((signal-hook-function nil))
2245 (defun edebug-enter (edebug-function edebug-args edebug-body)
2246 ;; Entering FUNC. The arguments are ARGS, and the body is BODY.
2247 ;; Setup edebug variables and evaluate BODY. This function is called
2248 ;; when a function evaluated with edebug-eval-top-level-form is entered.
2294 (signal-hook-function 'edebug-signal)
2297 ;; a hook function is instrumented - to avoid infinite loop.
2305 (edebug-enter edebug-function edebug-args edebug-body))
2313 (let* ((edebug-data (get edebug-function 'edebug))
2315 (edebug-freq-count (get edebug-function 'edebug-freq-count))
2316 (edebug-coverage (get edebug-function 'edebug-coverage))
2319 (edebug-stack (cons edebug-function edebug-stack))
2322 (if (get edebug-function 'edebug-on-entry)
2325 (if (eq (get edebug-function 'edebug-on-entry) 'temp)
2326 (put edebug-function 'edebug-on-entry nil))))
2328 (edebug-enter-trace edebug-body)
2329 (funcall edebug-body))
2334 The purpose of this function is so you can properly undo
2357 (defun edebug-enter-trace (edebug-body)
2361 (format "%s args: %s" edebug-function edebug-args))
2362 (prog1 (setq edebug-result (funcall edebug-body))
2364 (format "%s result: %s" edebug-function edebug-result)))))
2366 (def-edebug-spec edebug-tracing (form body))
2368 (defmacro edebug-tracing (msg &rest body)
2374 (prog1 (setq edebug-result (progn ,@body))
2394 ;; Debug current function given BEFORE position.
2415 ;; Debug current function given AFTER position and VALUE.
2462 (defvar edebug-break-data) ; break data for current function.
2516 ;; window-start now stored with each function.
2530 (defvar edebug-window-data) ; window and window-start for current function
2550 ;; which function we're talking about.
2591 (error "Buffer defining %s not found" edebug-function)))
2633 edebug-function)
2924 (setq signal-hook-function nil)
2931 (setq signal-hook-function 'edebug-signal)
3042 (defmacro edebug-changing-windows (&rest body)
3046 ,@body;; Code to change edebug-save-windows
3154 ;; Return (function . index) of the nearest edebug stop point.
3202 (message "No breakpoints in this function.")
3416 (defun edebug-instrument-function (func)
3417 ;; Func should be a function symbol.
3418 ;; Return the function symbol, or nil if not instrumented.
3431 (let ((loc (find-function-noselect func)))
3440 "Instrument the definition of the function or macro about to be called.
3443 function or macro is called, Edebug will be called there as well."
3454 (edebug-instrument-function func))))
3458 "Step into the definition of the function or macro about to be called.
3468 (defun edebug-on-entry (function &optional flag)
3471 cancelled the first time the function is entered."
3474 (put function 'edebug-on-entry (if flag 'temp t)))
3476 (defun cancel-edebug-on-entry (function)
3478 (put function 'edebug-on-entry nil))
3482 (fset 'edebug-original-debug-on-entry (symbol-function 'debug-on-entry)))
3486 '(defun edebug-debug-on-entry (function)
3494 This version is from Edebug. If the function is instrumented for
3496 (interactive "aDebug on entry (to function): ")
3497 (let ((func-data (get function 'edebug)))
3499 (edebug-original-debug-on-entry function)
3500 (edebug-on-entry function))))
3512 ;; "Go until the current function exits."
3532 "Ask for the initial mode of the enclosing function.
3536 (let* ((this-function (edebug-which-function))
3539 (old-mode (or (get this-function 'edebug-initial-mode)
3544 this-function
3553 (or (get this-function 'edebug-initial-mode)
3556 (put this-function 'edebug-initial-mode mode)
3558 this-function mode))
3566 (defmacro edebug-outside-excursion (&rest body)
3617 ,@body)
3681 (define-obsolete-function-alias 'edebug-install-custom-print-funcs
3683 (define-obsolete-function-alias 'edebug-reset-print-funcs
3685 (define-obsolete-function-alias 'edebug-uninstall-custom-print-funcs
3723 (mapconcat (function (lambda (edebug-arg)
3918 (describe-function 'edebug-mode))
4109 If we are running an edebugged function,
4236 (let* ((function (edebug-form-data-symbol))
4237 (counts (get function 'edebug-freq-count))
4238 (coverages (get function 'edebug-coverage))
4239 (data (get function 'edebug))
4411 ;; Extension for bytecomp to resolve undefined function references.
4422 ;; The body of eval-when-compile seems to get evaluated with eval-defun.
4430 (function
4441 (function
4451 (function
4495 (function (lambda () (require 'cl-specs))))
4498 (function (lambda () (require 'cl-specs)))))
4503 (function (lambda () (require 'edebug-cl-read))))
4506 (function (lambda () (require 'edebug-cl-read)))))