[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27397: [PATCH] New commands for bulk tracing of elisp functions
From: |
Phil Sainty |
Subject: |
bug#27397: [PATCH] New commands for bulk tracing of elisp functions |
Date: |
Tue, 20 Jun 2017 00:17:38 +1200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
On 20/06/17 00:05, Michael Albinus wrote:
> So we shall parse indead every function for the library it belongs to. It
> shouldn't be too hard, based on `autoloadp', `find-lisp-object-file-name'
> and friends, see the implementation in `describe-function-1'. Something
> like this is a very rudimentary implementation:
>
> (defun my-find-library (fun)
> "Find library FUN is defined in.
> In case of subroutines, return t"
> (when (fboundp fun)
> (let ((def (symbol-function fun)))
> (cond
> ((autoloadp def) (cadr def))
> ((subrp def) t)
> (t (file-name-base (find-lisp-object-file-name fun nil)))))))
Meanwhile I was experimenting with load-history along these lines:
(require 'seq)
(defun trace-library (library)
"Trace functions defined by LIBRARY."
(mapcar 'trace-function-background
(mapcar 'cdr (seq-filter
(lambda (x)
(and (consp x) (eq (car x) 'defun)))
(load-history-filename-element
(load-history-regexp library))))))
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/16
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Dmitry Gutov, 2017/06/16
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/17
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Dmitry Gutov, 2017/06/17
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions,
Phil Sainty <=
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Dmitry Gutov, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Dmitry Gutov, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Dmitry Gutov, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Michael Albinus, 2017/06/19
- bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/19
bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Kaushal Modi, 2017/06/16
bug#27397: [PATCH] New commands for bulk tracing of elisp functions, Phil Sainty, 2017/06/17