[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/bulk-tracing ea86c4f6d1: fixup! New commands for bulk tracing of
From: |
Phil Sainty |
Subject: |
scratch/bulk-tracing ea86c4f6d1: fixup! New commands for bulk tracing of elisp functions (bug#27397) |
Date: |
Tue, 12 Jul 2022 04:16:02 -0400 (EDT) |
branch: scratch/bulk-tracing
commit ea86c4f6d17f042c59f0b096fc24c960b1b140f9
Author: Phil Sainty <psainty@orcon.net.nz>
Commit: Phil Sainty <psainty@orcon.net.nz>
fixup! New commands for bulk tracing of elisp functions (bug#27397)
---
lisp/emacs-lisp/trace.el | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index b8ccf81098..c4129c5f07 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -580,17 +580,6 @@ and VALUE is the respective first argument to
`trace-package',
the values of those arguments as they were passed to the same
function.")
-(defun trace--remove-after-load (type value)
- "Remove any (TYPE . VALUE) entry from `trace--after-load-alist'.
-
-Remove `trace--after-load-function' from `after-load-functions'
-if it is no longer needed."
- (setq trace--after-load-alist
- (cl-delete (cons type value) trace--after-load-alist
- :key #'car))
- (unless trace--after-load-alist
- (remove-hook 'after-load-functions #'trace--after-load-function)))
-
(defun trace--after-load (type value &optional buffer context)
"Arrange to update traces after libraries are loaded.
@@ -624,10 +613,28 @@ See also `trace--after-load'."
(library (when (string-match (load-history-regexp value) file)
(trace-library value nil buffer context)))))))
+(defun trace--remove-after-load (type value)
+ "Remove any (TYPE . VALUE) entry from `trace--after-load-alist'.
+
+Remove `trace--after-load-function' from `after-load-functions'
+if it is no longer needed."
+ (setq trace--after-load-alist
+ (cl-delete (cons type value) trace--after-load-alist
+ :key #'car))
+ (unless trace--after-load-alist
+ (remove-hook 'after-load-functions #'trace--after-load-function)))
+
+(defun trace--remove-after-load-all ()
+ "Reset `trace--after-load-alist'.
+Remove `trace--after-load-function' from `after-load-functions'"
+ (setq trace--after-load-alist nil)
+ (remove-hook 'after-load-functions #'trace--after-load-function))
+
(defun untrace-all ()
"Remove traces from all currently traced functions."
(interactive)
- (mapatoms #'untrace-function))
+ (mapatoms #'untrace-function)
+ (trace--remove-after-load-all))
(provide 'trace)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/bulk-tracing ea86c4f6d1: fixup! New commands for bulk tracing of elisp functions (bug#27397),
Phil Sainty <=