[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/bulk-tracing a282c5ef61 2/2: Rename `trace-is-traced' to `trace-
From: |
Phil Sainty |
Subject: |
scratch/bulk-tracing a282c5ef61 2/2: Rename `trace-is-traced' to `trace-is-traced-p' |
Date: |
Sun, 10 Jul 2022 07:35:28 -0400 (EDT) |
branch: scratch/bulk-tracing
commit a282c5ef61a40142502986f9ff1b18ae59628aa1
Author: Phil Sainty <psainty@orcon.net.nz>
Commit: Phil Sainty <psainty@orcon.net.nz>
Rename `trace-is-traced' to `trace-is-traced-p'
---
lisp/emacs-lisp/trace.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index cfe77049dd..b8ccf81098 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -291,10 +291,12 @@ be printed along with the arguments in the trace."
Autoloaded functions are traceable."
(or (functionp sym) (macrop sym)))
-(defun trace-is-traced (function)
+(defun trace-is-traced-p (function)
"Whether FUNCTION is currently traced."
(advice-member-p trace-advice-name function))
+(define-obsolete-function-alias 'trace-is-traced 'trace-is-traced-p "29.1")
+
(defun trace--read-function (prompt)
"Read a function name, prompting with string PROMPT."
(let ((default (function-called-at-point)))
@@ -366,7 +368,7 @@ the output buffer or changing the window configuration."
"Remove trace from FUNCTION. If FUNCTION was not traced this is a noop."
(interactive
(list (intern (completing-read "Untrace function: "
- obarray #'trace-is-traced t))))
+ obarray #'trace-is-traced-p t))))
(advice-remove function trace-advice-name))
;;;###autoload
@@ -413,13 +415,13 @@ See also `untrace-package'."
See also `trace-package'."
(interactive
(list (completing-read "Prefix of package to untrace: "
- obarray #'trace-is-traced)))
+ obarray #'trace-is-traced-p)))
(if (and (zerop (length prefix))
(y-or-n-p "Remove all function traces?"))
(untrace-all)
(mapc (lambda (name)
(untrace-function (intern name)))
- (all-completions prefix obarray #'trace-is-traced)))
+ (all-completions prefix obarray #'trace-is-traced-p)))
;; Remove any `after-load' behaviour.
(trace--remove-after-load 'prefix prefix))
@@ -476,7 +478,7 @@ See also `trace-regexp'."
(untrace-all)
(mapatoms
(lambda (sym)
- (and (trace-is-traced sym)
+ (and (trace-is-traced-p sym)
(string-match-p regexp (symbol-name sym))
(untrace-function sym)))))
;; Remove any `after-load' behaviour.
@@ -562,7 +564,7 @@ See also `trace-library'."
(let ((defs (nconc (trace--library-defuns library)
(trace--library-autoloads library))))
(mapc (lambda (func)
- (when (trace-is-traced func)
+ (when (trace-is-traced-p func)
(untrace-function func)))
defs))
;; Remove any `after-load' behaviour.