• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/emacs-lisp/

Lines Matching defs:function

53 ;; - Only functions/macros/subrs that are called via their function cell will
67 ;; (autoload 'trace-function "trace" "Trace a function" t)
68 ;; (autoload 'trace-function-background "trace" "Trace a function" t)
74 ;; - To trace a function say `M-x trace-function' which will ask you for the
75 ;; name of the function/subr/macro to trace, as well as for the buffer
77 ;; - If you want to trace a function that switches buffers or does other
78 ;; display oriented stuff use `M-x trace-function-background' which will
81 ;; - To untrace a function say `M-x untrace-function'.
92 ;; (trace-function 'fact)
124 ;; (trace-function 'ack)
138 ;; (trace-function-background 'message "*Message Log*")
146 ;; * Separate function `trace-function-background'
170 ;; Current level of traced function invocation:
174 (defvar trace-advice-name 'trace-function\ )
182 (defun trace-entry-message (function level argument-bindings)
189 function
200 (defun trace-exit-message (function level value)
207 function
211 (defun trace-make-advice (function buffer background)
229 ',function trace-level ad-arg-bindings))))
237 ',function trace-level ad-return-value))))))))
239 (defun trace-function-internal (function buffer background)
242 function
243 (trace-make-advice function (or buffer trace-buffer) background)
245 (ad-activate function nil))
247 (defun trace-is-traced (function)
248 (ad-find-advice function 'around trace-advice-name))
251 (defun trace-function (function &optional buffer)
254 and return values will be inserted into BUFFER. This function generates the
258 display oriented stuff, use `trace-function-background' instead."
261 (intern (completing-read "Trace function: " obarray 'fboundp t))
263 (trace-function-internal function buffer nil))
266 (defun trace-function-background (function &optional buffer)
270 into BUFFER. This function generates advice to trace FUNCTION
279 (completing-read "Trace function in background: " obarray 'fboundp t))
281 (trace-function-internal function buffer t))
283 (defun untrace-function (function)
289 (list (ad-read-advised-function "Untrace function: " 'trace-is-traced)))
290 (when (trace-is-traced function)
291 (ad-remove-advice function 'around trace-advice-name)
292 (ad-update function)))
297 (ad-do-advised-functions (function)
298 (untrace-function function)))